LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-21-2012, 01:11 AM   #1
TCotton
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Rep: Reputation: Disabled
Optimising a linux server - Centus


Hi there, my first post. I'm not sure if anybody can help.

I've problem with a crashing server at the moment and until I find the time to look into the scripting issue I need to give myself some breathing space by optimising the server to free up some memory and take some of the load off

These are my settings in the httpd.conf

Quote:
fileetag: None
keepalive: On
keepalivetimeout: 5
maxclients: 25
maxkeepaliverequests: 100
maxrequestsperchild: 1000
maxspareservers: 10
minspareservers: 5
root_options: ExecCGI, FollowSymLinks, IncludesNOEXEC, Indexes, SymLinksIfOwnerMatch
serverlimit: 256
serversignature: Off
servertokens: ProductOnly
sslciphersuite: ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP:!kEDH
startservers: 5
timeout: 300
traceenable: Off
Do these look like sane settings?

I grabbed some stats from the file:

Quote:
Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
Server Built: Feb 20 2012 07:42:43

Current Time: Monday, 20-Feb-2012 16:51:29 GMT
Restart Time: Monday, 20-Feb-2012 13:56:06 GMT
Parent Server Generation: 1
Server uptime: 2 hours 55 minutes 23 seconds
Total accesses: 7258 - Total Traffic: 49.4 MB
CPU Usage: u.89 s.4 cu45.19 cs0 - .442% CPU load
.69 requests/sec - 4926 B/second - 7.0 kB/request
1 requests currently being processed, 9 idle workers
Some other server stats:

Quote:
Current Memory Usage
total used free shared buffers cached
Mem: 655360 450112 205248 0 0 0
-/+ buffers/cache: 450112 205248
Swap: 0 0 0
Total: 655360 450112 205248

Current Disk Usage
Filesystem Size Used Avail Use% Mounted on
/dev/vzfs 25G 11G 15G 44% /
none 320M 4.0K 320M 1% /dev
 
Old 02-21-2012, 11:09 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by TCotton View Post
I've problem with a crashing server
So what are the actual symptoms?
What services does the machine provide?
What runs in your web stack?
Does it crash all the time since installation or only since some time?
Did you run all your logs through Logwatch to hunt for clues?
 
Old 02-22-2012, 01:43 AM   #3
TCotton
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for the response

Can you explain to me how I gain access to Logwatch. The next time it crashes I'll check it for clues

I'm getting spikes like below on the CPU but up to 100%, which I guess is when it cuts out

Code:
ladyyb 	babynews.co.uk 	95.0 	[php] 
gasnon 	babynews.co.uk 	99.0 	/usr/bin/php /home/gasnon/public_html/index.php
 
Old 02-22-2012, 02:45 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
I would definetly raise the KeepAliveTimeout Value. 5 is just to low and setting this to a higher value does not hurt most of the times. Especially in your case where you are having 9 idle workers and one active request. (Last line of your second Quote 1 requests currently being processed, 9 idle workers ).


Logwatch is a tool you can find through you package repository or here http://sourceforge.net/projects/logwatch/files/

My bet is that you rather check on the script cause it seems that only sometimes it sky rockets the CPU so I guess there is something wrong inside the script or it could be exploited. To further investigate check your access logs and see what parameters the script is called with. This only holds true if you have a form or similar with GET parameters.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl: Optimising List Assignment mistersnorfles Programming 5 08-21-2007 09:41 PM
Tips needed for optimising ClamAV jimieee Linux - Software 0 06-08-2006 09:33 AM
Debian optimising nefryt Debian 1 04-14-2006 05:39 PM
Optimising FC4 x86 johannlo Fedora 2 07-06-2005 04:29 PM
Optimising squid dunkyb Linux - Software 2 02-21-2003 11:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration