Keep a limit on it - KVM · 2016. 2. 7. · Keep a limit on it IO Throttling in QEMU Ryan Harper...
Transcript of Keep a limit on it - KVM · 2016. 2. 7. · Keep a limit on it IO Throttling in QEMU Ryan Harper...
-
Linux is a registered trademark of Linus Torvalds.
Keep a limit on itIO Throttling in QEMU
Ryan Harper – [email protected] VirtualizationIBM Linux Technology Center
August 15, 2011
mailto:[email protected]
-
Contributors
Zhi Yong Wu – [email protected] Stefan Hajnoczi – [email protected]
Karl Rister – [email protected] Khoa Huynh, Ph.D. – [email protected]
Steve Pratt – [email protected]
mailto:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]
-
Limited Resources
-
Bw or IOPsRequires CFQ Upper limits per block device
cgroup blkio controller
Proportional Bandwidth IOPs
-
Non host block access
ceph
Network Access
NFScurl http
-
QEMU Block Layer LimitsQEMU Hardware
emulation
bdrv_aio_{read,write}v
Exceed limits?
drv->bdrv_aio_{read,write}v
Yes
No
Queue request
Calculate wakeup
-
Block IO Throttle Comparison● Effectiveness
– Can your configuration be throttled?– Is the cap ever exceeded?– What amount of IO does the guest observe?
● Cost– Is there a substantial cost to implement
throttling?● If so, where is that cost incurred?
–
–
-
Block IO Throttle Configuration● Storage backends
– LVM over SATA disk– EXT4 over SATA disk– NFS (IBM n3600)
● Image Formats– RAW– QCOW2
● Host Cache mode– ,cache=none– ,cache=writethrough
● Block Limiting – cgroup blkio throttling– QEMU blk-throttle
-
Workloads● 5 different workloads
– streaming writes● mkfs.ext4
– random reads and writes● fio iometer with randrw mix
– random reads● fio aio-read
– random writes● fio aio-write
– streaming reads● fio disk-surface-scan
● 1 and 5VM instances, isolated and mixed● VMs have 50G virtio-blk device
–
–
-
Host Config● IBM System x iDataPlex dx360 M3
– 2x Intel X5670 @ 2.93GHz – 128G RAM– 5 2TB SATA – 2 1G Intel NIC– 1 10G Emulex NIC
● RHEL 6.1● ioscheduler=deadline
-
CFQ vs Deadline
-
Cgroup vs QEMU – IOPscache=none
cgroup blkio limited
qemu blk limited
-
Cgroup vs QEMU – Throughputcache=none
cgroup blkio limited
qemu blk limited
-
Cgroup vs QEMU – IOPscache=writethrough
cgroup blkio limited
qemu blk limited
-
Cgroup vs QEMU – Throughputcache=writethrough
cgroup blkio limited
qemu blk limited
cgroup blkio limited
qemu blk limited
-
QEMU Capped vs Uncappedcache=none, nfs-backed
uncapped
qemu blk limited
-
QEMU Capped vs Uncapped -- Throughputcache=none, nfs-backed
uncapped
qemu blk limited
-
QEMU Capped vs Uncapped -- IOPscache=none, nfs-backed
uncapped
qemu blk limited
-
Throttling Cost -- utlization
cpu user cpu sys cpu guest cpu iowait cpu idle0.00
10.00
20.00
30.00
40.00
50.00
60.00
70.00
80.00
CPU Utilization
uncappedcgroup cappedqemu capped
type
%cp
u
utilizationidle
-
Work per %cpu
uncapped cgroup capped qemu capped0.00
500.00
1000.00
1500.00
2000.00
2500.00
3000.00
3500.00
4000.00
4500.00
Throttling OverheadThroughput
KB/s
per
%cp
u
uncapped cgroup capped qemu capped0.00
10.00
20.00
30.00
40.00
50.00
60.00
70.00
Throttling OverheadIOPs
IOP/
s pe
r %cp
u
-
Next Steps● Algorithm improvements
– Focus on preventing spikes● Reduce CPU consumption
– Data are incomplete but suggests there is room for improvement
●
–
-
Questions?● http://wiki.qemu.org/Features/DiskIOLimits
Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6page6Slide 8page8Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22