Linux/Benchmarks: Difference between revisions
< Linux
No edit summary |
m (→CPU) |
||
(56 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
* bonnie++ | == Install == | ||
* | <pre> | ||
sudo apt install bonnie++ | |||
sudo apt install fio | |||
sudo apt install sysbench | |||
sudo apt install stress-ng | |||
</pre> | |||
== HDD & SSD == | |||
* bonnie++ | |||
<pre> | |||
sudo bonnie -d /mnt/hdd -s 4000 -u root | |||
</pre> | |||
* fio | |||
:* Read 4k Throughput | |||
<pre> | |||
sudo fio --name=read_throughput --directory=fiotest --numjobs=16 --size=1G --time_based \ | |||
--runtime=30s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=4k --iodepth=64 --rw=read \ | |||
--group_reporting=1 --iodepth_batch_submit=64 --iodepth_batch_complete_max=64 --unlink=1 | |||
</pre> | |||
:* Read 1M Throughput | |||
<pre> | |||
sudo fio --name=read_throughput --directory=fiotest --numjobs=16 --size=1G --time_based \ | |||
--runtime=30s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=1M --iodepth=64 --rw=read \ | |||
--group_reporting=1 --iodepth_batch_submit=64 --iodepth_batch_complete_max=64 --unlink=1 | |||
</pre> | |||
:* Write 4k Throughput | |||
<pre> | |||
sudo fio --name=write_throughput --directory=fiotest --numjobs=16 --size=1G --time_based \ | |||
--runtime=30s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=4k --iodepth=64 --rw=write \ | |||
--group_reporting=1 --iodepth_batch_submit=64 --iodepth_batch_complete_max=64 --unlink=1 | |||
</pre> | |||
:* Write 1M Throughput | |||
<pre> | |||
sudo fio --name=write_throughput --directory=fiotest --numjobs=16 --size=1G --time_based \ | |||
--runtime=30s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=1M --iodepth=64 --rw=write \ | |||
--group_reporting=1 --iodepth_batch_submit=64 --iodepth_batch_complete_max=64 --unlink=1 | |||
</pre> | |||
:* Read IOPS | |||
<pre> | |||
sudo fio --name=read_iops --directory=fiotest --size=1G --time_based --runtime=30s --ramp_time=2s \ | |||
--ioengine=libaio --direct=1 --verify=0 --bs=4K --iodepth=256 --rw=randread --group_reporting=1 \ | |||
--iodepth_batch_submit=256 --iodepth_batch_complete_max=256 --unlink=1 | |||
</pre> | |||
:* Write IOPS | |||
<pre> | |||
sudo fio --name=write_iops --directory=fiotest --size=1G --time_based --runtime=30s --ramp_time=2s \ | |||
--ioengine=libaio --direct=1 --verify=0 --bs=4K --iodepth=256 --rw=randwrite --group_reporting=1 \ | |||
--iodepth_batch_submit=256 --iodepth_batch_complete_max=256 --unlink=1 | |||
</pre> | |||
* | == CPU == | ||
* Sysbench Singlecore | |||
<pre> | <pre> | ||
sysbench cpu --cpu-max-prime=24576 --num-threads=1 run | |||
</pre> | |||
* Sysbench RAM bandwidth | |||
sysbench -- | <pre> | ||
sysbench memory --memory-total-size=20000M run | |||
</pre> | </pre> | ||
* stress-ng | * stress-ng | ||
<pre> | <pre> | ||
stress-ng --cpu 1 --cpu-method matrixprod --metrics-brief --perf -t 60 | |||
</pre> | |||
* sysbench (generals systembenchmark) [http://www.howtoforge.de/anleitung/benchmark-ihres-systems-cpu-daten-io-mysql-durchfuhren-mit-sysbench/] | |||
== Mysql == | |||
<pre> | |||
prepare (ca. 2GB data): | |||
sysbench --db-driver=mysql --mysql-host='vm-docker' --mysql-db=maria --mysql-user=maria --mysql-password=maria --tables=16 --table-size=1000000 /usr/share/sysbench/oltp_read_write.lua prepare | |||
benchmark: | |||
sysbench --db-driver=mysql --mysql-host='vm-docker' --mysql-db=maria --mysql-user=maria --mysql-password=maria --tables=16 --table-size=1000000 --threads=8 --time=60 --events=0 --report-interval=2 /usr/share/sysbench/oltp_read_write.lua run | |||
</pre> | </pre> | ||
== Links == | |||
* https://techjunkies.blog/code/hetzner-oder-netcup-vserver-benchmark-und-erfahrungen-vps/ | |||
[[Category:Linux/System]] | [[Category:Linux/System]] | ||
[[Category:Linux]] | [[Category:Linux]] |
Latest revision as of 19:34, 26 October 2024
Install
sudo apt install bonnie++ sudo apt install fio sudo apt install sysbench sudo apt install stress-ng
HDD & SSD
- bonnie++
sudo bonnie -d /mnt/hdd -s 4000 -u root
- fio
- Read 4k Throughput
sudo fio --name=read_throughput --directory=fiotest --numjobs=16 --size=1G --time_based \ --runtime=30s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=4k --iodepth=64 --rw=read \ --group_reporting=1 --iodepth_batch_submit=64 --iodepth_batch_complete_max=64 --unlink=1
- Read 1M Throughput
sudo fio --name=read_throughput --directory=fiotest --numjobs=16 --size=1G --time_based \ --runtime=30s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=1M --iodepth=64 --rw=read \ --group_reporting=1 --iodepth_batch_submit=64 --iodepth_batch_complete_max=64 --unlink=1
- Write 4k Throughput
sudo fio --name=write_throughput --directory=fiotest --numjobs=16 --size=1G --time_based \ --runtime=30s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=4k --iodepth=64 --rw=write \ --group_reporting=1 --iodepth_batch_submit=64 --iodepth_batch_complete_max=64 --unlink=1
- Write 1M Throughput
sudo fio --name=write_throughput --directory=fiotest --numjobs=16 --size=1G --time_based \ --runtime=30s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=1M --iodepth=64 --rw=write \ --group_reporting=1 --iodepth_batch_submit=64 --iodepth_batch_complete_max=64 --unlink=1
- Read IOPS
sudo fio --name=read_iops --directory=fiotest --size=1G --time_based --runtime=30s --ramp_time=2s \ --ioengine=libaio --direct=1 --verify=0 --bs=4K --iodepth=256 --rw=randread --group_reporting=1 \ --iodepth_batch_submit=256 --iodepth_batch_complete_max=256 --unlink=1
- Write IOPS
sudo fio --name=write_iops --directory=fiotest --size=1G --time_based --runtime=30s --ramp_time=2s \ --ioengine=libaio --direct=1 --verify=0 --bs=4K --iodepth=256 --rw=randwrite --group_reporting=1 \ --iodepth_batch_submit=256 --iodepth_batch_complete_max=256 --unlink=1
CPU
- Sysbench Singlecore
sysbench cpu --cpu-max-prime=24576 --num-threads=1 run
- Sysbench RAM bandwidth
sysbench memory --memory-total-size=20000M run
- stress-ng
stress-ng --cpu 1 --cpu-method matrixprod --metrics-brief --perf -t 60
- sysbench (generals systembenchmark) [1]
Mysql
prepare (ca. 2GB data): sysbench --db-driver=mysql --mysql-host='vm-docker' --mysql-db=maria --mysql-user=maria --mysql-password=maria --tables=16 --table-size=1000000 /usr/share/sysbench/oltp_read_write.lua prepare benchmark: sysbench --db-driver=mysql --mysql-host='vm-docker' --mysql-db=maria --mysql-user=maria --mysql-password=maria --tables=16 --table-size=1000000 --threads=8 --time=60 --events=0 --report-interval=2 /usr/share/sysbench/oltp_read_write.lua run