본문 바로가기
조회 수 6235 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print Files
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print Files

Web performance test with ab (ruby web, dd, ab)


1. start web service

: there are many options you can consider to run web service on Mac OS X


- MAMP

- ruby -run -e httpd ~/WebRoot/ -p 8888

- etc


2. create dummy files in various sizes on web root


for ((i=10; i<=100; i+=10)); do dd if=/dev/urandom of="$i"MB.bin bs=$(expr 1024 \* 1024 \* $i) count=1; done


01.png


3. download those files and check transfer rate from client


for((s=10;s<=100;s+=10)); do echo "---- $s MB ----"; for((i=0;i<10;i++)); do ab -n 1 http://192.168.1.118:8888/"$s"MB.bin | grep 'Transfer rate'; sleep 1; done; done


02.png


Find the file with most stable and fast transfer rate.


4. perform the download test and get output result of ab


- The following script download a file 100 times and save the result in text file


ab -n 100 http://192.168.1.118:8888/50MB.bin | tee $(date +%Y%m%d-%H%M%S).txt | grep "Transfer rate"


- If you need some interval between download processes, then use the script below. this script download a file 100 times with 1 sec interval and keeps appending the output to text file.


TODAY=$(date +%Y%m%d-%H%M%S); FILENAME=ab_result_with_NX_$TODAY.txt; for ((i=0; i<100; i++)); do echo $TODAY >> $FILENAME; ab -n 1 http://192.168.1.118:8888/50MB.bin | tee -a $FILENAME | grep "Transfer rate"; sleep 1; done


- search the transfer rate in output file


perl -wlne 'print $1 if /Transfer rate:.*?(\d+\.\d+)/' <text_output>


5. create a report with the result

N/A



Title
List of Articles
번호 제목 글쓴이 날짜 조회 수
448 How to install Java on linux with no Internet connectivity (using local repository) Hojung 2015.12.22 3751
447 How to install tcpreplay on CentOS 6.5 Hojung 2015.08.21 8492
446 Install et131x network interface driver in CentOS 6 (LW25-BDUO3) file Hojung 2015.07.03 4870
445 How to find CentOS and kernel version Hojung 2015.04.30 4270
444 MD5 Test Hojung 2015.04.01 4434
443 MAC times in Linux (atime, mtime, ctime, crtime, touch, stat, debugfs) Hojung 2015.01.13 5344
442 How to generate a key with passphrase Hojung 2014.11.22 5613
441 Most Common OpenSSL Commands Hojung 2014.11.21 6055
440 How to use screen command Hojung 2014.11.17 4520
439 snorby (on testing) Hojung 2014.11.17 7236
438 APM (Apache + PHP + MySQL) with phpmyadmin in CentOS VM Hojung 2014.11.16 5401
437 10 Ways to Generate a Random Password from the Command Line Hojung 2014.11.16 4724
436 How to increase the size of a Linux LVM by adding a new disk file Hojung 2014.11.14 4933
435 Configuring logrotate for Rails logs file Hojung 2014.11.13 5385
434 Installing Splunk on CentOS file Hojung 2014.10.31 7240
» Web performance test with ab (ruby web, dd, ab) file Hojung 2014.10.01 6235
432 Web performance test with Pylot (ruby web, dd, pylot) file Hojung 2014.10.01 5785
431 Install and Configure NTP to Synchronize The System Clock (ntpd, ntpdate) Hojung 2014.09.17 5300
430 How to disable IPv6 in CentOS 6 Hojung 2014.09.04 5424
429 IDS with snort in CentOS (Snort, Barnyard2) Hojung 2014.08.19 8802
Board Pagination ‹ Prev 1 2 3 4 5 6 7 8 9 10 ... 23 Next ›
/ 23

Designed by sketchbooks.co.kr / sketchbook5 board skin

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5