nginx support multithread

Igor Sysoev igor at sysoev.ru
Fri Oct 28 06:26:09 UTC 2011


On Thu, Oct 27, 2011 at 07:06:29AM -0400, Brian Akins wrote:
> 
> On Oct 27, 2011, at 3:41 AM, agentzh wrote:
> >> 
> >> What would be the usage of multi-threads?
> >> 
> > 
> > Mostly for (blocking) disk I/O and other syscalls that have to block
> > the main thread of an nginx worker :)
> > 
> 
> True.  I've seen some systems where the overhead of the thread/queue management was more than just letting the system call block the main thread.

Could you eleborate this case ?
For example, on non-SSD disk, I/O blocking may take several milliseconds,
while very expensive fork() syscall takes about 100-200 microseconds
on modern CPU.


-- 
Igor Sysoev



More information about the nginx mailing list