summaryrefslogtreecommitdiff
path: root/draft
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2017-05-05 15:40:27 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2017-05-05 15:40:27 +0200
commit5a7ec3a38a143928f91baa9d357eacbb8afd0d75 (patch)
tree8464c2744acdb092f49e008393d23ec2fb7b997a /draft
parent9c48cff95c3a9281bcbc06cad32526f834616219 (diff)
downloadeficast-5a7ec3a38a143928f91baa9d357eacbb8afd0d75.tar.gz
eficast-5a7ec3a38a143928f91baa9d357eacbb8afd0d75.tar.bz2
eficast-5a7ec3a38a143928f91baa9d357eacbb8afd0d75.zip
notes about cgroup for io
Diffstat (limited to 'draft')
-rw-r--r--draft/limit-io.txt16
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
+