X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4854032A039 for ; Wed, 6 Oct 2004 16:45:39 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 49427-03 for ; Wed, 6 Oct 2004 15:45:35 +0000 (GMT) Received: from snowwhite.lulu.com (mail.lulu.com [66.193.5.50]) by svr1.postgresql.org (Postfix) with ESMTP id F136F329DB1 for ; Wed, 6 Oct 2004 16:45:33 +0100 (BST) Received: from [10.0.0.32] (meatwad.rdu.lulu.com [10.0.0.32]) (authenticated bits=0) by snowwhite.lulu.com (8.12.8/8.12.8) with ESMTP id i96FkJbO002919 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Wed, 6 Oct 2004 11:46:19 -0400 Message-ID: <4164131A.6080601@lulu.com> Date: Wed, 06 Oct 2004 11:45:30 -0400 From: Bill Montgomery User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Excessive context switching on SMP Xeons References: <4162CA14.6080206@lulu.com> <200410050947.36174.josh@agliodbs.com> <41630D50.3020308@lulu.com> <200410051538.51664.josh@agliodbs.com> In-Reply-To: <200410051538.51664.josh@agliodbs.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/59 X-Sequence-Number: 8535 Josh Berkus wrote: >>I'd be thrilled to test it too, if for no other reason that to determine >>whether what I'm experiencing really is the "CS problem". >> >> > >Hmmm ... Gavin's patch is built against 8.0, and any version of the patch >would require linux 2.6, probably 2.6.7 minimum. Can you test on that linux >version? Do you have the resources to back-port Gavin's patch? > > I don't currently have any SMP Xeon systems running a 2.6 kernel, but it could be arranged. As for back-porting the patch to 7.4.5, probably so, but I'd have to see it first. >>tps = 369.717832 (including connections establishing) >>tps = 370.852058 (excluding connections establishing) >> >> > >Doesn't seem too bad to me. Have anything to compare it to? > > Yes, about 280 tps on the same machine with the data directory on a 3-disk RAID 5 w/ a 128MB cache, rather than the SSD. I was expecting a much larger increase, given that the RAID does about 3MB/s of random 8k writes, and the SSD device does about 70MB/s of random 8k writes. Said differently, I thought my CPU bottleneck would be much higher, as to allow for more than a 30% increase in pgbench TPS when I took the IO bottleneck out of the equation. (That said, I'm not tuning for pgbench, but it is a useful comparison that everyone on the list is familiar with, and takes out the possibility that my app just has a bunch of poorly written queries). >What's in your postgresql.conf? > > Some relevant parameters: shared_buffers = 16384 sort_mem = 2048 vacuum_mem = 16384 max_fsm_pages = 200000 max_fsm_relations = 10000 fsync = true wal_sync_method = fsync wal_buffers = 32 checkpoint_segments = 6 effective_cache_size = 262144 random_page_cost = 0.25 Everything else is left at the default (or not relevant to this post). Anything blatantly stupid in there for my setup? Thanks, Bill Montgomery