# Nginx Filed Descriptor are increasing in n\*n space complexity

**URL:** <https://www.ruby-forum.com/t/nginx-filed-descriptor-are-increasing-in-n-n-space-complexity/224877>\
**Category:** NGINX\
**Created:** [November 29, 2012, 1:06pm UTC](https://www.ruby-forum.com/t/nginx-filed-descriptor-are-increasing-in-n-n-space-complexity/224877 "2012-11-29T13:06:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [November 29, 2012, 1:06pm UTC](https://www.ruby-forum.com/t/nginx-filed-descriptor-are-increasing-in-n-n-space-complexity/224877/1 "2012-11-29T13:06:01Z")

</div>

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

Posted at Nginx Forum:

> **[Nginx Filed Descriptor are increasing in n\*n space complexity](https://forum.nginx.org/read.php?2,233374,233374#msg-233374)**
>
> 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

---

<div class="post-metadata">

**Author:** ![goelvivek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@goelvivek](https://www.ruby-forum.com/u/goelvivek)\
**Post date:** [November 29, 2012, 1:22pm UTC](https://www.ruby-forum.com/t/nginx-filed-descriptor-are-increasing-in-n-n-space-complexity/224877/2 "2012-11-29T13:22:58Z")

</div>

First is count second is DEVICE

Posted at Nginx Forum:

> **[Re: Nginx Filed Descriptor are increasing in n\*n space complexity](https://forum.nginx.org/read.php?2,233374,233376#msg-233376)**
>
> 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

---

<div class="post-metadata">

**Author:** ![goelvivek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@goelvivek](https://www.ruby-forum.com/u/goelvivek)\
**Post date:** [November 29, 2012, 1:37pm UTC](https://www.ruby-forum.com/t/nginx-filed-descriptor-are-increasing-in-n-n-space-complexity/224877/3 "2012-11-29T13:37:35Z")

</div>

sorry wrong title.  
It should be :  
Nginx File Descriptor are increasing in n\*n space complexity

Posted at Nginx Forum:

> **[Re: Nginx File Descriptor are increasing in n\*n space complexity](https://forum.nginx.org/read.php?2,233374,233377#msg-233377)**
>
> 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

---

<div class="post-metadata">

**Author:** ![goelvivek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@goelvivek](https://www.ruby-forum.com/u/goelvivek)\
**Post date:** [November 29, 2012, 2:09pm UTC](https://www.ruby-forum.com/t/nginx-filed-descriptor-are-increasing-in-n-n-space-complexity/224877/4 "2012-11-29T14:09:45Z")

</div>

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

> ```
> 2 0xffff8801c4ded200
> 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 S.

> **[F5 NGINX: Built for cloud-native apps. Ready for AI traffic.](https://www.f5.com/products/nginx)**
>
> Deliver modern applications with NGINX. Explore high-performance load balancing, API gateways, and web server solutions trusted by top global enterprises.
