ANDROID: Enable block device throttling
Control I/O rate at the block layer using
cgroup blkio subsystem.
Bug: 268437029
Test: dd test on block device and verify i/o throttle
mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
dd if=/dev/block/sdb of=/dev/null bs=1M count=10
10+0 records in
10+0 records out
10485760 bytes (10 M) copied, 0.013 s, 769 M/s
echo "8:16 65536" > /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device
dd if=/dev/block/sdb of=/dev/null bs=1M count=10
10+0 records in
10+0 records out
10485760 bytes (10 M) copied, 192.009 s, 53 K/s
Change-Id: I32d415bfce9d83641636f56d83b4cc54242a44f2
Signed-off-by:
Akilesh Kailash <akailash@google.com>
Loading
Please sign in to comment