I'm trying to configure an NGINX server that's sole purpose is to serve as many 10k JPEGs as it can. I have 16 GB RAM and 2 Intel Xeon E5506 processors, running CentOS.

I'm looking to configure this server in order to serve as many concurrent connections, each delivering a 10 kB JPEG image. Hence, the time of the connection would be very short.

Any ideas would be nice. Thanks.


For many small concurrent connections, all you should have to do is increase the worker pool size to improve the ability of nginx to handle all the concurrent connections without slowdown. There really isn't much other tuning to be done; nginx is wicked fast at handling static files.

  • what number of workers would be appropriate for many very small files? More than the number of CPU cores? – UpTheCreek Jan 16 '13 at 13:23
  • @UpTheCreek: One worker per core is usually enough; nginx uses non-blocking I/O extensively, so each worker will handle another request whenever the processing of one request blocks (on fetching from / writing to disk, reading/writing the network, etc). You won't need a huge number of cores/workers before your network link becomes the limiting factor rather than CPU usage or nginx workers. – womble Jan 17 '13 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.