Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 95AA9B5DBD9 for ; Tue, 11 Oct 2011 09:15:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 09974-03 for ; Tue, 11 Oct 2011 12:14:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail-yw0-f46.google.com (mail-yw0-f46.google.com [209.85.213.46]) by mail.postgresql.org (Postfix) with ESMTP id 5AA8FB5D803 for ; Tue, 11 Oct 2011 09:14:54 -0300 (ADT) Received: by ywb5 with SMTP id 5so6450460ywb.19 for ; Tue, 11 Oct 2011 05:14:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=uB0/8AaA2nA2pGXV4CfhOo4fFH9Tqjsydy/xwJnfHLs=; b=JVHVovJicPRZV7So9nJ2PozOGbMavx+pbg/ROT103LrTM89vR9Vflt72ch09y659BM Ic49smr1VruhvXfD8t6h9lqiGwiVKbu4lZI9LNOzHtraaGBD7ysgnKv9C365FddQ3oNt 99WNyCQ66OioEB1PWI2HD9jHODwFUaAph4onE= Received: by 10.150.189.19 with SMTP id m19mr10060822ybf.74.1318335294416; Tue, 11 Oct 2011 05:14:54 -0700 (PDT) Received: from [192.168.1.215] ([177.35.194.80]) by mx.google.com with ESMTPS id m10sm61809427ang.12.2011.10.11.05.14.52 (version=SSLv3 cipher=OTHER); Tue, 11 Oct 2011 05:14:53 -0700 (PDT) Message-ID: <4E94333A.4040607@gmail.com> Date: Tue, 11 Oct 2011 09:14:50 -0300 From: alexandre - aldeia digital User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Adding more memory = hugh cpu load References: <4E92F294.9010405@gmail.com> <4E92FB87.1030703@peak6.com> <4E932BFC.7070007@gmail.com> <4E93E562.7080800@2ndQuadrant.com> In-Reply-To: <4E93E562.7080800@2ndQuadrant.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.889 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201110/99 X-Sequence-Number: 45321 Em 11-10-2011 03:42, Greg Smith escreveu: > On 10/10/2011 01:31 PM, alexandre - aldeia digital wrote: >> I drop checkpoint_timeout to 1min and turn on log_checkpoint: >> >> <2011-10-10 14:18:48 BRT >LOG: checkpoint complete: wrote 6885 buffers >> (1.1%); 0 transaction log file(s) added, 0 removed, 1 recycled; >> write=29.862 s, sync=28.466 s, total=58.651 s >> <2011-10-10 14:18:50 BRT >LOG: checkpoint starting: time > > Sync times that go to 20 seconds suggest there's a serious problem here > somewhere. But it would have been better to do these changes one at a > time: turn on log_checkpoints, collect some data, then try lowering > checkpoint_timeout. A checkpoint every minute is normally a bad idea, so > that change may have caused this other issue. I returned to 5 minutes. Thanks. >> procs -------------------memory------------------ ---swap-- >> -----io---- --system-- -----cpu-------.. >> r b swpd free buff cache si so bi bo in cs us sy id wa st >> 34 0 2696 8289288 117852 38432268 0 0 8 2757 2502 4148 80 20 0 0 0 >> 39 1 2696 8286128 117852 38432348 0 0 24 622 2449 4008 80 20 0 0 0 >> 41 0 2696 8291100 117852 38433792 0 0 64 553 2487 3419 83 17 0 0 0 >> ...Notice that we have no idle % in cpu column. > > You also have no waiting for I/O! This is just plain strange; checkpoint > sync time spikes with no I/O waits I've never seen before. System time > going to 20% isn't normal either. Have I anything to detect which proccess was causing the system time increasing ? > I don't know what's going on with this server. What I would normally do > in this case is use "top -c" to see what processes are taking up so much > runtime, and then look at what they are doing with pg_stat_activity. You > might see the slow processes in the log files by setting > log_min_duration_statement instead. I'd be suspicious of Linux given > your situation though. Last night, I put another disk in the server and install Debian 6, preserving the same structure, only poiting the olds data in the new postgresql 9.0.5 compilation. Today, the problem persists. And for all that asks: the performance is poor, unusable. > I wonder if increasing the memory is a coincidence, and the real cause > is something related to the fact that you had to reboot to install it. > You might have switched to a newer kernel in the process too, for > example; I'd have to put a kernel bug on the list of suspects with this > unusual vmstat output. I dont think that is a coincidence, because this machine was rebooted other times without problem. Best regards.