I'm not a very technical person and I have a question on load averages. One of our Websites is on server right now but the host is complaining that our load average ranges from 1 to 7 (mostly stays at 3) but that it should always be below 1. There are some scripts that use a lot of resources and the host simply turned them off. For this reason we decided to switch hosts because the development/improvement of the scripts might take some...
months and we can't stay with a non functional site for a long time.
However, I'm having trouble picking a new host because I don't know what server feature is the one that would make this load average lower or acceptable. I know the load average is relative to the server, but how can I know that these high loads won't be a problem in a new dedicated server?
Do I need a faster processor (maybe?) or more RAM memory? I don't want to switch to the new server and have the same problem.
The script is written in PERL, the site is a glossary and two of the scripts are causing the most problems. The definitions of each term are shown in a dynamically generated page.
Each term has an ID number in the URL. So the script opens a text database to look for the ID number, then generates the page with the definition, see alsos and some advertising code.
This one is the search tool for the glossary. Someone types a term on a search box and the script finds exact or nearly-exact matches.
These scripts are the ones causing the problems because our traffic has increased a lot and the number of terms on the database is growing as well.
Right now the site is halfway functional. We are trying to redirect as much traffic as we can to some static pages listing the definitions -- the rest can access the dynamic pages' definitions. Before we made this change the load averages were really high and now that we have probably less than half of the traffic (to the dynamic pages) the load averages are below 1.
So it's a combination between how many requests we are getting and the scripts that are using too many resources. (The text database that the scripts read is quite big.)
Our current server is:
The one we are trying to switch to:
I don't know if the fact that it's dedicated is better or not. All the hosts tell me that the performance and the loads will be lower but I don't know if they are just trying to sell me something.
Thanks for your help in this issue.
Here's what I would do: Have the vendor set up a prototype solution for you, and have them prove that it really is a hardware issue. If the performance is within acceptable service levels, you hand them the greenbacks. If not, they have to make it perform, or give you your money back. Very simple.
If they are not willing to do that, you'll have to have someone look at the code to see if it is well written to determine if the scripts may be your problem. If it looks like the code is good, we're back to the box. You made a good point re: load average, though you would be hard pressed to find any server that is not CPU bound with a load average of over 3.
To help you further analyze your systems, why don't you run vmstat and/or sar, and find out the percentage idle time of your CPUs. If the idle time is low (<30%), then you are CPU bound. When running vmstat or sar, in the CPU area, if you see that the %sys is equal to or higher than the %usr, it may mean the system is spending too much time processing system calls and not crunching code. This can be a sign of poorly written code that may help you with the other issue.
You also don't mention anything about your memory configuration. When running vmstat, check if the frelist column is very low (<500) and if there are page-outs going on. If your system is paging (po) then you have a memory issue.
I'm also not sure what you mean by shared vs dedicated. Does that mean there are other database-type applications running on the box? If the answer is yes, then certainly a dedicated box is better. If all it means is that there are services opened on the box that are not needed, like Sendmail, then stop them. You should only run what you need on any Unix or Linux Server.
Dig deeper on Linux management and configuration
Related Q&A from Kenneth Milberg
Unix-to-Linux migration expert Ken Milberg describes how virtualization, support, clustering and more fit into the migration of an IT infrastructure ...continue reading
A reader new to Linux wonders about which distribution is recommended for installing Nagios and what Nahant and Tikanga mean.continue reading
Documentation for Red Hat Enterprise Linux 5 covering checking system performance, tuning, kernel configuration and extending the file system exists ...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.