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 56D455288E for ; Tue, 31 May 2005 11:33:33 -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 45180-09 for ; Tue, 31 May 2005 14:33:32 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id C0DE552891 for ; Tue, 31 May 2005 11:33:31 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j4VEXXeT011909; Tue, 31 May 2005 10:33:33 -0400 (EDT) To: Josh Close Cc: POSTGRES-PERFORMANCE Subject: Re: slow queries, possibly disk io In-reply-to: <4a0cafe20505310617d803a0c@mail.gmail.com> References: <4a0cafe205052613242e0d4d10@mail.gmail.com> <758d5e7f05052614232f6c9164@mail.gmail.com> <4a0cafe205052706043ef8f53f@mail.gmail.com> <4a0cafe205052706042d4e60e5@mail.gmail.com> <14584.1117204158@sss.pgh.pa.us> <429B90D1.9030402@wildcash.com> <4a0cafe20505310617d803a0c@mail.gmail.com> Comments: In-reply-to Josh Close message dated "Tue, 31 May 2005 08:17:31 -0500" Date: Tue, 31 May 2005 10:33:33 -0400 Message-ID: <11908.1117550013@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/469 X-Sequence-Number: 12633 Josh Close writes: > There is 2 gigs of mem in this server. Here are my current settings. > max_connections = 100 > shared_buffers = 50000 > sort_mem = 4096 > vacuum_mem = 32768 > effective_cache_size = 450000 > Shared buffers is set to 10% of total mem. Effective cache size is 90% of mem. Uh, shared_buffers and effective_cache_size are both measured in pages, which are 8K apiece unless you built with a nondefault BLCKSZ. So the above calculations are off ... > Is there anything that can be done to have postgres grab more from > memory rather than disk? It's not so much a matter of what Postgres will do as what the kernel will do. Check to see if there is some limit on how much memory the kernel will set aside for disk buffers. Plain old "top" will generally tell you what is going on, though interpreting its output sometimes requires some wizardry. regards, tom lane