X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D2CF19FA5CE for ; Tue, 13 Jun 2006 19:56:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 39857-10 for ; Tue, 13 Jun 2006 19:56:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp1.ActiveState.com (gw.activestate.com [209.17.183.249]) by postgresql.org (Postfix) with ESMTP id 67E369FA38F for ; Tue, 13 Jun 2006 19:56:52 -0300 (ADT) Received: from smtp3.activestate.com (smtp3.activestate.com [192.168.3.19]) by smtp1.ActiveState.com (8.12.10/8.12.10) with ESMTP id k5DMuoWJ010911 for ; Tue, 13 Jun 2006 15:56:50 -0700 (envelope-from mischa@ca.sophos.com) Received: from [192.168.99.210] (mallet.activestate.com [192.168.99.210]) by smtp3.ActiveState.com (8.13.4/8.13.4) with ESMTP id k5DMuoj3014942 for ; Tue, 13 Jun 2006 15:56:50 -0700 (envelope-from mischa@ca.sophos.com) Message-ID: <448F449A.6030900@ca.sophos.com> Date: Tue, 13 Jun 2006 16:04:58 -0700 From: Mischa Sandberg Reply-To: mischa@ca.sophos.com User-Agent: Thunderbird 1.5.0.4 (X11/20060516) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Solaris shared_buffers anomaly? References: <1150151282.14661.42.camel@tigger> <20060613000441.GI8588@kenobi.snowman.net> <20060613200810.GZ34196@pervasive.com> <448F3A6E.6080908@ca.sophos.com> <11046.1150237327@sss.pgh.pa.us> In-Reply-To: <11046.1150237327@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/226 X-Sequence-Number: 19583 Tom Lane wrote: > Mischa Sandberg writes: >> vmstat showed that it was swapping like crazy. >> Dropped shared_buffers back down again. >> Swapping stopped. > > Does Solaris have any call that allows locking a shmem segment in RAM? Yes, mlock(). But want to understand what's going on before patching. No reason to believe that the multiply-attached shm seg was being swapped out (which is frankly insane). Swapping out (and in) just the true resident set of every backend would be enough to explain the vmstat io we saw. http://www.carumba.com/talk/random/swol-09-insidesolaris.html For a dedicated DB server machine, Solaris has a feature: create "intimate" shared memory with shmat(..., SHM_SHARE_MMU). All backends share the same TLB entries (!). Context switch rates on our in-house solaris boxes running PG have been insane (4000/sec). Reloading the TLB map on every process context switch might be one reason Solaris runs our db apps at less than half the speed of our perftesters' Xeon beige-boxes. That's guesswork. Sun is making PG part of their distro ... perhaps they've some knowledgeable input. -- Engineers think that equations approximate reality. Physicists think that reality approximates the equations. Mathematicians never make the connection.