- This is the general syntax to run a pgbench benchmarking test:
Syntax:
pgbench [-h hostname] [-p port] [-c nclients] [-t ntransactions] [-s scaling_factor] [-D varname=value] [-n] [-C] [-v] [-S] [-N] [-f filename] [-j threads] [-l] [-U login] [-d] [dbname]
We'll see the following parameters:
- nclients: Client number – default 1
- ntransactions: Transactions per client – default 10
- varname=value: Defined variable referred to by the file script
- -n: novacuuming – cleaning the history table before testingÂ
- -C: One connection for each transaction
- -v: Vacuuming before testing
- -S: Only SELECT transactions
- -N: No updates on the pgbench_branches and pgbench_tellers tables
- filename: Read the transaction script from a specified SQL file
- threads: The number of worker threads
- -l: Write the time of each transaction to a pgbench_log file
- Hence we can create a small load of 50 users. Each user...