On Tue, Apr 12, 2011 at 11:01 AM, Glyn Astill <glynastill@xxxxxxxxxxx> wrote: > --- On Tue, 12/4/11, Merlin Moncure <mmoncure@xxxxxxxxx> wrote: > >> >>> Can we see some iobound and cpubound pgbench >> runs on both >> >>> servers? >> >>> >> >> >> >> Of course, I'll post when I've gotten to that. >> > >> > Ok, there's no writing going on -- so the i/o tets >> aren't necessary. >> > Context switches are also not too high -- the problem >> is likely in >> > postgres or on your end. >> > >> > However, I Would still like to see: >> > pgbench select only tests: >> > pgbench -i -s 1 >> > pgbench -S -c 8 -t 500 >> > pgbench -S -c 32 -t 500 >> > pgbench -S -c 80 -t 500 >> > >> > pgbench -i -s 500 >> > pgbench -S -c 8 -t 500 >> > pgbench -S -c 32 -t 500 >> > pgbench -S -c 80 -t 500 >> > >> > write out bench.sql with: >> > begin; >> > select * from heavy_seat_function(); >> > select * from heavy_seat_function(); >> > commit; >> > >> > pgbench -n bench.sql -c 8 -t 500 >> > pgbench -n bench.sql -c 8 -t 500 >> > pgbench -n bench.sql -c 8 -t 500 >> >> whoops: >> pgbench -n bench.sql -c 8 -t 500 >> pgbench -n bench.sql -c 32 -t 500 >> pgbench -n bench.sql -c 80 -t 500 >> >> merlin >> > > Right, here they are: > > http://www.privatepaste.com/3dd777f4db your results unfortunately confirmed the worst -- no easy answers on this one :(. Before breaking out the profiler, can you take some random samples of: select count(*) from pg_stat_activity where waiting; to see if you have any locking issues? Also, are you sure your function executions are relatively free of side effects? I can take a look at the code off list if you'd prefer to keep it discrete. merlin -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance