Nginx Filed Descriptor are increasing in n*n space complexity

Igor Sysoev igor at sysoev.ru
Thu Nov 29 13:09:00 UTC 2012


On Nov 29, 2012, at 16:05 , goelvivek wrote:

> HI, 
> If I increase nginx worker count. File descriptor count are getting
> increased in n*n oder. 
> Example with 10 worker. 
> 2 0xffff8801c4dec000
>     10 0xffff8801c4dec300
>     10 0xffff8801c4dec600
>      2 0xffff8801c4dec900
>     10 0xffff8801c4decc00
>     10 0xffff8801c4decf00
>      2 0xffff8801c4ded200
>      2 0xffff8801c4ded500
>     10 0xffff8801c4ded800
>      2 0xffff8801c4dedb00
>     10 0xffff8801c4dee100
>      2 0xffff8801c4dee400
>     10 0xffff8801c4dee700
>      2 0xffff8801c4deea00
>     10 0xffff8801c4deed00
>      2 0xffff8801c4def000
>     10 0xffff8801c4def300
>      2 0xffff8801c4def600
>     10 0xffff8801c4def900
>      2 0xffff8801c4defc00
> 
> 
> Is there a way I can decrease this count ? I

These are unix socket pairs intended to communicate between worker processes.
Actual number of sockets is N but not NxN because they are shared. Sockets file
descriptors are indeed NxN, but the file descriptor is more cheap kernel object,
than socket or inode/vnode objects.


--
Igor Sysoev
http://nginx.com/support.html



More information about the nginx mailing list