benchmarking
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
benchmarking [2014/09/20 12:41] – [examples] admin | benchmarking [2016/03/15 10:45] – [network monitor with iptraf] admin | ||
---|---|---|---|
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:< | * Syntax:< | ||
Line 9: | Line 10: | ||
* -n requests | * -n requests | ||
* -c concurrency | * -c concurrency | ||
+ | |||
=== examples === | === examples === | ||
- | * run benchmark website shop.babies.vn with 250 requests and 15 concurrency multiple requests:< | + | * run benchmark website shop.babies.vn with 100 requests and 4 concurrency multiple requests:< |
ab -n 100 -c 4 http:// | ab -n 100 -c 4 http:// | ||
</ | </ | ||
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 | ||
</ | </ | ||
- | sysbench 0.4.12.5: | ||
- | |||
- | 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: | sysbench 0.4.12.5: | ||
Line 144: | Line 141: | ||
Done. | Done. | ||
- | Operations performed: | + | Operations performed: |
- | Read 3.7119Gb | + | Read 10.698Gb |
- | 1351.45 Requests/ | + | 3894.99 Requests/ |
Test execution summary: | Test execution summary: | ||
- | total time: 300.0014s | + | total time: 300.0011s |
- | total number of events: | + | total number of events: |
- | total time taken by event execution: | + | total time taken by event execution: |
per-request statistics: | per-request statistics: | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
Threads fairness: | Threads fairness: | ||
- | events (avg/ | + | events (avg/ |
- | execution time (avg/ | + | execution time (avg/ |
</ | </ | ||
- | Read 3.7119Gb | + | Read 10.698Gb |
</ | </ | ||
- Step3: Cleanup< | - Step3: Cleanup< | ||
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 | ||
</ | </ | ||
+ | ===== Benchmark with graphing software ===== | ||
+ | ==== Better Cacti Templates ==== | ||
+ | Download: wget https:// | ||
+ | ===== Benchmark network speed ===== | ||
+ | ==== using speedtest ==== | ||
+ | - Step1: install speedtest on linux:< | ||
+ | pip install speedtest-cli | ||
+ | </ | ||
+ | - Step2: Run test< | ||
+ | speedtest | ||
+ | </ | ||
+ | ==== network monitor with iptraf ==== | ||
+ | refer: http:// | ||
+ | * Install <code bash> | ||
+ | yum install iptraf | ||
+ | </ | ||
+ | * Run normal< | ||
+ | iptraf | ||
+ | </ | ||
+ | * Monitor Traffic on eth0:< | ||
+ | iptraf -s eth0 | ||
+ | </ | ||
+ | ===== Benchmark File System Read Write Performance ===== | ||
+ | refer: http:// | ||
+ | ==== Using dd command ==== | ||
+ | * Benchmarck the speed with which **data was cached to RAM memory, not to the disk**< | ||
+ | dd if=/ | ||
+ | </ | ||
+ | 100+0 records in | ||
+ | 100+0 records out | ||
+ | 104857600 bytes (105 MB) copied, 0.102163 s, 1.0 GB/s | ||
+ | </ | ||
+ | * Ask dd command to report the speed only **after the data is synced with the disk**< | ||
+ | dd if=/ | ||
+ | </ | ||
+ | 100+0 records in | ||
+ | 100+0 records out | ||
+ | 104857600 bytes (105 MB) copied, 1.12073 s, 93.6 MB/s | ||
+ | </ | ||
+ | ==== Using hdparm ==== | ||
+ | <code bash> | ||
+ | hdparm -tT /dev/sdb1 | ||
+ | </ | ||
+ | / | ||
+ | | ||
+ | | ||
+ | </ |
benchmarking.txt · Last modified: 2022/10/29 16:15 by 127.0.0.1