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 3A006D1B196 for ; Fri, 16 Jul 2004 04:35:44 -0300 (ADT) 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 88479-05 for ; Fri, 16 Jul 2004 07:35:40 +0000 (GMT) Received: from bayswater1.ymogen.net (host-154-240-27-217.pobox.net.uk [217.27.240.154]) by svr1.postgresql.org (Postfix) with ESMTP id 0739CD1B18F for ; Fri, 16 Jul 2004 04:35:36 -0300 (ADT) Received: from solent (82-68-95-1.dsl.in-addr.zen.co.uk [82.68.95.1]) by bayswater1.ymogen.net (Postfix) with ESMTP id 14D4FA4DF4; Fri, 16 Jul 2004 08:35:35 +0100 (BST) Reply-To: From: "Matt Clark" To: "'Scott Marlowe'" , Cc: , Subject: Re: Swapping in 7.4.3 Date: Fri, 16 Jul 2004 08:35:32 +0100 Organization: Ymogen Ltd Message-ID: <00b101c46b07$79a758d0$8300a8c0@solent> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 In-Reply-To: <1089908434.21324.8.camel@localhost.localdomain> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal 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: 200407/106 X-Sequence-Number: 7497 > This is normal. My personal workstation has been up for 16=20 > days, and it shows 65 megs used for swap. The linux kernel=20 > looks for things that haven't been accessed in quite a while=20 > and tosses them into swap to free up the memory for other uses. >=20 > This isn't PostgreSQL's fault, or anything elses. It's how a=20 > typical Unix kernel works. I.e. you're seeing a problem that=20 > simply isn't there. Actually it (and other OSes) does slightly better than that. It _copies_ the least recently used pages into swap, but leaves them in memory. Then when there really is a need to swap stuff out there is no need to actually write to swap because it's already been done, and conversely if those pages are wanted then they don't have to be read from disk because they were never removed from memory.