OPTIONS
[--domain] <string> domain name, id or uuid
[--device] <string> block device
--bps <number> total throughput limits in bytes/s
--bps_rd <number> read throughput limits in bytes/s
--bps_wr <number> write throughput limits in bytes/s
--iops <number> total operation limits in numbers/s
--iops_rd <number> read operation limits in numbers/s
--iops_wr <number> write operation limits in numbers/s
[root@192-168-27-18 vnc]# socat - UNIX-CONNECT:/TEST_IMG/HDs/192.168.27.152/vnc/vm02762.monitor
QEMU 1.2.2 monitor - type 'help' for more information
(qemu) info block
info block
scsi0-hd0: removable=0 io-status=ok file=/TEST_IMG/HDs/192.168.27.152/192.168.27.152.raw ro=0 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
(qemu) help
block_job_cancel device -- stop an active background block operation
block_job_set_speed device speed -- set maximum speed for a background block operation
block_passwd block_passwd device password -- set the password of encrypted block devices
block_resize device size -- resize a block image
block_set_io_throttle device bps bps_rd bps_wr iops iops_rd iops_wr -- change I/O throttle limits for a block drive
block_stream device [speed [base]] -- copy data from a backing file into a block device
block_set_io_throttle device bps bps_rd bps_wr iops iops_rd iops_wr -- change I/O throttle limits for a block drive
iops°ªÀ» 1000À¸·Î ¼³Á¤
(qemu) block_set_io_throttle scsi0-hd0 0 0 0 1000 0 0
block_set_io_throttle scsi0-hd0 0 0 0 1000 0 0
(qemu) info block
scsi0-hd0: removable=0 io-status=ok file=/TEST_IMG/HDs/192.168.27.152/192.168.27.152.raw ro=0 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=1000 iops_rd=0 iops_wr=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
¡Ø ÁÖÀÇ»çÇ× QMP ¸ðµå¿¡¼ ³ª¿Ã¶§´Â....Ctrl + C ·Î...
QUIT|q ·Î ³ª¿À°ÔµÇ¸é...½Ã½ºÅÛ ¼Ë´Ù¿îµÊ!!!
ÃʱâÈ
block_set_io_throttle scsi0-hd0 0 0 0 0 0 0
VM iops ¼³Á¤º° µð½ºÅ© ÆÛÆ÷¸Õ½ºÃ¼Å©
iops=0 (No option)
# dd if=/dev/zero of=test.img bs=1M count=1000
1048576000 bytes (1.0 GB) copied, 2.79381 s, 375 MB/s
1048576000 bytes (1.0 GB) copied, 3.05439 s, 343 MB/s
1048576000 bytes (1.0 GB) copied, 3.06847 s, 342 MB/s
1048576000 bytes (1.0 GB) copied, 3.18377 s, 329 MB/s
# hdparm -tT /dev/sda
Timing buffered disk reads: 1124 MB in 3.00 seconds = 374.17 MB/sec
Timing buffered disk reads: 1058 MB in 3.00 seconds = 352.62 MB/sec
Timing buffered disk reads: 976 MB in 3.01 seconds = 324.75 MB/sec
iops=2000
# dd if=/dev/zero of=test.img bs=1M count=1000
1048576000 bytes (1.0 GB) copied, 3.12044 s, 336 MB/s
1048576000 bytes (1.0 GB) copied, 4.91232 s, 213 MB/s
# hdparm -tT /dev/sda
Timing buffered disk reads: 668 MB in 3.12 seconds = 213.84 MB/sec
Timing buffered disk reads: 702 MB in 3.45 seconds = 203.52 MB/sec
Timing buffered disk reads: 700 MB in 3.00 seconds = 233.09 MB/sec
iops=1500
# dd if=/dev/zero of=test.img bs=1M count=1000
1048576000 bytes (1.0 GB) copied, 5.64346 s, 186 MB/s
1048576000 bytes (1.0 GB) copied, 3.98859 s, 263 MB/s
1048576000 bytes (1.0 GB) copied, 3.87936 s, 270 MB/s
1048576000 bytes (1.0 GB) copied, 4.38273 s, 239 MB/s
iops=1000
# dd if=/dev/zero of=test.img bs=1M count=1000
1048576000 bytes (1.0 GB) copied, 7.02586 s, 149 MB/s
1048576000 bytes (1.0 GB) copied, 7.53404 s, 139 MB/s
1048576000 bytes (1.0 GB) copied, 5.73748 s, 183 MB/s
1048576000 bytes (1.0 GB) copied, 8.07439 s, 130 MB/s
1048576000 bytes (1.0 GB) copied, 6.99695 s, 150 MB/s
1048576000 bytes (1.0 GB) copied, 5.25225 s, 200 MB/s
# hdparm -tT /dev/sda
Timing buffered disk reads: 374 MB in 3.01 seconds = 124.43 MB/sec
Timing buffered disk reads: 304 MB in 3.46 seconds = 87.79 MB/sec
Timing buffered disk reads: 294 MB in 3.46 seconds = 84.89 MB/sec
Timing buffered disk reads: 352 MB in 3.00 seconds = 117.33 MB/sec
iops=500
# dd if=/dev/zero of=test.img bs=1M count=1000
1048576000 bytes (1.0 GB) copied, 12.7959 s, 81.9 MB/s
1048576000 bytes (1.0 GB) copied, 12.8743 s, 81.4 MB/s
iops=100
# dd if=/dev/zero of=test.img bs=1M count=1000
1048576000 bytes (1.0 GB) copied, 55.904 s, 18.8 MB/s
1048576000 bytes (1.0 GB) copied, 55.4926 s, 18.9 MB/s