게시물 1,376건
   
VM IOPS 설정
글쓴이 : 최고관리자 날짜 : 2014-02-11 (화) 18:08 조회 : 5965
글주소 :
                                
IOPS (Total number of I/O operations per second) : 초당 입출력 횟수
 계산방법 IOPS = 1000 / (평균 Read Seek Time + (maximum rotational latency / 2))

IOPS = 1000 (ms/s) / (average read seek time (ms) + (maximum rotational latency (ms) / 2)) 
maximum rotational latency =
60,000 (ms/min) / rotational speed (rpm)Rotational Speed (rpm) Max Rotational Latency (ms) 4200 14.3 5400 11.1
7200 8.3 10000 6.0 15000 4.0
For example, if we have a 73 GByte, 2.5" Seagate Saviio SAS drive which has a 4.1 ms
average read seek and rotational speed of 10,000 rpm: iops = 1000 / (4.1 + (6.0 / 2)) = 140.8 By comparison, 
a 750GByte, 3.5" Seagate Barracuda SATA drive which has a 8.5 ms average read seek and rotational speed of 7,200 rpm:
iops = 1000 / (8.5 + (8.3 / 2)) = 79.0

(분당)회전속도:15000rpm, 평균읽기탐색시간: 3.4ms 제품을 공식에 대입해 보면
디스크당 IOPS : 1000/(3.4 + ((60000/15000)/2)) = 185 입니다.
위 수치와 BMT한 결과를 기반으로 용량산정을 하면 보다 신뢰도 있는 산정이 가능할것 같습니다.




1. QEMU 옵션으로 적용
qemu 1.1 버전이상 옵션 사용가능
[root@localhost]# qemu -help|grep iops
[[,bps=b]|[[,bps_rd=r][,bps_wr=w]]][[,iops=i]|[[,iops_rd=r][,iops_wr=w]]

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

ex) 디스크 옵션내
# qemu ............................ -drive file=/TEST_IMG/HDs/test2/DISK.qcow2,iops=500,if=scsi...........


2. QMP(qemu monitoring protocol)를 통해 관리
ex) VM : 192.168.27.152 접속
[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
# hdparm -tT /dev/sda
 Timing buffered disk reads:   34 MB in  3.21 seconds =  10.58 MB/sec
 Timing buffered disk reads:   34 MB in  3.20 seconds =  10.61 MB/sec


이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

 



 
사이트명 : 모지리네 | 대표 : 이경현 | 개인커뮤니티 : 랭키닷컴 운영체제(OS) | 경기도 성남시 분당구 | 전자우편 : mojily골뱅이chonnom.com Copyright ⓒ www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.