views:

125

answers:

2

What kind of performance gain will I get from ditching Apache for NGINX if I have a very low traffic web site (e.g. 1000 unique visitors a day, approx 5 requests/sec at highest load, and approx 50 MB of traffic per day since lots of photos are being displayed).

Specifically, what gains (if any) would I have for:

  • Loading speed of the web site from the web user perspective
  • Server load
  • Concurrency

Again, this is for a low traffic web site and I'm running on a VPS.

+2  A: 

If you have such a low traffic, I am not sure you need to go through the troubles of changing your webserver : kind of looks like "premature optimisation" to me.

Well, at least, if those 1,000 visitors don't visit too many pages, and don't all arrive at exactly the same time.


You'd probably have way better gains for your users (and that's what matter !) by activating gzip compression for JS/CSS/HTML, and/or regrouping JS/CSS files into one instead of several, for instance.

About that, running yslow on your webite, and following some of the advices it'll give you, will probably bring more speed to your users than changing server.


Just to make clear : I don't say that you shouldn't optimize your server -- but that, with such a low traffic, it might be more interesting to display pages faster ; at least, first.

Pascal MARTIN
Using YSLOW, my web site receive an A rating. Meaning, I already have gzip enabled, I minimize the # of JS/CSS files, etc.
Also, my web site is entirely HTML (no PHP/JSP/Python). I'm simply curious to know if the NGINX works well for low traffic web sites as well.
Ouch ^^ Nicele done, so ! (I don't see that many sites that get an A ^^ )
Pascal MARTIN
Thanks. Seriously. I went to great lengths to achieve that A rating. I'm a little proud of it :)
You can be ^^ Even if it's probably "overkill", you probably can be kinda proud of it -- and I'm guessing it was fun ^^
Pascal MARTIN
So with that being said, any performance gain by going to NGINX? My concern right now is that I load a lot of imagines from my site since it's a real estate web site showing pictures of all the homes. At times, it appears slow to load. Would moving to NGINX be of benefit or simply using a CDN for all the house photos?
I don't really know if / how much you'll gain ; I suppose no-one ever really did that kind of comparison is such low-load conditions... Still, I doubt that much time is spent on the "serving" part (Apache is quite fast, when it comes to serving static files) : the difference should **probably** not be that big ; maybe a couple milliseconds ? But I doubt end-user will perceive that ;; maybe a CDN would help, if you have users all arround the world, or they are "far" from your server... but it's another "maybe"...
Pascal MARTIN
A: 

Is your Apache server taking too much CPU or RAM? I switched from Apache to Nginx to save memory, especially to serve static file: I seem to be using about 75% less memory with Nginx.

Like the other comment said, are you sure that Apache is the bottle neck? If you are not swapping, then you have enough memory. I don't think you will save any significant server side latency.

Julien
Just to make sure I understand correctly, what you're saying is that you don't believe NGINX will serve up my HTML web site quicker to the end user for them to notice a difference?
Right, from what you described, they won't see any difference. That said, I found using Nginx easier than Apache. If you think you will significantly increase your number of hits (so your server load), you can start switching now.
Julien