본문 바로가기

Linux/Tip&Tech

bonnie++를 통한 시스템 벤치마킹(BMT Tool)

펌 : http://www.starhost.co.kr/xe/?mid=hosting_tip_server&document_srl=28999&sort_index=readed_count&order_type=desc

bonnie++를 통한 시스템 벤치마킹(BMT Tool)

오픈소스 BMT 툴인 bonnie++입니다.
하드디스크 및 파일시스템의 성능 체킹을 하는 프로그램으로 상당히 유용할겁니다.

 


공식 사이트 : http://www.coker.com.au/bonnie++/
다운로드 :
http://www.coker.com.au/bonnie++/bonnie++-1.03a.tgz
http://www.rootman.co.kr/NFS2/Util/bonnie++-1.03.tgz

-------------------------------------------------------------------------------
1. 설치
-------------------------------------------------------------------------------
(1) 우선 다운로드 받은 후
wget http://www.coker.com.au/bonnie++/bonnie++-1.03a.tgz


(2) 설치
[root@ns1 ~]# cd /usr/local/src/bonnie++-1.03/; ./configure && make && make install
[root@ns1 /usr/local/src/bonnie++-1.03]# cp bon_csv2html.in  /usr/sbin 


-------------------------------------------------------------------------------
2. bonnie++  옵션설명
-------------------------------------------------------------------------------
[root@ns1 ~]# bonnie++
You must use the "-u" switch when running as root.
usage: bonnie++ [-d scratch-dir] [-s size(Mb)[:chunk-size(b)]]
[-n number-to-stat[:max-size[:min-size][:num-directories]]]
[-m machine-name]
[-r ram-size-in-Mb]
[-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use]
[-q] [-f] [-b] [-p processes | -y]


(1) [-d scratch-dir ]
테스트에 사용될 Directory 지정


(2) [-s size(Mb)[:chunk-size(b)]]
IO 퍼포먼스 처리를 위한 메가 바이트 단위의 파일크기. 
만일 크기가 1G 보다 크다면 데이터는 1G단위의 여러개의 파일로 저장이되며,
각 파일들은 1G크기 안에서 처리된다.
chunk-size는 Byte단위 크기를 측정하며, 256에 1048576사이여야 한다.


(3) [-n number-to-stat[:max-size[:min-size][:num-directories]]]
파일 생성 시험을 위한 파일의 수이며, 기본 *1024개의 파일이 생성되므로
-n 100이라 지정 시,  100*1024=102400개의 파일이 생성된다.


(4) [-m machine-name]
장비의 이름 - 보여주기 위한 목적


(5) [-r ram-size-in-Mb]
메모리 사이즈


(6) [-x number-of-tests]
테스트 실행 회수인데, 여러 번 테스트 목적이면 그 때 유용하다.


(7) [-u uid-to-use:gid-to-use]
유저아이디 사용.

(8) [-g uid-to-use:gid-to-use]
그룹아이디 사용.

(9) [-q]
조용히 실행

(10) [-f]
빠른 실행  (character I/O 테스트를 하지 않는다)

(11) [-b]
buffering write를 안 함.  모든 기록후 fsync()

(13) [-p processes | -y]
실행 위한 세마포어 프로세스 수


---------------------------------------------------------
3. 실제 사용 예
---------------------------------------------------------
[root@ns1 ~]# bonnie++ -d /home -s 2048:1024 -n 100 -f -m `hostname` -r 1024  -u root:root   > BenchResult.txt
Using uid:0, gid:0.
Writing intelligently...done
Rewriting...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
[root@ns1 ~]#

:: 간략 설명 ::
작업 디렉터리는 /home을 사용하며
생성 사이즈는 2G이고, chunk-size는 1024(1k)를 사용한다.
(파일 사이즈는 메모리의 2배로 해 주길 권고하고 있다.)
-n은 100개의 파일 테스트이고, 기본 파일 개수가 1024이기 때문에. 100*1024의 파일 개수를 생성한다.
-f를 지정하여 character I/O test를 생략합니다.
-r 메모리는 1024M이며
-x 2번 테스트합니다. (현재 제거함)
-u 사용자는 루트 권한으로 실행하며
결과를 BenchResult.txt를 생성합니다.


bon_csv2html , bon_csv2txt 명령을 이용해서 결과물을 html이나 plain text로 변환할 수 있습니다.

 

---------------------------------------------------------
4. HTML 표로 변환하는 방법
---------------------------------------------------------
[root@ns1 ~]# tail -n 1 BenchResult.txt | bon_csv2html > BenchResult.html

 

---------------------------------------------------------
5. 파일시스템 테스트 (ext2, ext3, softraid, large4)
---------------------------------------------------------
(1) 장비 : Intel SR1400
(2) CPU : Intel(R) Xeon(TM) CPU 3.00GHz X 2EA, HyperThreding ON
(3) Memory : DDR2 ECC 512M * 2EA
(4) 대상
    ext2(soft Raid Level 0)
    ext3(soft Raid Level 0)
    ext2(Intel 2100S Level 0)
    ext3(Intel 2100S Level 0)

'Linux > Tip&Tech' 카테고리의 다른 글

Piranha 설정  (0) 2011.03.24
dmidecode  (0) 2010.10.15
8T 이상 데이터 사용  (0) 2010.07.29
2008/9/25 설치버전 - TechNote 외부 파일 include 차단 [보안패치]  (0) 2010.06.17
Linux Daemon 설명  (0) 2010.03.04