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 7A7C73A432F for ; Wed, 19 Jan 2005 17:04:39 +0000 (GMT) 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 16317-01 for ; Wed, 19 Jan 2005 17:04:29 +0000 (GMT) Received: from unicorn.rentec.com (unicorn.rentec.com [216.223.240.9]) by svr1.postgresql.org (Postfix) with ESMTP id D58F23A4368 for ; Wed, 19 Jan 2005 17:04:26 +0000 (GMT) Received: from ram.rentec.com (mailhost [192.5.35.66]) by unicorn.rentec.com (8.13.1/8.12.1) with ESMTP id j0JH4L6O000973 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 19 Jan 2005 12:04:22 -0500 (EST) X-Rentec: external Received: from [172.26.132.145] (hoopoe.rentec.com [172.26.132.145]) by ram.rentec.com (8.13.1/8.12.1) with ESMTP id j0JH4LbF005471; Wed, 19 Jan 2005 12:04:21 -0500 (EST) Message-ID: <41EE9315.2010707@rentec.com> Date: Wed, 19 Jan 2005 12:04:21 -0500 From: Alan Stange Reply-To: stange@rentec.com Organization: Renaissance Technologies Corp. User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Schroeder Cc: pgsql-performance@postgresql.org Subject: Re: Swapping on Solaris References: <042a01c4fdaf$fbb3b860$0200a8c0@WORKSTATION> <41EE0F05.9080901@coretech.co.nz> <41EE65FC.2000909@rentec.com> <00d601c4fe33$89682eb0$0200a8c0@WORKSTATION> <41EE7D19.4060503@rentec.com> <014801c4fe3d$2a2478f0$0200a8c0@WORKSTATION> In-Reply-To: <014801c4fe3d$2a2478f0$0200a8c0@WORKSTATION> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200501/246 X-Sequence-Number: 9936 Kevin Schroeder wrote: > I may be asking the question the wrong way, but when I start up > PostgreSQL swap is what gets used the most of. I've got 1282MB free > RAM right now and and 515MB swap in use. Granted, swap file usage > probably wouldn't be zero, but I would guess that it should be a lot > lower so something must be keeping PostgreSQL from using the free RAM > that my system is reporting. For example, one of my postgres > processes is 201M in size but on 72M is resident in RAM. That extra > 130M is available in RAM, according to top, but postgres isn't using it. The test you're doing doesn't measure what you think you're measuring. First, what else is running on the machine? Note that some shared memory allocations do reserve backing pages in swap, even though the pages aren't currently in use. Perhaps this is what you're measuring? "swap -s" has better numbers than top. You'd be better by trying a reboot then starting pgsql and seeing what memory is used. Just because you start a process and see the swap number increase doesn't mean that the new process is in swap. It means some anonymous pages had to be evicted to swap to make room for the new process or some pages had to be reserved in swap for future use. Typically a new process won't be paged out unless something else is causing enormous memory pressure... -- Alan