Sample setup
The server used here is the same one described in the pgbench
chapter. For these examples, initially a small pgbench
database was created with a scale of 100 (one that easily fits into RAM), and the standard mixed test was run:
$ pgbench -i -s 100 pgbench $ pgbench -j 4 -c 8 -T 300 pgbench
This gave approximately 2000 transactions/second. Larger tests with lower TPS values will appear below as well.
Note
If you're using a PostgreSQL earlier than 9.0, you'll have to leave out the -j 4
part of the preceding code to try this yourself, and with the pgbench
examples shown later. Versions before 8.4 won't handle -T 300
either, and you'll have to find a number of substitute transactions to pass using -t
in order to make the test last for a while.
The sample server has the following as its disk layout for the database directories:
pg_xlog
:/dev/sdf1
- data:
/dev/md0
. Linux software RAID 0; individual drives aresdc1
,sdd1
,sde1
You'll need this disk...