Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E38CFB5DC1C for ; Mon, 10 Oct 2011 14:31:55 -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 76073-01-7 for ; Mon, 10 Oct 2011 17:31:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail-gx0-f174.google.com (mail-gx0-f174.google.com [209.85.161.174]) by mail.postgresql.org (Postfix) with ESMTP id 443BBB5DCA1 for ; Mon, 10 Oct 2011 14:31:43 -0300 (ADT) Received: by ggnv2 with SMTP id v2so4729905ggn.19 for ; Mon, 10 Oct 2011 10:31:43 -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:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=VQtWFwxnEWItkuN8UmPISwTARFr1lE1OK4hyiJ3DVyY=; b=B9lM+I3FnufaggnQ/onKSyefk+18g3YbjhuaRkCUepIvqxYVwOpm+7HBfsFOF+D3DR g8oU3YGSjWgYa8KNAyInmcHZ+FoShgW6l28nTXNIQOUseTEYtkWK8YYgdDLkCAPFZJJ3 /qJkgZAyo76C18ZQOWouvlhZdnYoclAep/JYg= Received: by 10.101.75.9 with SMTP id c9mr3865153anl.153.1318267902863; Mon, 10 Oct 2011 10:31:42 -0700 (PDT) Received: from [192.168.1.125] ([177.35.194.80]) by mx.google.com with ESMTPS id m3sm54133857ang.0.2011.10.10.10.31.41 (version=SSLv3 cipher=OTHER); Mon, 10 Oct 2011 10:31:42 -0700 (PDT) Message-ID: <4E932BFC.7070007@gmail.com> Date: Mon, 10 Oct 2011 14:31:40 -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 CC: pgsql-performance@postgresql.org Subject: Re: Adding more memory = hugh cpu load References: <4E92F294.9010405@gmail.com> <4E92FB87.1030703@peak6.com> In-Reply-To: <4E92FB87.1030703@peak6.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=0.532 tagged_above=-10 required=5 tests=BAYES_05=-0.5, FREEMAIL_FROM=0.001, MISSING_HEADERS=1.021, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201110/84 X-Sequence-Number: 45306 Em 10-10-2011 11:04, Shaun Thomas wrote: > That's not entirely surprising. The problem with having lots of memory > is... that you have lots of memory. The operating system likes to cache, > and this includes writes. Normally this isn't a problem, but with 48GB > of RAM, the defaults (for CentOS 5.5 in particular) are to use up to 40% > of that to cache writes. Hi Shawn and all, After change the parameters in sysctl.conf, during some time I see that load average downs. But the system loads grow again. Dirty memory in meminfo is about 150MB and Whriteback is mostly 0 kB. 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 <2011-10-10 14:19:40 BRT >LOG: checkpoint complete: wrote 6415 buffers (1.0%); 0 transaction log file(s) added, 0 removed, 1 recycled; write=29.981 s, sync=19.960 s, total=50.111 s <2011-10-10 14:19:50 BRT >LOG: checkpoint starting: time <2011-10-10 14:20:45 BRT >LOG: checkpoint complete: wrote 6903 buffers (1.1%); 0 transaction log file(s) added, 0 removed, 1 recycled; write=29.653 s, sync=25.504 s, total=55.477 s <2011-10-10 14:20:50 BRT >LOG: checkpoint starting: time <2011-10-10 14:21:45 BRT >LOG: checkpoint complete: wrote 7231 buffers (1.1%); 0 transaction log file(s) added, 0 removed, 2 recycled; write=29.911 s, sync=24.899 s, total=55.037 s <2011-10-10 14:21:50 BRT >LOG: checkpoint starting: time <2011-10-10 14:22:45 BRT >LOG: checkpoint complete: wrote 6569 buffers (1.0%); 0 transaction log file(s) added, 0 removed, 1 recycled; write=29.947 s, sync=25.303 s, total=55.342 s <2011-10-10 14:22:50 BRT >LOG: checkpoint starting: time <2011-10-10 14:23:44 BRT >LOG: checkpoint complete: wrote 5711 buffers (0.9%); 0 transaction log file(s) added, 0 removed, 1 recycled; write=30.036 s, sync=24.299 s, total=54.507 s <2011-10-10 14:23:50 BRT >LOG: checkpoint starting: time <2011-10-10 14:24:50 BRT >LOG: checkpoint complete: wrote 6744 buffers (1.0%); 0 transaction log file(s) added, 0 removed, 2 recycled; write=29.946 s, sync=29.792 s, total=60.223 s <2011-10-10 14:24:50 BRT >LOG: checkpoint starting: time [root@servernew data]# vmstat 1 30 -w procs -------------------memory------------------ ---swap-- -----io---- --system-- -----cpu------- r b swpd free buff cache si so bi bo in cs us sy id wa st 22 0 2696 8290280 117852 38431540 0 0 328 59 9 17 17 3 79 1 0 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 42 1 2696 8293596 117852 38434556 0 0 232 776 2372 2779 83 17 0 0 0 44 1 2696 8291984 117852 38435252 0 0 56 408 2388 3012 82 18 0 0 0 26 0 2696 8289884 117856 38435924 0 0 64 698 2486 3283 83 17 0 0 0 31 0 2696 8286788 117856 38437052 0 0 88 664 2452 3385 82 18 0 0 0 42 0 2696 8284500 117868 38437516 0 0 176 804 2492 3876 83 17 0 0 0 44 0 2696 8281392 117868 38438860 0 0 24 504 2338 2916 80 20 0 0 0 44 0 2696 8278540 117868 38439152 0 0 32 568 2337 2937 83 17 0 0 0 45 0 2696 8280280 117868 38440348 0 0 72 402 2492 3635 84 16 0 0 0 35 2 2696 8279928 117868 38440388 0 0 184 600 2492 3835 84 16 0 0 0 41 0 2696 8275948 117872 38441712 0 0 136 620 2624 4187 79 21 0 0 0 37 0 2696 8274392 117872 38442372 0 0 24 640 2492 3824 84 16 0 0 0 40 0 2696 8268548 117872 38443120 0 0 0 624 2421 3584 81 19 0 0 0 32 0 2696 8268308 117872 38443652 0 0 16 328 2384 3767 81 19 0 0 0 38 0 2696 8281820 117872 38427472 0 0 72 344 2505 3810 81 19 0 0 0 41 0 2696 8279776 117872 38427976 0 0 16 220 2496 3428 84 16 0 0 0 27 0 2696 8283252 117872 38428508 0 0 112 312 2563 4279 81 19 0 0 0 36 0 2696 8280332 117872 38429288 0 0 48 544 2626 4406 80 20 0 0 0 30 0 2696 8274372 117872 38429372 0 0 24 472 2442 3646 80 19 0 0 0 38 0 2696 8272144 117872 38429956 0 0 152 256 2465 4039 83 16 0 0 0 41 2 2696 8266496 117872 38430324 0 0 56 304 2414 3206 82 18 0 0 0 32 0 2696 8267188 117872 38431068 0 0 64 248 2540 4211 78 22 0 0 0 37 0 2696 8278876 117872 38431324 0 0 56 264 2547 4523 81 19 0 0 0 43 1 2696 8277460 117872 38431588 0 0 40 8627 2695 4143 82 18 0 0 0 41 0 2696 8272556 117872 38431716 0 0 40 216 2495 3744 79 21 0 0 0 40 1 2696 8267292 117876 38433204 0 0 192 544 2586 4437 77 23 0 0 0 34 1 2696 8263204 117876 38433628 0 0 320 929 2841 5166 78 22 0 0 0 Notice that we have no idle % in cpu column. [root@servernew data]# uptime 14:26:47 up 2 days, 3:26, 4 users, load average: 48.61, 46.12, 40.47 My client wants to remove the extra memory... :/ Best regards.