I want to anayse influence of slow disc storage on my application. In order to do it I want to decrease writes thougput to the storage. Can I do it by some configuration or is there any tool dedicated for that?
Asked
Active
Viewed 577 times
2
-
have a look at [ionice](https://linux.die.net/man/1/ionice) – Lenniey Jul 19 '17 at 07:14
-
Thanks, but ionice only sets priority to process which means no real throughput change if there are no other io consuming processes. – Wojciech Wirzbicki Jul 19 '17 at 07:32
-
Yep. That's why it isn't an answer. You can always generate random IO to throttle your application. – Lenniey Jul 19 '17 at 07:33
-
I'll try it if I won't find better option – Wojciech Wirzbicki Jul 19 '17 at 07:39
1 Answers
2
You could use Linux Kernel cgroups (control groups). See Throttling IO with Linux. Another option is to use virtualization and limit I/O available for the VM. This might be a good setup for testing. For example, QEMU has DiskIOLimits; this page also has a valuable notice:
The availability of disk I/O throttling depends on the underlying storage (image file, LVM, NFS, Ceph). On Linux the cgroups blkio-controller supports I/O throttling on block devices but is a relatively recent feature. More importantly, there is no single mechanism for disk I/O throttling across all underlying storage types and for some types there is no way to throttle at all.

Esa Jokinen
- 46,944
- 3
- 83
- 129