From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Waldomiro <waldomiro(at)shx(dot)com(dot)br> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Linux TOP is a indicator? |
Date: | 2009-10-21 21:53:39 |
Message-ID: | dcc563d10910211453h1384fb85q76b9731edeead849@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Oct 21, 2009 at 12:43 PM, Waldomiro <waldomiro(at)shx(dot)com(dot)br> wrote:
> Hi,
>
> I have one of my database server that I run the "top" command:
>
> top - 16:16:30 up 42 days, 13:23, 4 users, load average: 3.13, 3.52, 3.36
> Tasks: 624 total, 1 running, 623 sleeping, 0 stopped, 0 zombie
> Cpu(s): 1.4%us, 1.1%sy, 0.0%ni, 84.4%id, 12.9%wa, 0.0%hi, 0.2%si,
> 0.0%st
> Mem: 16432240k total, 16344596k used, 87644k free, 27548k buffers
> Swap: 10241428k total, 3680860k used, 6560568k free, 6230376k cached
>
> I´m afraid of two things, one is the "load average", I think 3 is too much,
Depends. If you've got enough CPU cores and IO bandwidth 3 isn't that
much really. I've got dbs running smoothly at anything under 20 at
work. On my laptop that would be way too much.
> another is the "swap", almost 4GB of swap, I think that is too much swap.
Again, that really depends. Linux will swap out seldom used things
from memory to swap to make more room for kernel cache, which is often
the right decision. Sometimes not. Sometimes it swaps out pgsql
shared_buffers to make room, and that's usually bad. You can adjust
this with sysctl.
/sbin/sysctl -a|grep swappiness
vm.swappiness = 60
sudo vi /etc/sysctl.conf
(add line like this:)
vm.swappiness = 5
> Am I right?
Hard to say. 12% or more IO Wait could be a sign of trouble more than
any of those other things.
> Can I use those indicators to know if my database is ok?
You mean the server I assume. Given that you're mostly at idle and io
wait, I'd guess the real issue is you've got a single hard drive
trying to do a RAID-10 array's worth of work.
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2009-10-21 21:58:22 | Re: Linux TOP is a indicator? |
Previous Message | Thom Brown | 2009-10-21 21:50:55 | Re: PGDay.EU 2009 - approaching fast! |