Re: Adding more memory = hugh cpu load

From: alexandre - aldeia digital <adaldeia(at)gmail(dot)com>
To:
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Adding more memory = hugh cpu load
Date: 2011-10-10 17:31:40
Message-ID: 4E932BFC.7070007@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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(at)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(at)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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2011-10-10 17:46:44 Re: Adding more memory = hugh cpu load
Previous Message Leonardo Francalanci 2011-10-10 16:14:37 Re: Adding more memory = hugh cpu load