Nginx VS Nginx + Varnish
Igor Sysoev
is at rambler-co.ru
Fri Oct 10 18:05:50 MSD 2008
On Fri, Oct 10, 2008 at 02:03:50PM +0200, Gen Gennix wrote:
> Dave Cheney wrote:
> > From my experience, 60 small static files / second used 2% cpu on a
> > OS X Xeon Server. Are you suspecting that your server is being limited
> > in some way ?
>
> Right now, I don't have problems.
>
> I just want to optimize my web server for the best result (it takes
> 400-500ms to serve a 5kB image).
>
>
> http://img29.picoodle.com/img/img29/3/10/10/f_monitoring0m_f2441cf.png
>
> http://img33.picoodle.com/img/img33/3/10/10/f_monitoring0m_bb25457.png
>
> Those images show my web site performance (from pingdom.com and
> site-perf.com).
>
> I'm wondering if there is something to reduce those timings...
What I see on these images is that TCP connection times are about
100ms-500ms. These values depend on client speed connection and kernel
internel processing only. User-level applications can not affect on it.
Thus, if you have 100-500ms TCP round trip, then small data chunks
will be processed in the same time, even if nginx will not block on disk
reads.
As to disk blocking, you have 30G images and 2G memory. nginx is probably
blocking on disk - see "wa" percents in top. You may try to increase
worker_processes to 10-20.
As to using varnish+nginx, I think varnish will not help in this case.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list