Linux – Optimize linux for serving http static content

linuxlinux-kernelnginxperformancesysctl

What would be the system tunables to enhance serving static content? Like increase/decrease swappines, how to max out disk caching and so on…

Best Answer

If you're looking for hardcore static performance, look into nginx. A web server that specializes specifically in serving static content.

You will find that Apache can serve static content quite quickly too if you don't use complex features or .htaccess files, etc.

Caching and connection handling are best left to the tunable features of the service daemon you choose.

Technically for any form of IO/general performance you want 0 swappiness - as that correlates to a memory problem (either too little memory, poor use, or legitimate consumption).