FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian ISP

 
 
LinkBack Thread Tools
 
Old 05-12-2011, 09:45 AM
Emmanuel Kasper
 
Default Preventing an apache mpm prefork from disk trashing

Hello

I have a wordpress blog running with apache in prefork mode ( all debian
packages ) I have noticed that by traffic peaks ( think reddit ), Apache
starts to swap heavily becauses it creates too much processes according
to the RAM of the machine.

I have been thinking of reducing MaxClients so that MaxClient * ResRAM
apache process < RAM of the server.

Is that the correct way to treat this problem ?

I know there nginx + fastcgi but I am not there yet

Emmanuel
 
Old 05-12-2011, 10:58 AM
Thomas Goirand
 
Default Preventing an apache mpm prefork from disk trashing

On 05/12/2011 05:45 PM, Emmanuel Kasper wrote:
> Hello
>
> I have a wordpress blog running with apache in prefork mode ( all debian
> packages ) I have noticed that by traffic peaks ( think reddit ), Apache
> starts to swap heavily becauses it creates too much processes according
> to the RAM of the machine.
>
> I have been thinking of reducing MaxClients so that MaxClient * ResRAM
> apache process < RAM of the server.
>
> Is that the correct way to treat this problem ?

Yes, that's the way. And I would also recommend to limit the maximum
number of connection to port 80 with iptables, just in case someone is
flooding. Do a -j DROP, so that clients will retry for a while to
connect in case it goes busy. You can also use bwshare to limit the
number of connections per IP (also a good protection against flooding).

Anyway you do, at some point, you'll have to add more RAM, or do a
cluster with HAproxy, IMHO. RAM is cheap...

Thomas


--
To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4DCBBD59.4080204@goirand.fr">http://lists.debian.org/4DCBBD59.4080204@goirand.fr
 
Old 05-12-2011, 11:38 AM
Atıf CEYLAN
 
Default Preventing an apache mpm prefork from disk trashing

On 05/12/2011 12:45 PM, Emmanuel Kasper wrote:

Hello

I have a wordpress blog running with apache in prefork mode ( all debian
packages ) I have noticed that by traffic peaks ( think reddit ), Apache
starts to swap heavily becauses it creates too much processes according
to the RAM of the machine.

I have been thinking of reducing MaxClients so that MaxClient * ResRAM
apache process < RAM of the server.

Is that the correct way to treat this problem ?

I know there nginx + fastcgi but I am not there yet

Emmanuel




I suggest apache with fcgid (mpm-worker mode) and memcache module (not
memcached). Also php with APC cache extension.

Your server performance will increase min. %20.



--

/**

* @author Atıf CEYLAN

* Software Developer & System Admin

* http://www.atifceylan.com

*/
 
Old 05-16-2011, 07:38 AM
Emmanuel Kasper
 
Default Preventing an apache mpm prefork from disk trashing

Am 2011-05-12 12:58, schrieb Thomas Goirand:
> On 05/12/2011 05:45 PM, Emmanuel Kasper wrote:
>> Hello
>>
>> I have a wordpress blog running with apache in prefork mode ( all debian
>> packages ) I have noticed that by traffic peaks ( think reddit ), Apache
>> starts to swap heavily becauses it creates too much processes according
>> to the RAM of the machine.
>>
>> I have been thinking of reducing MaxClients so that MaxClient * ResRAM
>> apache process < RAM of the server.
>>
>> Is that the correct way to treat this problem ?
>
> Yes, that's the way. And I would also recommend to limit the maximum
> number of connection to port 80 with iptables, just in case someone is
> flooding. Do a -j DROP, so that clients will retry for a while to
> connect in case it goes busy. You can also use bwshare to limit the
> number of connections per IP (also a good protection against flooding).

yes a kinf of fail2ban was on my todo list for a long time, might be the
right time to check
thanks for the tip

Manu
 

Thread Tools




All times are GMT. The time now is 10:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org