Commit 16b7c78c authored by Akilesh Kailash's avatar Akilesh Kailash
Browse files

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: default avatarAkilesh Kailash <akailash@google.com>
parent 17aa8bfa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment