Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 8DAC2632268 for ; Thu, 24 Jun 2010 14:27:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 38598-05 for ; Thu, 24 Jun 2010 17:27:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gw0-f46.google.com (mail-gw0-f46.google.com [74.125.83.46]) by mail.postgresql.org (Postfix) with ESMTP id 2F26B632667 for ; Thu, 24 Jun 2010 14:27:25 -0300 (ADT) Received: by gwaa18 with SMTP id a18so891861gwa.19 for ; Thu, 24 Jun 2010 10:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=wiK6q6Bd3F5/LngFWNPxuQTvv3X9KbWgLX0Fgalu+1c=; b=i3ZTnTrQTWmtTP4XbHkp94e+v6483fsZTKrGUF1Vf0UfnYqHFh0HLRVJwOO5v7aSZM a6zBm1Jwr6pSQBwwRUmdweKPPHnfB26Buru/5U3a7Zgq15E4FJM0iVooumj/SGPg9Mfh 4RUKOx4rbdAWCon/o5kL+YJtJgjF0z8YGXI2A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=yFd2mM+IzmQe+fl2LIp2g9JCSW9on/wFsbSKj8PVuFvr60S3j/UzV7Nbx2QWZE4kwk GtfhJsOWP+g1G/ILuUWe22190OL04X7DgpXvTIV32WOLMogH3K8C2rtYJ7M6pLOFM1Ho 7ZYya8u3J1aqQ0EVl2yd1O6/e2vh8RBokLB3M= MIME-Version: 1.0 Received: by 10.229.224.81 with SMTP id in17mr5452249qcb.252.1277400443709; Thu, 24 Jun 2010 10:27:23 -0700 (PDT) Received: by 10.229.233.80 with HTTP; Thu, 24 Jun 2010 10:27:23 -0700 (PDT) In-Reply-To: References: <4C220163020000250003291B@gw.wicourts.gov> <4C22096E020000250003292B@gw.wicourts.gov> <4C220C2C0200002500032930@gw.wicourts.gov> <4C23332E0200002500032A1C@gw.wicourts.gov> Date: Thu, 24 Jun 2010 22:57:23 +0530 Message-ID: Subject: Re: cpu bound postgresql setup. From: Rajesh Kumar Mallah To: Kevin Grittner Cc: pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201006/437 X-Sequence-Number: 39293 >i do not remember well but there is a system view that (i think) >guides at what stage the marginal returns of increasing it >starts disappearing , i had set it a few years back. Sorry the above comment was regarding setting shared_buffers not effective_cache_size. On Thu, Jun 24, 2010 at 10:55 PM, Rajesh Kumar Mallah wrote: > On Thu, Jun 24, 2010 at 8:57 PM, Kevin Grittner > wrote: >> I'm not clear whether you still have a problem, or whether the >> changes you mention solved your issues. I'll comment on potential >> issues that leap out at me. > > It shall require more observation to know if the "problem" is solved. > my "problem" was high load average in the server . We find that > when ldavg is between 10-20 responses of applications were acceptable > ldavg > 40 makes things slower. > > What prompted me to post to list is that the server transitioned from > being IO bound to CPU bound and 90% of syscalls being > lseek(XXX, 0, SEEK_END) = YYYYYYY > >> >> Rajesh Kumar Mallah wrote: >> >>> 3. we use xfs and our controller has BBU , we changed barriers=1 >>> to barriers=0 as i learnt that having barriers=1 on xfs and fsync >>> as the sync method, the advantage of BBU is lost unless barriers >>> is = 0 (correct me if my understanding is wrong) >> >> We use noatime,nobarrier in /etc/fstab. I'm not sure where you're >> setting that, but if you have a controller with BBU, you want to set >> it to whichever disables write barriers. > > as per suggestion in discussions on some other thread I set it > in /etc/fstab. > >> >>> max_connections = 300 >> >> As I've previously mentioned, I would use a connection pool, in >> which case this wouldn't need to be that high. > > We do use connection pooling provided to mod_perl server > via Apache::DBI::Cache. If i reduce this i *get* "too many > connections from non-superuser ... " error. Will pgpool - I/II > still applicable in this scenario ? > > >> >>> work_mem = 4GB >> >> That's pretty high. That much memory can be used by each active >> connection, potentially for each of several parts of the active >> query on each connection. You should probably set this much lower >> in postgresql.conf and boost it if necessary for individual queries. > > hmmm.. it was 8GB for many months ! > > i shall reduce it further, but will it not result in usage of too many > temp files > and saturate i/o? > > > >> >>> effective_cache_size = 18GB >> >> With 32GB RAM on the machine, I would probably set this higher -- >> somewhere in the 24GB to 30GB range, unless you have specific >> reasons to believe otherwise. It's not that critical, though. > > i do not remember well but there is a system view that (i think) > guides at what stage the marginal returns of increasing it > starts disappearing , i had set it a few years back. > > >> >>> add_missing_from = on >> >> Why? There has been discussion of eliminating this option -- do you >> have queries which rely on the non-standard syntax this enables? > > unfortunately yes. > >> >>> Also i would like to apologize that some of the discussions on >>> this problem inadvertently became private between me & kevin. >> >> Oops. I failed to notice that. Thanks for bringing it back to the >> list. (It's definitely in your best interest to keep it in front of >> all the other folks here, some of whom regularly catch things I miss >> or get wrong.) >> >> If you still do have slow queries, please follow up with details. > > > I have now set log_min_duration_statement = 5000 > and there are few queries that come to logs. > > please comment on the connection pooling aspect. > > Warm Regards > Rajesh Kumar Mallah. > >> >> -Kevin >> >