Welcome! Log In Create A New Profile

Advanced

Poor performance in serving of static files

Jürg Lehni
July 17, 2011 06:20PM
Hello,

After having been hit by a traffic-wave recently, I decided to switch hosting of all my Jetty based web-apps to Nginx, replacing Apapche2.

One of these sites is for a type foundry, and the pages it servers consist of many separate rendered gif files that are all requested simultaneously. When loading these pages I could not help but feel a decrease of performance in comparison to the previous Apache based hosting, the amount of time it took to load the whole page simply seemed lower, page rendering less fluid.. So I switched back to Apache and indeed, the page was loading much quicker. Here a link to such an example page (currently served by Apache again):

http://lineto.com/The+Fonts/Font+Categories/Text+Fonts/Akkurat/Normal/

(Clicking on any of the words will load another page, you will see what I mean)

A day and many trials of improving the performance later I am not a bit further. Nothing seems to improve the situation. And given all the praise Nginx receives for the serving of static pages and the use as a proxy I have a hard time believing it.

I'm on Debian Squeeze and was first using a package from Debian Backports ( http://backports.debian.org/ ). I then later tried to compile my own version, making sure epoll is in use, with no difference.

I tried many of the tips and tricks found online, made sure the static files are indeed served by Nginx and not Jetty, and that none of the described pitfalls apply ( http://wiki.nginx.org/Pitfalls ), but nothing has changed.

Could it be that for a low traffic site, Apache could actually outperform Nginx noticeably in such a use case?

I'd hate to give up now, as I really like Nginx's lightness and also the way it is configured. Below the configuration in use. I hope somebody can help me and shed some light on what's going wrong.

Best,

Jürg

server {
server_name lineto.com;
root /srv/www/lineto.com/htdocs;
access_log /var/log/nginx/lineto.com.access;
error_log /var/log/nginx/lineto.com.error error;

location / {
proxy_pass http://localhost:8080/lineto/;
proxy_redirect default;
include proxy_params;
}

# Just pass these through to root
location /img/ {}
location /js/ {}
location /1.0/ {}

# Serve files with these extensions directly from root
location ~ \.html$ {}
location ~ \.css$ {}
location ~ \.ico$ {}
}


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Poor performance in serving of static files

Jürg Lehni July 17, 2011 06:20PM

Re: Poor performance in serving of static files

Ensiferous July 17, 2011 08:24PM

Re: Poor performance in serving of static files

Jürg Lehni July 18, 2011 02:04AM

Re: Poor performance in serving of static files

Igor Sysoev July 18, 2011 03:00AM

Re: Poor performance in serving of static files

Jürg Lehni July 18, 2011 04:46AM

Re: Poor performance in serving of static files

Igor Sysoev July 18, 2011 05:08AM

Re: Poor performance in serving of static files

Jürg Lehni July 18, 2011 05:18AM

Re: Poor performance in serving of static files

Maxim Dounin July 18, 2011 05:14AM

Re: Poor performance in serving of static files

Jürg Lehni July 18, 2011 05:24AM

Re: Poor performance in serving of static files

Igor Sysoev July 18, 2011 05:58AM

Re: Poor performance in serving of static files

Jürg Lehni July 18, 2011 06:02AM

Re: Poor performance in serving of static files

Jürg Lehni July 18, 2011 04:48AM

Re: Poor performance in serving of static files

Ed W July 18, 2011 08:58AM

Re: Poor performance in serving of static files

Jürg Lehni July 18, 2011 09:50AM

Re: Poor performance in serving of static files

Maxim Dounin July 18, 2011 10:10AM

Re: Poor performance in serving of static files

Jürg Lehni July 18, 2011 10:54AM

Re: Poor performance in serving of static files

Maxim Dounin July 18, 2011 11:34AM

Re: Poor performance in serving of static files

Jürg Lehni July 19, 2011 05:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 285
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready