SysBench: Unterschied zwischen den Versionen

Aus Info-Theke
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „Kategorie:ServerApplication = Zielsetzung = Ermöglicht Benchmarks für FileIO, CPU, Datenbanken. = Installation = <syntaxhighlight> apt install sysbench…“)
 
 
(4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 5: Zeile 5:


= Installation =
= Installation =
<syntaxhighlight>
<syntaxhighlight lang="bash">
apt install sysbench
apt install sysbench
</syntaxhighlight>
</syntaxhighlight>


= Benchmarks =
= Benchmarks =
<syntaxhighlight>
<syntaxhighlight lang="bash">
sysbench --test=cpu --cpu-max-prime=20000 --threads=8 run
THREADS=8
sysbench --test=cpu --cpu-max-prime=20000 --threads=$THREADS run


SIZE=150G
SIZE=150G
THREADS=8
sysbench --test=fileio --file-total-size=$SIZE prepare
sysbench --test=fileio --file-total-size=$SIZE prepare
sysbench --test=fileio --file-total-size=$SIZE --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run
sysbench --test=fileio --file-total-size=$SIZE --threads=$THREADS \
sysbench --test=fileio --file-total-size=$SIZE cleanup
  --file-test-mode=rndrw --rand-seed=0 --time=300 --max-requests=0 run
sysbench --file-total-size=$SIZE cleanup


PW=Geheim
DB=dbtest
DB=dbtest
DBUSER=forum
DBUSER=forum
PW=Geheim
ITEMS=10000
SIZE=1000000
TABLES=16
THREADS=8
THREADS=8
sysbench --test=oltp --oltp-table-size=$SIZE --db-driver=mysql \
sysbench /usr/share/sysbench/oltp_read_write.lua --table-size=$ITEMS --tables=$TABLES --db-driver=mysql \
   --mysql-db=$DB --mysql-user=$DBUSER "--mysql-password=$PW" prepare
   --mysql-db=$DB --mysql-user=$DBUSER "--mysql-password=$PW" prepare
sysbench --test=oltp --oltp-table-size=$SIZE --db-driver=mysql \
sysbench /usr/share/sysbench/oltp_read_write.lua --table-size=$ITEMS --tables=$TABLES --db-driver=mysql \
   --mysql-db=$DB --mysql-user=$DBUSER "--mysql-password=$PW" --max-time=60 \
   --mysql-db=$DB --mysql-user=$DBUSER "--mysql-password=$PW" --time=60 \
   --oltp-read-only=on --max-requests=0 --num-threads=$THREADS run
   --max-requests=0 --threads=$THREADS run > /tmp/sysbench.mysql.txt
sysbench --test=oltp --db-driver=mysql \
echo "=== cat /tmp/sysbench.mysql.txt"
sysbench /usr/share/sysbench/oltp_read_write.lua --table-size=$ITEMS --tables=$TABLES --db-driver=mysql \
   --mysql-db=$DB --mysql-user=$DBUSER "--mysql-password=$PW" cleanup
   --mysql-db=$DB --mysql-user=$DBUSER "--mysql-password=$PW" cleanup
PW=Geheim
DB=dbtest
DBUSER=forum
ITEMS=10000
TABLES=16
THREADS=8
sysbench /usr/share/sysbench/oltp_read_write.lua --random-seed=4711 --table-size=$ITEMS --tables=$TABLES --db-driver=pgsql \
  --pgsql-db=$DB --pgsql-user=$DBUSER "--pgsql-password=$PW" prepare
sysbench /usr/share/sysbench/oltp_read_write.lua --random-seed=4711 --table-size=$ITEMS --tables=$TABLES --db-driver=pgsql \
  --pgsql-db=$DB --pgsql-user=$DBUSER "--pgsql-password=$PW" --time=60 \
  --max-requests=0 --threads=$THREADS run > /tmp/sysbench.pg.txt
echo "=== cat /tmp/sysbench.pg.txt"
sysbench /usr/share/sysbench/oltp_read_write.lua --table-size=$ITEMS --tables=$TABLES --db-driver=pgsql \
  --pgsql-db=$DB --pgsql-user=$DBUSER "--pgsql-password=$PW" cleanup
</syntaxhighlight>
</syntaxhighlight>

Aktuelle Version vom 11. Januar 2022, 06:32 Uhr


Zielsetzung[Bearbeiten]

Ermöglicht Benchmarks für FileIO, CPU, Datenbanken.

Installation[Bearbeiten]

apt install sysbench

Benchmarks[Bearbeiten]

THREADS=8
sysbench --test=cpu --cpu-max-prime=20000 --threads=$THREADS run

SIZE=150G
THREADS=8
sysbench --test=fileio --file-total-size=$SIZE prepare
sysbench --test=fileio --file-total-size=$SIZE --threads=$THREADS \
  --file-test-mode=rndrw --rand-seed=0 --time=300 --max-requests=0 run
sysbench --file-total-size=$SIZE cleanup

PW=Geheim
DB=dbtest
DBUSER=forum
ITEMS=10000
TABLES=16
THREADS=8
sysbench /usr/share/sysbench/oltp_read_write.lua --table-size=$ITEMS --tables=$TABLES --db-driver=mysql \
  --mysql-db=$DB --mysql-user=$DBUSER "--mysql-password=$PW" prepare
sysbench /usr/share/sysbench/oltp_read_write.lua --table-size=$ITEMS --tables=$TABLES --db-driver=mysql \
  --mysql-db=$DB --mysql-user=$DBUSER "--mysql-password=$PW" --time=60 \
  --max-requests=0 --threads=$THREADS run > /tmp/sysbench.mysql.txt
echo "=== cat /tmp/sysbench.mysql.txt"
sysbench /usr/share/sysbench/oltp_read_write.lua --table-size=$ITEMS --tables=$TABLES --db-driver=mysql \
  --mysql-db=$DB --mysql-user=$DBUSER "--mysql-password=$PW" cleanup

PW=Geheim
DB=dbtest
DBUSER=forum
ITEMS=10000
TABLES=16
THREADS=8
sysbench /usr/share/sysbench/oltp_read_write.lua --random-seed=4711 --table-size=$ITEMS --tables=$TABLES --db-driver=pgsql \
  --pgsql-db=$DB --pgsql-user=$DBUSER "--pgsql-password=$PW" prepare
sysbench /usr/share/sysbench/oltp_read_write.lua --random-seed=4711 --table-size=$ITEMS --tables=$TABLES --db-driver=pgsql \
  --pgsql-db=$DB --pgsql-user=$DBUSER "--pgsql-password=$PW" --time=60 \
  --max-requests=0 --threads=$THREADS run > /tmp/sysbench.pg.txt
echo "=== cat /tmp/sysbench.pg.txt"
sysbench /usr/share/sysbench/oltp_read_write.lua --table-size=$ITEMS --tables=$TABLES --db-driver=pgsql \
  --pgsql-db=$DB --pgsql-user=$DBUSER "--pgsql-password=$PW" cleanup