Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Apr 2007 14:51:55 -0400
From:      Kevin Way <kevin@insidesystems.net>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        freebsd-performance@freebsd.org
Subject:   Re: Anyone interested in improving postgresql scaling?
Message-ID:  <4625174B.5090208@insidesystems.net>
In-Reply-To: <20070417174825.X42234@fledge.watson.org>
References:  <461B0CD0.8090404@insidesystems.net> <20070417174825.X42234@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a cryptographically signed message in MIME format.

--------------ms000505020807070508040807
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Robert Watson wrote:
>
> On Tue, 10 Apr 2007, Kevin Way wrote:
>
>> Kris Kennaway wrote:
>>> If so, then your task is the following:
>>>
>>> Make SYSV semaphores less dumb about process wakeups.  Currently 
>>> whenever the semaphore state changes, all processes sleeping on the 
>>> semaphore are woken, even if we only have released enough resources 
>>> for one waiting process to claim.  i.e. there is a thundering herd 
>>> wakeup situation which destroys performance at high loads.  Fixing 
>>> this will involve replacing the wakeup() calls with appropriate 
>>> amounts of wakeup_one().
>> Could this cause problem cause a situation where an 8-Core system was 
>> 50-75% slower than an otherwise equivalent 2-Core system?
>>
>> I have a graph of my sysbench/pgsql results here:
>>
>>   http://blog.insidesystems.net/files/sysctl-pgsq-amd64-wtf.png
>>
>> As the graph shows, the 8-core system is about half the speed of the 
>> 2-core system at 2 simultaneous threads, and it decays down to 
>> approximately 1/4 the speed of the 2-core system as the # of threads 
>> hits 5.
>>
>> All other (non-pgsql, non-sysv) tests came back approximately as 
>> expected, but I'm left wondering if I did something wrong, or if 8 
>> cpus are slower than 2, when it comes to Postgres on currently 
>> available FreeBSD.
>>
>> Kevin Way Inside Systems, Inc.
>>
>> (Full detail of what I did is available at: 
>> http://blog.insidesystems.net/articles/2007/04/09/what-did-i-do-wrong )
>
> Would you be able to re-run these tests trying a recent 7.x kernel?  
> If so, make sure you build a non-debugging kernel, and try two 
> variants: one with SCHED_4BSD, and one with SCHED_ULE.
>
> Another experiment that would be interesting is to try using 
> device.hints to disable various numbers of CPUs on your 8-core system, 
> and see how the performance graph changes as the number of enabled 
> CPUs changes.
>
> Robert N M Watson
> Computer Laboratory
> University of Cambridge
I built 7.0 as of 6 days ago, and ran the same test using 8-cores, ULE 
and 4BSD.  The results are available at:

http://blog.insidesystems.net/articles/2007/04/11/postgresql-scaling-on-6-2-and-7-0

Unfortunately, I can't run the additional tests, as the machines in 
question have now been deployed to production.  I should have similar 
equipment available in a few weeks, and will try the other tests at that 
point.

Kevin Way
Inside Systems, Inc.


--------------ms000505020807070508040807
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIMljCC
A2IwggLLoAMCAQICEAvaCxfBP4mOqwl0erTOLjMwDQYJKoZIhvcNAQECBQAwXzELMAkGA1UE
BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAxIFB1Ymxp
YyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk4MDUxMjAwMDAwMFoXDTA4
MDUxMjIzNTk1OVowgcwxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJp
U2lnbiBUcnVzdCBOZXR3b3JrMUYwRAYDVQQLEz13d3cudmVyaXNpZ24uY29tL3JlcG9zaXRv
cnkvUlBBIEluY29ycC4gQnkgUmVmLixMSUFCLkxURChjKTk4MUgwRgYDVQQDEz9WZXJpU2ln
biBDbGFzcyAxIENBIEluZGl2aWR1YWwgU3Vic2NyaWJlci1QZXJzb25hIE5vdCBWYWxpZGF0
ZWQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAo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Ca8ax7tzMpcVgAeZLozTzGI1MIQO
lNh0bcAAqbOQMUFUYnmqUgX7+hmGt19aVkjYpdpJzYYwvMADgsFcVvvEh4UAAAAAAAA=
--------------ms000505020807070508040807--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4625174B.5090208>