Install
apt-get install postgresql postgresql-contrib
Create DB
su - postgres
psql
CREATE DATABASE example
Init pgbench
pgbench -i -s 50 example
Create Baseline
pgbench -c 10 -j 2 -t 10000 example
c = number of clients j = pgbench worker process t = number of transactions to execute
To summarize, the baseline test run was two pgbench worker processes simulating 10,000 transactions from 10 clients for a total of 100,000 transactions.
Sample Result:
starting vacuum...end.
transaction type: TPC-B (sort of)
scaling factor: 50
query mode: simple
number of clients: 10
number of threads: 2
number of transactions per client: 10000
number of transactions actually processed: 100000/100000
latency average: 4.176 ms
tps = 2394.718707 (including connections establishing)
tps = 2394.874350 (excluding connections establishing)
Note: Increase shared_buffers to increase TPS