httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Edwards <nick.z.edwa...@gmail.com>
Subject Re: [users@httpd] File Descriptor Limits
Date Wed, 12 Dec 2012 03:30:16 GMT
On 12/11/12, Igor Cicimov <icicimov@gmail.com> wrote:

>> Am I right in assuming the FD limits is about 20, or lets say 50 FD's
>> for apache internal,
>> plus 1 each for access/error/suexec logs  per virtualhost,
>> TIMES number of daemons, using MPM event which seems to load 5 of them
>>
>
> I would say not right. Each apache process loads heaps of modules and
> libraries for normal operation and each of them uses one file descriptor.
> Not to mention the network connections to the server where each socket
> means file descriptor since on Unix/Linux everything is a file.
> The best way to find your average file descriptors is to run lsof ans grep
> for the apache user, something like this:
>
> System limit:
> # ulimit -n
> 4096
>
> The network files oppened by all apache processes (IPv4 only):
> # lsof -i 4 | grep httpd | wc -l
> 29
>
> FD used by apache user:
> # lsof -s -u apache | wc -l
> 2041
>
> Specific file groups:
> # lsof | grep httpd | egrep 'REG|IPv' | wc -l
> 1461
>
> So after finding the total number of used FD's on your system just divide
> that with total number of processes ran by appache user:
>
> # ps -u apache | grep [0-9] | wc -l
> 8
>
>
>> So, more or less, is it 3*2000+50*5 ?  Or is that internal 20 or so
>> FD's per virtualhost, not overall?
>>


So, we did it :->
Had to set ulimit to 32768 to make apache start.

currently it uses only  33209  FD's

with 916 tcp connections, which includes a few WAITS

So on that basis its not an exact math or science, but shows we can
easily handle it, perhaps maybe even moving to 6K hosts, but at 4K
hosts the loads increased marginally to a average of 1 spiking
occasionally to 3 with the machines still instantly responsible (that
was tested on an 1.5mbps ADSL line, not LAN) so we hare very happy.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message