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 9E58452837 for ; Thu, 26 May 2005 17:24:16 -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 47004-04 for ; Thu, 26 May 2005 20:24:15 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.192]) by svr1.postgresql.org (Postfix) with ESMTP id 225EB52816 for ; Thu, 26 May 2005 17:24:14 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id 68so1471014wra for ; Thu, 26 May 2005 13:24:16 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=im4iP1GvYHYIrqe/Sjb9I+iaJxVIaFYMsy0QYAQ0CkHWpx5ZTGQo9Ub0YsRBSrFpc62Mn10bpO2HQNCisSMAoDMUTx72N4L+Iu14c7s6yIjZlhrlG8IAmjgLIzcEEJK0nDbhuiOSzvGrkHb67i3PgiY74m90gwMHxvDamK+A4cY= Received: by 10.54.54.56 with SMTP id c56mr2097412wra; Thu, 26 May 2005 13:24:16 -0700 (PDT) Received: by 10.54.2.45 with HTTP; Thu, 26 May 2005 13:24:16 -0700 (PDT) Message-ID: <4a0cafe205052613242e0d4d10@mail.gmail.com> Date: Thu, 26 May 2005 15:24:16 -0500 From: Josh Close Reply-To: Josh Close To: pgsql-performance@postgresql.org Subject: slow queries, possibly disk io Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.398 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200505/402 X-Sequence-Number: 12566 I have some queries that have significan't slowed down in the last couple days. It's gone from 10 seconds to over 2 mins. The cpu has never gone over 35% in the servers lifetime, but the load average is over 8.0 right now. I'm assuming this is probably due to disk io. I need some help setting up postgres so that it doesn't need to go to disk. I think the shared_buffers and effective_cache_size values are the one's I need to look at. Would setting shmmax and smmall to 90% or so of available mem and putting a lot for postgres be helpful? Effective cach size says this:=20 Sets the planner's assumption about the effective size of the disk cache (that is, the portion of the kernel's disk cache that will be used for PostgreSQL data files). Does that mean the total available ram? Or what's left over from shared_buf= fers? I've tried different things and not much has been working. Is there a good way to ensure that most of the tables accessed in postgres will be cached in mem and not have to go to disk? If I'm joining a lot of tables, should the sort_mem be set high also? Do shared_buffers, effective_cache_size, and sort_mem all use different mem? Or are they seperate? I've looked for information and haven't found any useful pages about this. Any help would be greatly appreciated. Thanks. -Josh