I'd start with the benchmark tool that comes with postgresql: pgbench.
pgbench can be used immediately with several pre-set scenario's (e.g. write-heavy, readonly), but it can also be given custom SQL to test your own data/queries.
Or perhaps start right away with Greg Smith's pgbench-tools, which is built on top of pgbench. It produces output in useful series of text, graphs, html. Very nice.
I've heard good things about Tsung but never used it. It would seem that the pgbench-tools are the obvious first thing to run as they require almost no work to get going, and will provide you with a good first idea about your system's performance.
Lots of tuning information in the mailing lists; especially pgsql-performance (and perhaps, pgsql-hackers). The search interface on the postgresql website isn't very good but the mbox files are available too.
(Here is a simple pgbench example, small-scale, readonly. Add command-line connection details if necessary. (this output is from version 9.3devel, 9.2 output is similar (slightly more verbose))).
# initialise small table...
$ pgbench -h /tmp -i -s 10
100000 of 1000000 tuples (10%) done (elapsed 0.10 s, remaining 0.94 s)
200000 of 1000000 tuples (20%) done (elapsed 0.21 s, remaining 0.85 s)
300000 of 1000000 tuples (30%) done (elapsed 0.31 s, remaining 0.71 s)
400000 of 1000000 tuples (40%) done (elapsed 0.40 s, remaining 0.59 s)
500000 of 1000000 tuples (50%) done (elapsed 0.49 s, remaining 0.49 s)
600000 of 1000000 tuples (60%) done (elapsed 0.59 s, remaining 0.39 s)
700000 of 1000000 tuples (70%) done (elapsed 0.68 s, remaining 0.29 s)
800000 of 1000000 tuples (80%) done (elapsed 0.77 s, remaining 0.19 s)
900000 of 1000000 tuples (90%) done (elapsed 0.86 s, remaining 0.10 s)
1000000 of 1000000 tuples (100%) done (elapsed 0.96 s, remaining 0.00
set primary keys...
# readonly, 90 concurrent clients, 5 minutes run
$ pgbench -h /tmp -n -S -T 300 -c 90
transaction type: SELECT only
scaling factor: 10
query mode: simple
number of clients: 90
number of threads: 1
duration: 300 s
number of transactions actually processed: 6905843
tps = 23012.221067 (including connections establishing)
tps = 23044.131737 (excluding connections establishing)
edit: Of course, quite possibly you have to use a much larger initialisation-value (the 'scale', -s, in the init invocation); and the performance obviously gets *much* worse when the tables do not fit in memory anymore or write-mostly is used as opposed to readonly, as above.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||