# Thread support in Nginx

**URL:** <https://www.ruby-forum.com/t/thread-support-in-nginx/196025>\
**Category:** NGINX\
**Created:** [October 5, 2010, 6:32pm UTC](https://www.ruby-forum.com/t/thread-support-in-nginx/196025 "2010-10-05T18:32:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cachenewbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f07891/32.png) [@cachenewbie](https://www.ruby-forum.com/u/cachenewbie)\
**Post date:** [October 5, 2010, 6:32pm UTC](https://www.ruby-forum.com/t/thread-support-in-nginx/196025/1 "2010-10-05T18:32:59Z")

</div>

Is there any plan to fix thread support in Nginx ? Are there significant  
drawbacks in running multiple threads in each Nginx process ?

Posted at Nginx Forum:

> **[Thread support in Nginx](https://forum.nginx.org/read.php?2,137471,137471#msg-137471)**
>
> Is there any plan to fix thread support in Nginx ? Are there significant drawbacks in running multiple threads in each Nginx process ?

---

<div class="post-metadata">

**Author:** ![cachenewbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f07891/32.png) [@cachenewbie](https://www.ruby-forum.com/u/cachenewbie)\
**Post date:** [October 5, 2010, 6:35pm UTC](https://www.ruby-forum.com/t/thread-support-in-nginx/196025/2 "2010-10-05T18:35:20Z")

</div>

On Tue, Oct 5, 2010 at 20:31, cachenewbie [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there any plan to fix thread support in Nginx ? Are there significant  
> drawbacks in running multiple threads in each Nginx process ?  
> And why do you need it?

–  
Boris D..

---

<div class="post-metadata">

**Author:** ![cachenewbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f07891/32.png) [@cachenewbie](https://www.ruby-forum.com/u/cachenewbie)\
**Post date:** [October 5, 2010, 8:16pm UTC](https://www.ruby-forum.com/t/thread-support-in-nginx/196025/3 "2010-10-05T20:16:35Z")

</div>

I was thinking that the in-memory buffer cache can be shared by multiple  
threads (can’t be done by multiple processes without shared memory and  
shared memory isn’t good for performance) serving different  
clients/requests instead of multiple processes sharing the file cache -  
basically to help having two levels of cache - one in-memory and one  
file-cache served by multi-threaded multi-process nginx system making  
the best use multi-core processors.

Posted at Nginx Forum:

> **[Re: Thread support in Nginx](https://forum.nginx.org/read.php?2,137471,137497#msg-137497)**
>
> Is there any plan to fix thread support in Nginx ? Are there significant drawbacks in running multiple threads in each Nginx process ?

---

<div class="post-metadata">

**Author:** ![cachenewbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f07891/32.png) [@cachenewbie](https://www.ruby-forum.com/u/cachenewbie)\
**Post date:** [October 5, 2010, 8:21pm UTC](https://www.ruby-forum.com/t/thread-support-in-nginx/196025/4 "2010-10-05T20:21:16Z")

</div>

On Tue, Oct 5, 2010 at 22:14, cachenewbie [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I was thinking that the in-memory buffer cache can be shared by multiple  
> threads (can’t be done by multiple processes without shared memory and  
> shared memory isn’t good for performance) serving different  
> clients/requests instead of multiple processes sharing the file cache -  
> basically to help having two levels of cache - one in-memory and one  
> file-cache served by multi-threaded multi-process nginx system making  
> the best use multi-core processors.  
> File cache is equal to memory cache (because of system pagecache) in  
> modern operating systems, so, I don’t think, that it is really needed.

–  
Boris D..
