3 ms·
Go for nginx, it's worth it, get another IP if you have to (and can do so). If you don't want to do that... Don't turn keepalive off, set it to 7 seconds - or
by nessence 18y ago
Go for nginx, it's worth it, get another IP if you have to (and can do so). If you don't want to do that...
Don't turn keepalive off, set it to 7 seconds - or - look at your analytics and see what your average user's session length on the site is and set it to somewhere between 7 and half of that number. The idea is, if someone doesn't click on something within 7 seconds they're either going to be on that page awhile or they've left.
If you can, tweak the StartServers, MinSpareServers, and MaxSpareServers parameters (if applicable).
The above parameter defaults can cripple your site if you're over 25 concurrent sessions and have a complex application (among other factors). The minspareservers defaults to 20, I think, and at that rate you'll be guaranteed a continued thrashing death/birth cycle for your apache processes which will constrain all your I/O.
If none of this works then the complexity (read, bloat?) of your app (Drupal?) is too much and you need a beefier host.
Media files have nothing to do with any of this. They'll hold connections open but they won't constrain I/O like application memory footprints and child process cycling.