RE: CPU usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Still doesn’t tell me that Apache is the problem. My experience tells me that when there is a custom application involved, it’s usually the problem. Anyway, I’ll throw some things out there for you to consider.

 

Look at your database connections and how Moodle is configured to use them (are they being closed appropriately, are the being pooled, pool size, timeouts, etc.)

 

If you are using a prefork and your MaxClients is at the default of 150 and you only have 45 processes then it could be that the OS can’t allocate any more connections.

 

More on the MaxClients directive here including how to adjust settings for threaded and hybrid servers:

 

  http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients

 

I don’t think having a lot of sockets in a TIME_WAIT state for Apache is necessarily bad.  

 

But if the site is becoming unusable because of the load, in the past I have completely disabled KeepAlives to make a site more responsive while I figured out the real problem. But that was for a site that was 90% static content so I don’t know if it would have the desired effect on your system.

 

Lastly, here’s the performance doc on the Apache site:

 

  http://httpd.apache.org/docs/2.2/misc/perf-tuning.html

 

Let us know how things go. If you still have problems, I’m interested in answers to these questions: what’s the status of the web site? Is it still responsive or is it slow? Can you identify requests that are slower than others? Can you test responsiveness of a requests for static content versus dynamic?

 

 

Cheers,

 

Jeff

 

From: Kory Wheatley [mailto:wheakory@xxxxxxxxx]
Sent: Wednesday, September 05, 2007 2:32 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re: CPU usage

 

Apache was fine, until school started when more students started using the web server.  There's just an over abundance of Apache processes in a TIME_WAIT state when you do a "netstat -na".  What parameters in apache do you recommend I look into, the keepalive settings, maxclient settings.  The memory on the system not an issue, its just the CPU usage.

On 9/5/07, Jeff Beard <jeffb@xxxxxxxxxxxxx> wrote:

Hi there,

 

I disagree with your assessment of the problem. You haven't provided any information that would clearly indicate to me that there's an issue with Apache performance. I recommend looking at the application and database first. Especially if, for example, things were fine last week but this week there's a resource problem. That would indicate to me that you should examine changes made to the application and database in the interim.

 

Sorry I can't help more but I think there's more analysis to do before we can make a call on what the problem is much less offer advice on fixing it.

 

 

Cheers,

 

Jeff

 

From: Kory Wheatley [mailto:wheakory@xxxxxxxxx]
Sent: Wednesday, September 05, 2007 12:27 PM
To: users@xxxxxxxxxxxxxxxx
Subject: CPU usage

 

Our apache server is utilizing the CPU to almost a 100% with 45 httpd process opened.  What sort of tuning could be done to help this situation.  

The Apache server is using Moodle, PHP, and Mysql.  The Apache server is on a dedicated V440 with 4 processors and 16 gb of memory.  The Mysql database is on a different system identical to the one explained, so it's not like its on a system that can handle Apache

I think it's an Apache tuning issue, but I'm not sure where to start.  I thought about raising the number of startup server process.

 


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux