2

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

5
  • 1
    small or large files? Jun 27, 2011 at 22:50
  • Are you seeing much swap traffic with vmstat 1?
    – sarnold
    Jun 27, 2011 at 22:51
  • I'm betting an untuned server, even a not very grunty one, could push out more content than a gigabit ethernet could take. Just make sure you've got enough memory so you're not swapping. Jun 27, 2011 at 23:36
  • The main optimization for static content would be to do some benchmarks to see if lighttpd is faster than apache. Jun 27, 2011 at 23:37
  • Just a few notes: I'm using nginx to serve that content; the average object size is 25k. My question is if you have some tips for optimizing the OS - have it to cache more aggressively, reduce the time to first byte sent over TCP, so on. Thanks.
    – Calin Don
    Jun 28, 2011 at 11:31

1 Answer 1

4

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).

5

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .