This repository was archived by the owner on Aug 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -1233,7 +1233,7 @@ function restore_dump() {
1233
1233
docker_exec bash -c " pg_restore -j $CPU_CNT --no-owner --no-privileges -U postgres -d $DB_NAME $MACHINE_HOME /$DB_DUMP_FILENAME " || true
1234
1234
;;
1235
1235
pgbnch)
1236
- docker_exec bash -c " source $MACHINE_HOME /$DB_DUMP_FILENAME ; pgbench -U postgres -i - s \$ PGBENCH_SCALE $DB_NAME " || true
1236
+ docker_exec bash -c " source $MACHINE_HOME /$DB_DUMP_FILENAME ; pgbench \$ INIT -U postgres -s \$ SCALE $DB_NAME " || true
1237
1237
;;
1238
1238
esac
1239
1239
END_TIME=$( date +%s) ;
@@ -1410,7 +1410,10 @@ function execute_workload() {
1410
1410
fi
1411
1411
elif [ " $DB_DUMP_EXT " = " pgbnch" ]; then
1412
1412
msg " Running pgbench..."
1413
- docker_exec bash -c " source $MACHINE_HOME /$DB_DUMP_FILENAME ; pgbench -c \$ PGBENCH_CLIENTS -j \$ PGBENCH_JOBS -t \$ PGBENCH_TRANSACTIONS -U postgres $DB_NAME "
1413
+ docker_exec bash -c << EOF "
1414
+ source $MACHINE_HOME /$DB_DUMP_FILENAME ;
1415
+ pgbench -P \$ PROGRESS -c \$ CLIENTS -j \$ JOBS -t \$ TRANSACTIONS -U postgres $DB_NAME "
1416
+ EOF
1414
1417
else
1415
1418
if ([ ! -z ${WORKLOAD_CUSTOM_SQL+x} ] && [ " $WORKLOAD_CUSTOM_SQL " != " " ]); then
1416
1419
WORKLOAD_CUSTOM_FILENAME=$( basename $WORKLOAD_CUSTOM_SQL )
Original file line number Diff line number Diff line change 1
- export PGBENCH_SCALE="3"
2
- export PGBENCH_CLIENTS="1"
3
- export PGBENCH_JOBS="1"
4
- export PGBENCH_TRANSACTIONS="100"
1
+ # common options for running pgbench under nancy:
2
+
3
+ export INIT="-i" # init to use with pgbench, -i creates standard tables
4
+ export SCALE="50" # "scaling factor" to use when populating tables
5
+ export CLIENTS="5" # number of client sessions to run
6
+ export JOBS="2" # number of concurrent sessions.
7
+ export TRANSACTIONS="10000" # number of "transactions" (see pgbench docs)
8
+ export PROGRESS="1" # progress report interval
9
+
You can’t perform that action at this time.
0 commit comments