Re: Linux: more cores = less concurrency.

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, david(at)lang(dot)hm, Steve Clark <sclark(at)netwolves(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Linux: more cores = less concurrency.
Date: 2011-04-12 16:12:37
Message-ID: BANLkTikTeCuzKdGfE3+EbMcC7Ry+U5Q2=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Apr 12, 2011 at 11:01 AM, Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk> wrote:
> --- On Tue, 12/4/11, Merlin Moncure <mmoncure(at)gmail(dot)com> 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Ogden 2011-04-12 16:36:19 Performance
Previous Message Glyn Astill 2011-04-12 16:07:00 Re: Linux: more cores = less concurrency.