0

I need reclamation thin disk, so Im trying fill zero on vhdd. But when I run it, so server is overload with 20k IOPS and full satured SAN network. Can you help me how I can slow b/w for this? E.g 10MB/s

Tried this:

ionice -c 3 dd if=/dev/zero of=/www/zeroes bs=4096 && rm -f /www/zeroes

ionice -c 3 cat /dev/zero > zero.fill;sync;

After run server have load 90+

Pavel
  • 397
  • 6
  • 16
  • though im not quite sure this is the only issue, but you need to have every command ioniced. so to only get idle IO: ionice -c 3 dd if=/dev/zero of=/www/zeroes bs=4096 && ionice -c 3 rm -f /www/zeroes – Dennis Nolte Jun 18 '14 at 13:36
  • Dennis, ... because `rm` is call after `dd` is end, so this may not be ioniced – Pavel Jun 18 '14 at 14:48

1 Answers1

0

If your server is using cgroups like I nowadays suspect it is, you can do

    echo "x:y  10485760" > /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device

... where x would be the major number for your device and y the minor one. See from dev which applies to your devices.

My example would throttle the writing speed to about 10 MB/s.

Janne Pikkarainen
  • 31,454
  • 4
  • 56
  • 78
  • I dont use cgroups. But If I understand well, so this will trottle all process together. So if `dd` will working with full speed, so other processes will wait for IO as it w/o thr. – Pavel Jun 18 '14 at 14:38