sysbench script

페이지 정보

작성자 조희승 댓글 0건 조회 5,961회 작성일 15-10-02 20:19

본문

--------------------
dropcache.sh
--------------------
free -o; sync; echo 3 > /proc/sys/vm/drop_caches; free -o


--------------------
r.sh
--------------------
#!/bin/bash


# variables
sysbenchtest=fileio
    # cpu threads mutex memory fileio oltp
filetotalsize=$1
#filetotalsize=10g
fileblocksize=1M
filenumber=1
testmode=seqrd
    # seqwr seqrewr seqrd rndrd rndwr rndrw
fileflag=direct
    # sync dsync direct
tnum=64

#rm -f *.dat



sysbenchoptions=" --test=$sysbenchtest --num-threads=$tnum --file-block-size=$fileblocksize \
        --file-total-size=$filetotalsize --file-num=$filenumber --file-test-mode=$testmode \
        --file-extra-flags=$fileflag "
 
for (( i=0; i<1; i++ ))
do
        dropcache.sh

    echo "-- TEST ($i)"

    cmd="sysbench $sysbenchoptions run "
    echo $cmd
    $cmd

    sleep 1;



done


#sysbench $sysbenchoptions cleanup > /dev/null





--------------------
w.sh
--------------------
#!/bin/bash

dropcache.sh

# variables
sysbenchtest=fileio
    # cpu threads mutex memory fileio oltp
filetotalsize=$1
#fileblocksize=16k
fileblocksize=4M
filenumber=1
testmode=seqrd
    # seqwr seqrewr seqrd rndrd rndwr rndrw
fileflag=direct
    # sync dsync direct
tnum=64

#rm -f *.dat



# setting test files
sysbenchoptions=" --test=$sysbenchtest --num-threads=$tnum --file-block-size=$fileblocksize \
        --file-total-size=$filetotalsize --file-num=$filenumber --file-test-mode=$testmode \
        --file-extra-flags=$fileflag  "
cmd="sysbench $sysbenchoptions prepare"
echo $cmd
$cmd

댓글목록

등록된 댓글이 없습니다.