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 472DB14B2878 for ; Wed, 11 Aug 2004 19:54:01 -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 97747-07 for ; Wed, 11 Aug 2004 22:53:55 +0000 (GMT) Received: from mail.gotfrag.com (g01.gotfrag.com [66.208.110.11]) by svr1.postgresql.org (Postfix) with ESMTP id 1B1C614B2824 for ; Wed, 11 Aug 2004 19:53:52 -0300 (ADT) Received: from jcoene2 (roc-66-66-149-175.rochester.rr.com [66.66.149.175]) by mail.gotfrag.com (8.12.10/8.12.8) with ESMTP id i7BMrp0E099853; Wed, 11 Aug 2004 18:53:52 -0400 (EDT) (envelope-from jcoene@gotfrag.com) Message-Id: <200408112253.i7BMrp0E099853@mail.gotfrag.com> From: "Jason Coene" To: "'Rod Taylor'" Cc: "'Merlin Moncure'" , "'Postgresql Performance'" Subject: Re: Hardware upgrade for a high-traffic database Date: Wed, 11 Aug 2004 18:53:52 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2096 Thread-Index: AcR/8kdnAnsjD+GnRdWhW3jSxkDrgwAAGdOA In-Reply-To: <1092263200.16087.121.camel@jester> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200408/174 X-Sequence-Number: 7810 > > Hi Rod, > > > > I was looking at top and vmstat - which always show under 300MB > "Active". > > We may hit 400MB at peak. Everything I see (though this isn't my area > of > > expertise) points to most of the memory simply being unused. Results > below, > > am I missing something? > > This looks fine. The memory is not unused (only 5MB is actually empty) > but is being used for disk cache. > > Active is memory used by programs and would need to be swapped if this > space was needed. > > Inactive is memory that is generally dirty. Disk cache is often here. In > your case, you likely write to the same pages you're reading from -- > which is why this number is so big. It also explains why a checkpoint is > a killer; a large chunk of this memory set needs to be pushed to disk. > > Cache is memory used generally for disk cache that is not dirty. It's > been read from the disk and could be cleared immediately if necessary. > > Wired is memory that cannot be swapped. In your case, Shared Memory is > probably Wired (this is good). There is another sysctl to check and set > whether it is wired or swappable. > > > > Interesting (if dry) read: > http://www.freebsd.org/doc/en_US.ISO8859-1/articles/vm-design/index.html > Ah, thanks - I didn't know that Inactive was still being used. I'm glad to know that at least the OS is using up the free memory for disk cache. Shared memory is Wired, set via sysctl. Thanks for the info! It sounds like adding more memory would help cache more data - I'll look into the upgrade. Jason