#!/bin/bash : ${SRCTREE=/mariadb/11.0} : ${MDIR=/dev/shm/11.0} : ${TDIR=/mariadb/sbtest} LD_LIBRARY_PATH="$MDIR/libmysql" MYSQL_SOCK=$TDIR/mysqld.sock MYSQL_USER=root : ${BENCH_TIME=60} : ${BENCH_THREADS="128"} SYSBENCH_PARAMS="\ --mysql-socket=$MYSQL_SOCK \ --mysql-user=$MYSQL_USER \ --mysql-db=test \ --percentile=99 \ --tables=250 --table_size=25000 \ --rand-seed=42 --rand-type=uniform --max-requests=0 \ --time=$BENCH_TIME --report-interval=5" SYSBENCH="sysbench /usr/share/sysbench/oltp_update_non_index.lua $SYSBENCH_PARAMS" : ${PFS=off} rm -rf "$TDIR" cd $MDIR sh scripts/mariadb-install-db --user="$USERNAME" --srcdir="$SRCTREE" --builddir=. --datadir="$TDIR" --auth-root-authentication-method=normal --innodb-use-scn=ON cd ../ #numactl --cpunodebind 1 --localalloc \ $MDIR/sql/mariadbd-scn --no-defaults --gdb --core-file --loose-debug-sync-timeout=300 --innodb \ --datadir="$TDIR" --lc-messages-dir=./$MDIR/sql/share/ --socket=$MYSQL_SOCK \ --innodb_log_file_size=4g\ --innodb_buffer_pool_size=16g \ --innodb_flush_log_at_trx_commit=0 \ --innodb-use-scn=ON \ --innodb-fast-shutdown=0 \ --innodb-flush-neighbors=0 \ --innodb-purge-batch-size=5000 --innodb-purge-threads=32 \ --max-connections=300 \ --max-prepared-stmt-count=1000000000 \ \ --aria-checkpoint-interval=0 > "$TDIR"/mysqld.err 2>&1 & timeo=600 echo -n "waiting for server to come up " while [ $timeo -gt 0 ] do $MDIR/client/mariadb-admin -S $MYSQL_SOCK -u $MYSQL_USER -b -s ping && break echo -n "." timeo=$(($timeo - 1)) sleep 1 done if [ $timeo -eq 0 ] then echo " server not starting! Abort!" break fi #numactl --cpunodebind 0 --localalloc \ $SYSBENCH prepare #numactl --cpunodebind 0 --localalloc \ $SYSBENCH --threads=$BENCH_THREADS run & sysbench /usr/share/sysbench/oltp_point_select.lua $SYSBENCH_PARAMS \ --threads=$BENCH_THREADS run wait %?sysbench #$SYSBENCH cleanup $MDIR/client/mariadb-admin -u $MYSQL_USER -S $MYSQL_SOCK shutdown