User Tools

Site Tools


benchmarking

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
benchmarking [2014/09/20 12:41] – [examples] adminbenchmarking [2022/10/29 16:15] (current) – external edit 127.0.0.1
Line 2: Line 2:
 ===== Benchmark website ===== ===== Benchmark website =====
 ==== Benchmark with ab tool ==== ==== Benchmark with ab tool ====
 +ab tool will be installed when we install webserver apache
 === Syntax and basic options === === Syntax and basic options ===
   * Syntax:<code bash>   * Syntax:<code bash>
Line 9: Line 10:
     * -n requests     Number of requests to perform     * -n requests     Number of requests to perform
     * -c concurrency  Number of multiple requests to make     * -c concurrency  Number of multiple requests to make
 +
 === examples === === examples ===
-  * run benchmark website shop.babies.vn with 250 requests and 15 concurrency multiple requests:<code bash>+  * run benchmark website shop.babies.vn with 100 requests and concurrency multiple requests:<code bash>
 ab -n 100 -c 4 http://shop.babies.vn/ ab -n 100 -c 4 http://shop.babies.vn/
 </code>output:<code> </code>output:<code>
Line 116: Line 118:
 sysbench --test=fileio --file-total-size=5G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run sysbench --test=fileio --file-total-size=5G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run
 </code>output:<code> </code>output:<code>
-sysbench 0.4.12.5:  multi-threaded system evaluation benchmark 
- 
-128 files, 40960Kb each, 5120Mb total 
-Creating files for the test... 
-[root@mail ~]# sysbench --test=fileio --file-total-size=5G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run 
 sysbench 0.4.12.5:  multi-threaded system evaluation benchmark sysbench 0.4.12.5:  multi-threaded system evaluation benchmark
  
Line 144: Line 141:
 Done. Done.
  
-Operations performed:  243263 Read, 162175 Write, 518912 Other = 924350 Total +Operations performed:  701100 Read, 467400 Write, 1495579 Other = 2664079 Total 
-Read 3.7119Gb  Written 2.4746Gb  Total transferred 6.1865Gb  (21.116Mb/sec) +Read 10.698Gb  Written 7.132Gb  Total transferred 17.83Gb  (60.859Mb/sec) 
- 1351.45 Requests/sec executed+ 3894.99 Requests/sec executed
  
 Test execution summary: Test execution summary:
-    total time:                          300.0014s +    total time:                          300.0011s 
-    total number of events:              405438 +    total number of events:              1168500 
-    total time taken by event execution: 175.2639+    total time taken by event execution: 134.9176
     per-request statistics:     per-request statistics:
-         min:                                  0.01ms +         min:                                  0.00ms 
-         avg:                                  0.43ms +         avg:                                  0.12ms 
-         max:                                 22.63ms +         max:                                 14.60ms 
-         approx.  95 percentile:               1.02ms+         approx.  95 percentile:               0.28ms
  
 Threads fairness: Threads fairness:
-    events (avg/stddev):           405438.0000/0.00 +    events (avg/stddev):           1168500.0000/0.00 
-    execution time (avg/stddev):   175.2639/0.00+    execution time (avg/stddev):   134.9176/0.00
 </code>The important number is the Mb/sec value:<code> </code>The important number is the Mb/sec value:<code>
-Read 3.7119Gb  Written 2.4746Gb  Total transferred 6.1865Gb  (21.116Mb/sec)+Read 10.698Gb  Written 7.132Gb  Total transferred 17.83Gb  (60.859Mb/sec)
 </code> </code>
   - Step3: Cleanup<code bash>   - Step3: Cleanup<code bash>
Line 177: Line 174:
 sysbench --test=oltp --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword cleanup sysbench --test=oltp --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword cleanup
 </code> </code>
 +===== Benchmark with graphing software ===== 
 +==== Better Cacti Templates ==== 
 +Download: wget https://mysql-cacti-templates.googlecode.com/files/better-cacti-templates-1.1.8.tar.gz 
 +===== Benchmark network speed ===== 
 +==== using speedtest ==== 
 +  - Step1: install speedtest on linux:<code bash> 
 +pip install speedtest-cli 
 +</code> 
 +  - Step2: Run test<code bash> 
 +speedtest 
 +</code> 
 +==== network monitor with iptraf ==== 
 +refer: http://www.tecmint.com/real-time-interactive-ip-lan-monitoring-with-iptraf-tool/ 
 +  * Install <code bash> 
 +yum install iptraf 
 +</code> 
 +  * Run normal<code bash> 
 +iptraf 
 +</code> 
 +  * Monitor Traffic on eth0:<code bash> 
 +iptraf -s eth0 
 +</code> 
 +===== Benchmark File System Read Write Performance ===== 
 +refer: http://www.slashroot.in/linux-file-system-read-write-performance-test 
 +==== Using dd command ==== 
 +  * Benchmarck the speed with which **data was cached to RAM memory, not to the disk**<code bash> 
 +dd if=/dev/zero of=speetest bs=1M count=100 
 +</code>output:<code> 
 +100+0 records in 
 +100+0 records out 
 +104857600 bytes (105 MB) copied, 0.102163 s, 1.0 GB/s 
 +</code> 
 +  * Ask dd command to report the speed only **after the data is synced with the disk**<code bash> 
 +dd if=/dev/zero of=speetest bs=1M count=100 conv=fdatasync 
 +</code>output:<code> 
 +100+0 records in 
 +100+0 records out 
 +104857600 bytes (105 MB) copied, 1.12073 s, 93.6 MB/s 
 +</code> 
 +==== Using hdparm ==== 
 +<code bash> 
 +hdparm -tT /dev/sdb1 
 +</code>output:<code> 
 +/dev/sdb1: 
 + Timing cached reads:   12982 MB in  2.00 seconds = 6500.84 MB/sec 
 + Timing buffered disk reads: 346 MB in  3.01 seconds = 115.04 MB/sec 
 +</code>
benchmarking.1411216919.txt.gz · Last modified: 2022/10/29 16:15 (external edit)