I saw multithread support in the source code, but why multithread is not
supported in current version? And is any one know whether and when
multithread will be supported?
As far as I understand, nginx is event driven and support a bunch of
different schedule strategies at kernel level… that should be
enough… but in any case… you can always run N nginx bounded to
different cpu’s in case you really needed
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. We generally run 2 nginx procs per CPU core.
I just worry about bloat. There is a reason nginx’s market share is
rising and Apache’s is falling.
On Thu, Oct 27, 2011 at 03:41:24PM +0800, agentzh wrote:
Mostly for (blocking) disk I/O and other syscalls that have to block
the main thread of an nginx worker
Yes. Primarily auxiliary threads to offload openning of not recently
used files, disk i/o, etc. Second goal is to make nginx internals being
thread-safe to allow experiments with different processing models.
On Thu, Oct 27, 2011 at 07:06:29AM -0400, Brian A. wrote:
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 S.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.