benchmarking
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
benchmarking [2014/09/20 06:49] – created admin | benchmarking [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:< | * 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 250 -c 15 http:// | + | ab -n 100 -c 4 http:// |
</ | </ | ||
- | Benchmarking shop.babies.vn (be patient) | + | This is ApacheBench, |
- | Completed 100 requests | + | Copyright 1996 Adam Twiss, Zeus Technology Ltd, http:// |
- | Completed 200 requests | + | Licensed to The Apache Software Foundation, http:// |
- | Finished 250 requests | + | |
+ | Benchmarking shop.babies.vn (be patient).....done | ||
Line 24: | Line 27: | ||
Document Path: / | Document Path: / | ||
- | Document Length: | + | Document Length: |
- | Concurrency Level: | + | Concurrency Level: |
- | Time taken for tests: | + | Time taken for tests: |
- | Complete requests: | + | Complete requests: |
- | Failed requests: | + | Failed requests: |
- | | + | |
Write errors: | Write errors: | ||
- | Non-2xx responses: | + | Non-2xx responses: |
- | Total transferred: | + | Total transferred: |
- | HTML transferred: | + | HTML transferred: |
- | Requests per second: | + | Requests per second: |
- | Time per request: | + | Time per request: |
- | Time per request: | + | Time per request: |
- | Transfer rate: | + | Transfer rate: |
Connection Times (ms) | Connection Times (ms) | ||
min mean[+/-sd] median | min mean[+/-sd] median | ||
- | Connect: | + | Connect: |
- | Processing: | + | Processing: |
- | Waiting: | + | Waiting: |
- | Total: | + | Total: |
Percentage of the requests served within a certain time (ms) | Percentage of the requests served within a certain time (ms) | ||
- | 50% 9803 | + | 50% 2397 |
- | 66% 14587 | + | 66% 2485 |
- | 75% 16724 | + | 75% 2639 |
- | 80% 18510 | + | 80% 2664 |
- | 90% 20675 | + | 90% 2925 |
- | 95% 22680 | + | 95% 3002 |
- | 98% 24940 | + | 98% 3834 |
- | 99% 25740 | + | 99% 3861 |
- | | + | |
</ | </ | ||
===== Benchmark with sysbench(CPU, | ===== Benchmark with sysbench(CPU, | ||
Line 115: | 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 143: | 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 176: | 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.1411195788.txt.gz · Last modified: 2022/10/29 16:15 (external edit)