poor performance & timeouts - centos 5.8

Issues related to hardware problems
Post Reply
kiriix
Posts: 2
Joined: 2012/12/06 15:19:38

poor performance & timeouts - centos 5.8

Post by kiriix » 2012/12/07 15:58:33

Hi
I'm fairly new to centos, so I have to look alot of linux commands up.

I have a server that's running Centos 5.8 and cPanel, it's got a Intel Quad core 8400 with 8GB Ram.

It been online for just over 2 years, over the past 3 to 4 months I've been getting some timeout when on some of the sites.
If I do 'free -m' it shows a total of 7822 and 338 free (sometimes as low as 150 ish).
I also find gaps in the graphs in cPanel - Mumin Service Monitor - Memory usage, the graph shows 'cache' at an average of 6G.
Could I be right in thinking my problems are due to the high memory usage?


Could anyone help me?
I'm after any advise or help so I can get my server working better again.

Thanks in advance.

Cheers

Karl

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

poor performance & timeouts - centos 5.8

Post by TrevorH » 2012/12/07 23:34:01

No, Linux treats unused RAM as a resource that it should use for useful purposes so it caches recently read files in it if it has no other use for it. A read of a the site http://www.linuxatemyram.com might be useful.

You need to look into the various log files in /var/log and its subdirectories and see if anything is being logged around the times of the problems. Also, if you do not already have it installed, install the package 'sysstat' and edit the file /etc/cron.d/sysstat and adjust the second line so that it reads

[code]
*/10 * * * * root /usr/lib64/sa/sa1 -d 1 1
[/code]

so that it collects disk statistics. It won't start to collect them until the day following that change unless you delete today's data file from /var/log/sa/ but if you do it as soon as you install it then maybe you can beat the first run to it before it creates it. Let sysstat run for a while and then you can interrogate the data it gathers by using the 'sar' command. That'll at least give you some information about the usage of the various resources on your machine and maybe you can narrow down where the problem lies.

Actually, having written that lot, I see you already have munin available and that probably tells you all that sar would do anyway. Doesn't hurt to have both I guess. Try to correlate the gaps in the graphs with the timestamps of the various messages in your logs and see if you can see anything.

kiriix
Posts: 2
Joined: 2012/12/06 15:19:38

Re: poor performance & timeouts - centos 5.8

Post by kiriix » 2012/12/10 09:45:59

Hi

Thanks, I will install it anyway.

Where is the best place to find the log it the servers performance?
Is there anything that I could run as a benchmark to test the server?

It's hard to know where to start with some of it as I've never done much, mostly all windows server.

Cheers

Karl

homerwsmith
Posts: 19
Joined: 2012/12/12 18:47:45
Contact:

Re: poor performance & timeouts - centos 5.8

Post by homerwsmith » 2012/12/13 02:00:40

Good advice, but also free -l -m might show you something more useful than free -m alone

150 megs free ram is a LOT, I doubt it is a problem at that moment, but it might
be going lower during tempermental periods.

Being able to correlate resource usage at the exact moment it is not responding
is imperative.

Basically your machine should NEVER be swapping, thus a close record
of memory swap usage is important.

Homer

homerwsmith
Posts: 19
Joined: 2012/12/12 18:47:45
Contact:

Re: poor performance & timeouts - centos 5.8

Post by homerwsmith » 2012/12/13 02:04:00

Also cpanel is notorious for cron jobs running at various times, awstats, mailman etc, who knows.

Make sure you have a clear handle on every cron job that is allowed to run and
exactly when, from /etc/crontab, /etc/cron.d /etc/cron.daily hourly, weekly monthly etc
and all the jobs that users have installed. You might be surprised what you will find hogging
resources and when.

Keep track of who is doing what mail through the server etc.

If keyboard is sticky you know something is up.

Homer

Post Reply