What would be the system tunables to enhance serving static content? Like increase/decrease swappines, how to max out disk caching and so on...
1 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).
-
I'm already using nginx and I know that it can saturate 1Gbps connection. The question is if there any tunables to reduce the time from HDD to TCP, basically reduce the time to first byte. Jun 28, 2011 at 11:37
-
Depending on your memory consumption you could look into this: wiki.nginx.org/HttpMemcachedModule– thiniceJun 28, 2011 at 13:40
-
Do you have an idea of what level of disk latency you have with a random request?– thiniceJun 28, 2011 at 14:04
-
dl.dropbox.com/u/27595652/284694/diskstats_iops-day.png dl.dropbox.com/u/27595652/284694/diskstats_latency-day.png dl.dropbox.com/u/27595652/284694/memory-day.png are the relevant data from server monitoring. As you can see every kernel part is doing it's job good and I don't have specifically a problem with disk latency, but rather I'm asking for good practices when it comes to this type of server workload. Jun 29, 2011 at 10:55
-
Memmcached doesn't seem a good solution for this, since it is introducing additional networking overhead. I'm trying to minimize the time from file to the network (reducing the latency). Jun 29, 2011 at 10:58
vmstat 1
?