[systemd-devel] controlling IO from a transient service

jsl6uy js16uy js16uy at gmail.com
Tue Jun 28 16:20:08 UTC 2016


Hello all, hope all is well

Should I be able to control the IO for a tar process?

I am on arch linux using systemd-run to initiate a service to which I can
apply resource limits

Linux 4.6.2-1-ARCH #1 SMP PREEMPT Wed Jun 8 08:40:59 CEST 2016 x86_64
GNU/Linux

 systemctl --version
systemd 230
+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP
+GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN


I am starting a transient service with the parameters below. I have tried
several combinations

sudo systemd-run --unit=loadio -p "BlockIOWriteBandwidth=/dev/dm-1 50M" --
su - foo -c "cd $PWD && tar vcf custom_box.box ./metadata.json
./Vagrantfile ./box.img"

sudo systemd-run --unit=loadio -p "IOWriteBandwidthMax=/dev/dm-1 50M" -- su
- foo -c "cd $PWD && tar vcf custom_box.box ./metadata.json ./Vagrantfile
./box.img"

sudo systemd-run --unit=loadio -p "IOWriteBandwidthMax=/dev/dm-1 50M" -p
"BlockIOWriteBandwidth=/dev/dm-1 50M" -- su - foo -c "cd $PWD && tar vcf
custom_box.box ./metadata.json ./Vagrantfile ./box.img"
>>Tried both unified and legacy IO styles here

After I kick off the process, I can see with iotop that writes are not
being capped, and my machine becoming a bit sluggish ;).

Thoughts?

TIA for any/all help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160628/4e270cd4/attachment.html>


More information about the systemd-devel mailing list