### pgbench is a workload generator that is packaged with postgres. It
### is relatively basic and modelled on TPC-B.
###
### In this configuration, the workload is read-only with the pgbench
### default scale factor of 1. This will result in a small database
### suitable for evaluating scheduler decisions. The page cache is not
### flushed after the database is populated for the test and starts
### cache-hot.

export MMTESTS="pgbench"

# Test disk to setup (optional)
#export TESTDISK_RAID_DEVICES=
#export TESTDISK_RAID_MD_DEVICE=/dev/md0
#export TESTDISK_RAID_OFFSET=63
#export TESTDISK_RAID_SIZE=250019532
#export TESTDISK_RAID_TYPE=raid0
#export TESTDISK_PARTITION=/dev/sda6
#export TESTDISK_FILESYSTEM=ext3
#export TESTDISK_MKFS_PARAM="-f -d agcount=8"
#export TESTDISK_MOUNT_ARGS=""

# List of monitors
export RUN_MONITOR=yes
export MONITORS_ALWAYS=
export MONITORS_GZIP="proc-vmstat mpstat top iotop"
export MONITORS_WITH_LATENCY="vmstat iostat"
export MONITOR_PERF_EVENTS=cpu-migrations,context-switches
export MONITOR_UPDATE_FREQUENCY=10

# pgbench
export OLTP_CACHESIZE=$(($MEMTOTAL_BYTES*3/4))
export OLTP_SHAREDBUFFERS=$((MEMTOTAL_BYTES/5))
export OLTP_PAGESIZES="default"
export PGBENCH_MAX_TIME=300
export PGBENCH_READONLY=yes
export PGBENCH_MAX_THREADS=$((NUMCPUS*2))
export PGBENCH_CACHE_COLD=no

# The baseline database size is based on the scale factor.
# Each unit of scaling factor adds approximately 15M of
# data to the table. Tune accordingly.
export TARGET_WORKLOAD_SIZE=
export PGBENCH_SCALE_FACTOR=1
export DATABASE_INIT_ONCE=yes
export MMTESTS_THREAD_CUTOFF=

export TESTDISK_MIN_SIZE=$((OLTP_SHAREDBUFFERS*5/4))
