Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL and Apache efficiency

Status
Not open for further replies.

buzznick

IS-IT--Management
Dec 29, 2004
39
0
0
US
Hi all,

Having some troubles with MySQL and efficiency using Apache. Here's the set up:

We have about 12 MySQL DB's running on a Linux server. We have approx 100 users accessing the DB via PHP scripts. However, the server load is way up to like 20-30 and everything is running at a crawl.

We did get a PHP expert to look over the scripts and we're assured there's nothing wrong with them. So our guess now is that it must be:

a] the server needs upgrading to a higher spec

or

b] apaches max # of users figure needs adjusting (I think it's set to 100 right now)

Any help or advice would be greatly appreciated ;-)

Thanks!
 
Could you tell us the specs on the machine?
What does your /etc/php.ini file say for max_execution_time, max_input_time, and memory_limit?
Are you using alpha or numeric joins in the sql?
Are your users connecting through a proxy or other caching server?
Does anything odd show up when you run top?

Mark
 
Apache has "max connections", which shouldn't be a problem.

Why is the load high? Check "top" for hints. When I've seen this it's often because of high iowait. Check memory, especially.
 
Thanks guys, I'm not sure about all the technical answers there so I'll my partner who handles all that.

 
Look at your selects, as more than likely they are returning entire result sets when only a few records are to be selected.

One of the mysql logs shows you the inquiries which are taking a long time.

for instance your key may be company, divison, section.
The select does not provide the division, and therefore the inquiry has to read the entire data set.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top