I don't think that a load of 172 is a good idea. I know this is a benchmark that is measuring how fast you can go ideally but in production the question is how fast you can go with with keeping the latency within the SLA. As a general rule you want to run your boxes around 1 normalized load ( load / # of CPU cores). The rest of the article is pretty nice.
Boosting Nginx Performance with Thread Pools
11–20 of 48 posts
Re: Boosting Nginx Performance with Thread Pools
#12403 Forbidden Well at least it isn't a 503
Re: Boosting Nginx Performance with Thread Pools
#13Linux has POSIX aio syscalls which seems to work. At least Informix and Oracle rely on them.
That only works for read, write and fsync.
There are plenty of other blocking syscalls that people need to use.
e.g. An important missing one is getdents.
Re: Boosting Nginx Performance with Thread Pools
#14Great explanation of an event driven web server. Helped me understand ome of the benefits of the mongrel2 architecture that separates the tasks needed to be done completely by using ØMQ as the mechanism to decouple the connection handling from the message handling of the request.
Thread is a wrong idea in the first place - by broking isolation of processes (share nothing principle) they brought in the whole new class of problems with locking and synchronization. Only threads that share nothing is a reasonable choice, but without sharing the whole concept makes no sense anymore. So there are kernel lightweight processes which seems to be good choice for offloading the blocking operations from the main loop.
BTW, Erlang does it right from the very beginning.)
Re: Boosting Nginx Performance with Thread Pools
#15I don't think that a load of 172 is a good idea. I know this is a benchmark that is measuring how fast you can go ideally but in production the question is how fast you can go with with keeping the latency within the SLA. As a general rule you want to run your boxes around 1 normalized load ( load / # of CPU cores). The rest of the article is pretty nice.
Re: Boosting Nginx Performance with Thread Pools
#16I think this would have been much better titled "Boosting NGINX Performance 9x with Asynchronous wrappers around blocking system calls". Most people when hearing about "thread pools" in the context of a web-server think about using multiple threads for handling separate requests, which is NOT what this is about. It is using threads to enable some blocking syscalls (read and sendfile) to run asynchronously from the ma…
Similarly, there's libuv [0], which is used for Node.js and others. [0] https://github.com/libuv/libuv
Re: Boosting Nginx Performance with Thread Pools
#17Re: Boosting Nginx Performance with Thread Pools
#18Earlier quoted context omitted.
Similarly, there's libuv [0], which is used for Node.js and others. [0] https://github.com/libuv/libuv
libuv is for C projects that miss the joy of javascript callback hell.
Re: Boosting Nginx Performance with Thread Pools
#19Linux has POSIX aio syscalls which seems to work. At least Informix and Oracle rely on them.
Glibc's posix aio (aio_*(3)), on the other hand, does not use Linux's kernel aio AFAIK. It probably uses thread pools. It also uses signals to signal completion. It is not generally considered performant.
Re: Boosting Nginx Performance with Thread Pools
#20Earlier quoted context omitted.
libuv is for C projects that miss the joy of javascript callback hell.
Or don't want to have 10000 threads. I have a Go server that regularly bumps 140k goroutines. Try that shit with native threads.