public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Poor PostgreSQL scaling on Linux 2.6.25-rc5 (vs 2.6.22)
@ 2008-03-11  6:49 Nick Piggin
  2008-03-11  7:58 ` Ingo Molnar
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Nick Piggin @ 2008-03-11  6:49 UTC (permalink / raw)
  To: Molnar, Ingo, LKML

[-- Attachment #1: Type: text/plain, Size: 1838 bytes --]

Hi,

After investigating the claims of poor MySQL performance on Linux,
I had a look at postgresql with sysbench. This DBMS is even faster
than MySQL and could scale up to more connections with my (as close
as possible) out of the box compile and config. The nice thing
about PostgreSQL is that it has no noticable contention on user
space locks on this workload.

The problem with MySQL contention means that if the scheduler
unluckily chooses to deschedule a lock holder, then you can get
idle time building up on other cores and you can get context switch
cascades as things all pile up onto this heavily contended lock. As
such, it means MySQL is not an ideal candidate for looking at
performance behaviour. I discounted the relatively worse scaling of
MySQL with 2.6.25-rc (than 2.6.22) as such an effect.

PostgreSQL is different. It has zero idle time when running this
workload. It actually scaled "super linearly" on my system here,
from single threaded performance to 8 cores (giving an 8.2x
performance increase)!

So PostgreSQL performance profile is actually much more interesting.
To my dismay, I found that Linux 2.6.25-rc5 performs really badly
after saturating the runqueues and subsequently increasing threads.
2.6.22 drops a little bit, but basically settles near the peak
performance. With 2.6.25-rc5, throughput seems to be falling off
linearly with the number of threads.

Actually, this performance profile sort of matches the MySQL curve,
so while I thought the MySQL numbers may be invalid, actually it
appears to back up the pgsql numbers.

This was with postgresql 8.3; config and kernel config available on
request. Looks very much like a CPU scheduler issue. Please take a
look.

postgres.png contains 2.6.22 vs 2.6.25-rc5. compare.png contains
both of those plus MySQL on 2.6.22 vs 2.6.25-rc5.

Thanks,
Nick

[-- Attachment #2: postgres.png --]
[-- Type: image/png, Size: 3966 bytes --]

[-- Attachment #3: compare.png --]
[-- Type: image/png, Size: 5115 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: Poor PostgreSQL scaling on Linux 2.6.25-rc5 (vs 2.6.22)
@ 2008-03-14 15:42 Xose Vazquez Perez
  0 siblings, 0 replies; 23+ messages in thread
From: Xose Vazquez Perez @ 2008-03-14 15:42 UTC (permalink / raw)
  To: linux-kernel

Cyrus Massoumi wrote:

> FreeBSD does not outperform Linux, it's actually a bit faster according 
> to Nick's tests.
> 
> I cannot comment on BIND and NSD, but SPECjbb looks pretty close and the 
> bad ebizzy performance seems to be an issue with glibc's memory allocator.

DNS test was a request from BIND team:
*BIND 9 performance while serving large zones under update*
<http://new.isc.org/proj/dnsperf/ISC-TN-2008-1.html>

more tests FreeBSD vs. LiNUX at http://jeffr-tech.livejournal.com/

-thanks-

regards,
-- 
so much to do, so little time.

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2008-03-17 10:16 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-11  6:49 Poor PostgreSQL scaling on Linux 2.6.25-rc5 (vs 2.6.22) Nick Piggin
2008-03-11  7:58 ` Ingo Molnar
2008-03-11  8:28   ` Nick Piggin
2008-03-11  9:59     ` Ingo Molnar
2008-03-11 21:07 ` Nicholas Miell
2008-03-11 21:34   ` Cyrus Massoumi
2008-03-11 23:12     ` Nicholas Miell
2008-03-11 23:42       ` Nick Piggin
2008-03-11 23:47       ` Stephen Hemminger
2008-03-12  9:00       ` Zhang, Yanmin
     [not found] ` <20080311102538.GA30551@elte.hu>
     [not found]   ` <20080311120230.GA5386@elte.hu>
2008-03-12  1:21     ` Nick Piggin
2008-03-12  7:58       ` Peter Zijlstra
2008-03-17  0:44         ` Nick Piggin
2008-03-17  5:16           ` Ray Lee
2008-03-17  5:21             ` Willy Tarreau
2008-03-17  7:19               ` Nick Piggin
2008-03-17  8:26                 ` Willy Tarreau
2008-03-17  8:54                   ` Nick Piggin
2008-03-17  9:28                     ` Peter Zijlstra
2008-03-17  9:56                       ` Nick Piggin
2008-03-17 10:16                       ` Ingo Molnar
2008-03-17  5:34             ` Nick Piggin
  -- strict thread matches above, loose matches on Subject: below --
2008-03-14 15:42 Xose Vazquez Perez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox