diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2017-05-05 15:40:27 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2017-05-05 15:40:27 +0200 |
commit | 5a7ec3a38a143928f91baa9d357eacbb8afd0d75 (patch) | |
tree | 8464c2744acdb092f49e008393d23ec2fb7b997a | |
parent | 9c48cff95c3a9281bcbc06cad32526f834616219 (diff) | |
download | eficast-5a7ec3a38a143928f91baa9d357eacbb8afd0d75.tar.gz eficast-5a7ec3a38a143928f91baa9d357eacbb8afd0d75.tar.bz2 eficast-5a7ec3a38a143928f91baa9d357eacbb8afd0d75.zip |
notes about cgroup for io
-rw-r--r-- | draft/limit-io.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/draft/limit-io.txt b/draft/limit-io.txt new file mode 100644 index 0000000..04307bb --- /dev/null +++ b/draft/limit-io.txt @@ -0,0 +1,16 @@ + +mount -t tmpfs cgroup_root /sys/fs/cgroup +mkdir -p /sys/fs/cgroup/blkio +mount -t cgroup -o blkio none /sys/fs/cgroup/blkio + + +dev=/dev/sda +limit=10485760 # 10MBps +mycg=/sys/fs/cgroup/blkio/limit_write/ + +devnode=$(stat -c'%t:%T' /dev/sda) +mkdir -p $mycg +echo "$devnode $limit" > $mycg/blkio.throttle.write_bps_device + +echo $PID > $mycg/tasks + |