LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 10-23-2006, 04:47 PM   #1
sneakyimp
Member
 
Registered: Dec 2004
Posts: 795

Rep: Reputation: 50
how to determine when my server is maxed out?


I have a website that's been running for about a year. We ironed out some of the last really annoying bugs this month and so we've seen steadily increasing traffic. I'm wondering if we might need to upgrade the server soon but don't really know how to tell.

How can I tell if my server is approaching its performance limits?

I know a few commands that can give us a hint.

There's 'w':
Code:
[root@mybox html]# w
 15:23:06  up 145 days,  3:46,  1 user,  load average: 0.22, 0.24, 0.30
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
root     pts/0    studiocity-motor  2:32pm  0.00s  0.11s  0.09s  -bash
[root@mybox html]#
and 'free':
Code:
[root@mybox html]# free
             total       used       free     shared    buffers     cached
Mem:        765520     740868      24652          0      92300     342252
-/+ buffers/cache:     306316     459204
Swap:      1052248      96352     955896
It's a fedora linux box with 2ghz celeron processor and 768 MB RAM running a LAMP stack. I was hoping to wire up a PHP script that can check the vitals - perhaps using 'w' - and email me if a critical level is reached. i'm not certain at all what a critical level might be.
 
Old 10-23-2006, 05:12 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
w literally tells you nothing about server performance.

free is kind of worthless to. It only tells you or displays current memory and process usage.

If you really want to test your server to see if it needs an upgrade, grab some benchmark tests for apache and possibly mysql. Also install some type of graphing tool (cacti.net or opennms.org) to record statistics over a period of days or weeks. This will give you details of peek performance times on the server and graph it's usage. I'd say if you just see a steady climb of services used, swap is used more often than it should, cpu usage and load is steady at higher than normal rates, then upgrade. Other than that, it's a web server and usually those can run on very minimal servers with no problems. It's not til you start getting some intensive requests that involve a database or what not that you may need to start thinking about upgrading.
 
Old 10-23-2006, 05:22 PM   #3
sneakyimp
Member
 
Registered: Dec 2004
Posts: 795

Original Poster
Rep: Reputation: 50
my site is *quite* database intensive and in some cases does some intense number crunching in php too.

the reason i was using 'w' is that it provides the 1/5/15 minute load average which does seem like a useful measurement of server load.

and i don't really know what it means to say that 'swap is used more often than it should'. my only indicator of how much it is used so far is 'free' which is why i was considering that too. i also don't know what a 'normal' rates is for my cpu.

i'll go check out those graphing tools but i am not sure that it will help me detect any bottlenecks. I already have a pretty good idea of traffic peaks from some webalizer graphs. i'd like to more specifically determine whether my server is overloaded at any time during the day - not just see graphs that only resolve detail by the hour.
 
Old 10-23-2006, 06:52 PM   #4
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally Posted by sneakyimp
the reason i was using 'w' is that it provides the 1/5/15 minute load average which does seem like a useful measurement of server load.
uptime does as well, so does top.

Quote:
Originally Posted by sneakyimp
and i don't really know what it means to say that 'swap is used more often than it should'. my only indicator of how much it is used so far is 'free' which is why i was considering that too. i also don't know what a 'normal' rates is for my cpu.
top mentioned before will show you both, free is a little more verbose though.

Quote:
Originally Posted by sneakyimp
i'll go check out those graphing tools but i am not sure that it will help me detect any bottlenecks. I already have a pretty good idea of traffic peaks from some webalizer graphs. i'd like to more specifically determine whether my server is overloaded at any time during the day - not just see graphs that only resolve detail by the hour.
Webalizer sucks and is only a traffic tool to see how many hits, visitors, etc you get on a website. A good graphing tool will give you output of not only traffic but CPU, Memory, Swap usage and so on during those times. It will graph it out and keep record. You can get 1,000 hits a day an never exceed a tremendous amount of resource usage.

I mentioned using these tools so you can determine when it's overloaded, how much it is and if it's enough to warrant a whole new server upgrade.

Also I mentioned getting some benchmark tests to run against the server so that will give you an idea of when things start breaking, unresponsive, etc. Put the tools together and see if they ever reach that mark when running the benchmarks, etc.

If it comes down to your server being more DB intensive, instead of piling all of your eggs in one basket, get an equally or more powerful server that will run the DB itself, then you can have both a WWW server and a Database server. The database being separate will keep take the load off the server so other applications not using the DB will remain normal, etc.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you determine how much AC for a server room? BrianK General 4 10-03-2006 11:03 PM
determine load on a linux web server sandeep2005 Linux - General 1 10-22-2005 03:41 PM
maxed hardware capabilities edgjerp Mandriva 4 09-15-2005 10:04 AM
Blackbox windows always maxed? mooreted Mandriva 2 02-28-2005 07:02 AM
physicial memory maxed out with no apps running erik Linux - Hardware 7 09-18-2003 04:15 PM


All times are GMT -5. The time now is 02:27 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration