You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "devnull@plugthebox.net" <de...@plugthebox.net> on 2006/01/29 23:39:16 UTC

[users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Dear List members,
I'm the administrator of a big website that hosts an important forum
(VBulletin to be precise). At peak time we get around 7000-9000
concurrent users (counting the php sessions, members visiting the forum)
the switch (Foundry) counts 2700 concurrent connections.

during those peak times, the apache server (RHEL 4 AS, Apache 1.3, php)
gets a load average of 80~170. the mysql server runs smoothly at 0.9 ~
3.

Browsing the Internet / following some optimizations HOWTOs didn't help.
Can anyone kindly support me on that issue?

Sincerely,
-- 
devnull@plugthebox.net <de...@plugthebox.net>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Posted by ht...@karsites.net.
Here is an efficient *FREE* php accelerator that may help 
improve performance.

http://www.php-accelerator.co.uk/

I think it's also alot easier to set up than Turck mmCache, 
with similar performance improvements.

Keith


In theory, theory and practice are the same;
In practice they are not. 

On Mon, 30 Jan 2006, Eugene wrote:

> To: users@httpd.apache.org From: Eugene 
> <li...@fsck.net> Subject: Re: [users@httpd] high 
> load average on Apache 1.3 hosting 8000 conc.
>     users forum
> 
> On Sun, Jan 29, 2006 at 05:07:53PM CST, devnull@plugthebox.net <de...@plugthebox.net> wrote:
> : 
> : Well the issue is that at peak times, the server doesn't 
> : respond, typing in SSH becomes sometimes slow, memory 
> : usage is fairly used (4GB of rams). The machine is a 
> : dual xeon 3.0 / SCSI hard disks. What do you mean by 
> : "disks maxed out" ?
> 
> Does your machine hit swap?
> 
> : Mainly VBulletin is a php script. I don't serve much 
> : static html files. How can php be tuned to optimize its 
> : performance?
> 

> Get a PHP enhancer, e.g. Turck mmCache.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Posted by Eugene <li...@fsck.net>.
On Sun, Jan 29, 2006 at 05:07:53PM CST, devnull@plugthebox.net <de...@plugthebox.net> wrote:
: 
: Well the issue is that at peak times, the server doesn't respond, typing
: in SSH becomes sometimes slow, memory usage is fairly used (4GB of
: rams). The machine is a dual xeon 3.0 / SCSI hard disks. What do you
: mean by "disks maxed out" ?

Does your machine hit swap?

: Mainly VBulletin is a php script. I don't serve much static html files.
: How can php be tuned to optimize its performance?

Get a PHP enhancer, e.g. Turck mmCache.


-- 
Eugene Lee
eugene at fsck dot net
"falassi ninqui y�lar, �mentielma ennauva"

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Posted by "devnull@plugthebox.net" <de...@plugthebox.net>.
Hello,
Can we start first by checking if my httpd.conf is well configured? I
have 2 webservers, load balanced by a Foundry switch. both httpd.conf's
are:

KeepAlive On
MaxKeepAliveRequests 300
KeepAliveTimeout 15
MinSpareServers 10
MaxSpareServers 30
StartServers 50
MaxClients 250
MaxRequestsPerChild 1000

remember, i usually get 2800+ connections which show on the VBulletin
forum around 8000 concurrent users.

Thank you,
-- 
devnull@plugthebox.net <de...@plugthebox.net>

Re: [users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Posted by Jean Bonnot <hb...@link2mail.net>.
devnull@plugthebox.net a écrit :

>Mainly VBulletin is a php script. I don't serve much static html files.
>How can php be tuned to optimize its performance?
>
>  
>
Usually, any php-forum has an option to make it storing generated pages 
as html-static. In that case,
pages are regenerated only when a user make something new in it. This 
act nearly as a cache.
In that case, your webserver will serves only "static pages" : your php, 
wich is I think a module
dynamycally linked in your apache, will made is job only when he has to 
do it: not regenerating the
same page again and again. Try to make a ration on how much time php 
regenerate the same page
(how much people are seeing it) and how much times the page is changed 
(someone reply in a forum) ?
(The ration might be worst on the thread list indexes).

After that, you should enable a mod expire on your graphic content 
and/or html pages or delegate
this part on another server.
Try to see if you can enable mod_deflate and or mod_gzip but serving 
only pre-gzipped files: I
remember this was an option but I didn't see it for a long time.

Usually, when looking for an enhanced way to serve static content, you 
should take a look at
http://www.lighttpd.net/ or http://www.acme.com/software/thttpd/ or boa 
or even zeus..
With apache, you can achieve nearly these enhanced performances server 
when playing with
kqueue, poll/epoll, threaded based server. The worst multiplexing model 
being select-prefork one.
I have nothing against apache and I respect it's developper's great work 
but it's too general to
serve high loads web servers.

Continuing to descend low in the system, you should look more carefully 
at your tcp-stacks buffers
but it's depend on your system. But if you don't know what's this, 
forget this asap. ;-)



JB.





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Posted by "devnull@plugthebox.net" <de...@plugthebox.net>.
Joshua,
swap space is always almost free (148k used) and memory is not being
fully used (1919572k free as I'm writing this email)
all the processes showing in top are "httpd"s the first 11 processes
usually use 10-> 50% CPU usage, but those httpd rotate, and new ones
appear. 

Eugene,
as mentioned before, my machine doesn't hit swap (148k swap used) which
i think is not worth mentioning. 
How good is Turck mmCache? 

Sincerely,
-- 
devnull@plugthebox.net <de...@plugthebox.net>

Re: [users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Posted by Joshua Slive <jo...@slive.ca>.
On 1/29/06, devnull@plugthebox.net <de...@plugthebox.net> wrote:
>            Hello Joshua,
>  Well the issue is that at peak times, the server doesn't respond, typing in SSH becomes sometimes slow, memory usage is fairly used (4GB of rams). The machine is a dual xeon 3.0 / SCSI hard disks. What do you mean by "disks maxed out" ?
>
>  Mainly VBulletin is a php script. I don't serve much static html files. How can php be tuned to optimize its performance?

The most likely causes of problems are either being out of memory (and
therefore thrashing your disk with swap activity) or having disks that
cannot keep up with the read/write load.  Check to see what your
processes are doing and what your memory load is using tools like
"top".

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Posted by "devnull@plugthebox.net" <de...@plugthebox.net>.
Hello Joshua,
Well the issue is that at peak times, the server doesn't respond, typing
in SSH becomes sometimes slow, memory usage is fairly used (4GB of
rams). The machine is a dual xeon 3.0 / SCSI hard disks. What do you
mean by "disks maxed out" ?

Mainly VBulletin is a php script. I don't serve much static html files.
How can php be tuned to optimize its performance?

Sincerely,
-- 
devnull@plugthebox.net <de...@plugthebox.net>

Re: [users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Posted by Joshua Slive <jo...@slive.ca>.
On 1/29/06, devnull@plugthebox.net <de...@plugthebox.net> wrote:
> Dear List members,
> I'm the administrator of a big website that hosts an important forum
> (VBulletin to be precise). At peak time we get around 7000-9000
> concurrent users (counting the php sessions, members visiting the forum)
> the switch (Foundry) counts 2700 concurrent connections.
>
> during those peak times, the apache server (RHEL 4 AS, Apache 1.3, php)
> gets a load average of 80~170. the mysql server runs smoothly at 0.9 ~
> 3.
>
> Browsing the Internet / following some optimizations HOWTOs didn't help.
> Can anyone kindly support me on that issue?

You need to work on the diagnosis before you work on the cure.  Load
average means almost nothing for a web server.  What exactly is
concerning you?  Are the responses slow?  How is memory usage?  Are
your disks maxed out?

In general, tuning apache itself won't get you very far (unless you
are serving mostly static files).  You need to make sure you have
adequate resources for your site and perhaps tune php and your
database.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Posted by Nick Kew <ni...@webthing.com>.
On Sunday 29 January 2006 22:39, devnull@plugthebox.net wrote:
> Dear List members,
> I'm the administrator of a big website that hosts an important forum
> (VBulletin to be precise). At peak time we get around 7000-9000
> concurrent users (counting the php sessions, members visiting the forum)
> the switch (Foundry) counts 2700 concurrent connections.
>
> during those peak times, the apache server (RHEL 4 AS, Apache 1.3, php)
> gets a load average of 80~170. the mysql server runs smoothly at 0.9 ~
> 3.
>
> Browsing the Internet / following some optimizations HOWTOs didn't help.
> Can anyone kindly support me on that issue?

Looking at a longer-term solution, you should migrate the application to
Apache 2.2, where the DBD architecture offers a major improvement in an
application of that kind.

I don't know whether PHP has made any effort to support DBD yet.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Posted by "devnull@plugthebox.net" <de...@plugthebox.net>.
Keith,
About 58GB left. most of the logs are disabled btw. 

Sincerely,
-- 
devnull@plugthebox.net <de...@plugthebox.net>

Re: [users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Posted by ht...@karsites.net.
OK - how much free space do you have left on the hard 
drives?

Keith

In theory, theory and practice are the same;
In practice they are not. 

On Mon, 30 Jan 2006, devnull@plugthebox.net wrote:

> To: users@httpd.apache.org From: "devnull@plugthebox.net" 
> <de...@plugthebox.net> Subject: Re: [users@httpd] high 
> load average on Apache 1.3 hosting 8000 conc.
>     users forum
> 
> Keith,
> Dual Intel Xeon 3.0 / 4GB rams / 2x73GB SCSI RAID 1 mirrored
> 
> Sincerely,
> -- 
> devnull@plugthebox.net <de...@plugthebox.net>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Posted by "devnull@plugthebox.net" <de...@plugthebox.net>.
Keith,
Dual Intel Xeon 3.0 / 4GB rams / 2x73GB SCSI RAID 1 mirrored

Sincerely,
-- 
devnull@plugthebox.net <de...@plugthebox.net>

Re: [users@httpd] high load average on Apache 1.3 hosting 8000 conc. users forum

Posted by ht...@karsites.net.
How much RAM does the machine have?

How many hard drives, what type and sizes are they?

Do you use RAID?

Keith

In theory, theory and practice are the same;
In practice they are not. 

On Mon, 30 Jan 2006, devnull@plugthebox.net wrote:

> To: users@httpd.apache.org
> From: "devnull@plugthebox.net" <de...@plugthebox.net>
> Subject: [users@httpd] high load average on Apache 1.3 hosting 8000 conc.
>     users forum
> 
> Dear List members,
> I'm the administrator of a big website that hosts an important forum
> (VBulletin to be precise). At peak time we get around 7000-9000
> concurrent users (counting the php sessions, members visiting the forum)
> the switch (Foundry) counts 2700 concurrent connections.
> 
> during those peak times, the apache server (RHEL 4 AS, Apache 1.3, php)
> gets a load average of 80~170. the mysql server runs smoothly at 0.9 ~
> 3.
> 
> Browsing the Internet / following some optimizations HOWTOs didn't help.
> Can anyone kindly support me on that issue?
> 
> Sincerely,
> -- 
> devnull@plugthebox.net <de...@plugthebox.net>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org