I was wondering if Apache has its configuration tuned to crank the most speed out of it (while eventually controlling resource usage), or if you have ever considered to use some light server like Nginx in place of Apache?
Unless Apache and Nginx are fundamentally the same on the API-ish-side of things, it would be relatively easy, but we are, and have been, set up on an Apache server already and if Nginx will run things differently it'll be difficult to tweak the site to accommodate those changes. We'd almost certainly be better off writing the site for that specific backend than porting it over.

While we have the flexibility - now - to use a different server backend, if we move back to our previous host we may be stuck with Apache so there's really no huge benefit to using one backend for this experiment.
Nginx configuration is substantially different (read: no support for .htaccess, even though the same or more features provided by it are supported, just configured in a different way). If you're struggling with Apache taking up too much resources, I suggest you take a serious look at Nginx and see if switching to it would be worth the reconfiguration and eventual software rewrites, or if it's better to keep getting more powerful servers to accommodate Apache with your current configuration.
PHP is available for Nginx through PHP-FastCGI (managed with PHP-FPM), and from what I know most common forum software works well on it. It's also possible to set up Nginx so that it only serves static content and leaves more complicated things to Apache, for example.
It wasn't the server that was taking up resources it was our hosted projects. Namely the wiki's and SourceCoder, jsTIfied may have been on that list too. Sadly, we don't have anything to compare to from before we had those projects but our resources were never as strained as they are - were? - now. In the past 7 days, our average load on the dedicated has been .20 and our highest was 3.6 for a brief hour or so before averaging back out (which looks like it happened around the same time we copied the site over, but I'll have to double check).

Even if Apache was the reason we were tight on available resources, our current dedicated is plenty of times better than the shared hosting we moved from for now.
Actually, that's not accurate. All our projects are efficient and optimized, the biggest problems are (1) Sax and (2) the sheer volume of hits (150K+ per day) we are getting
I was implying that they are used enough to require more resources, not that they weren't optimised.

I forgot that SAX had also been a hard hitter too.
comicIDIOT wrote:
I was implying that they are used enough to require more resources, not that they weren't optimised.

I forgot that SAX had also been a hard hitter too.
No worries, that makes perfect sense. Smile We don't actually rely on that many of Apache2's features, but I consider it stable and proven enough to stick with it even with slightly higher resource usage. Plus on our Surpass hosting we don't have a choice about the webserver we're using.
I wouldn't say the difference between Nginx and Apache2 resource usage is slight, specially with 150K hits per day (and maybe with peaks at specific times of the day?)... but I already left my suggestion.
gbl08ma wrote:
I wouldn't say the difference between Nginx and Apache2 resource usage is slight, specially with 150K hits per day (and maybe with peaks at specific times of the day?)... but I already left my suggestion.
Can you point me at a guide that you feel is particularly good at highlighting the performance and feature contrasts between those two options?
KermMartian wrote:
gbl08ma wrote:
I wouldn't say the difference between Nginx and Apache2 resource usage is slight, specially with 150K hits per day (and maybe with peaks at specific times of the day?)... but I already left my suggestion.
Can you point me at a guide that you feel is particularly good at highlighting the performance and feature contrasts between those two options?


I never searched for a real comparison between Apache and Nginx, after seeing for myself that Nginx uses less resources for the same or more speed. After a quick search, I came up with this:
http://www.wikivs.com/wiki/Apache_vs_nginx
http://www.drdobbs.com/open-source/is-nginx-scalability-beating-apache/232600531
The first is more about the advantages of Nginx, the second is more of an opinion article containing an interesting bit:
Quote:
If it's a lower concurrency site where the bottleneck is down to PHP or Ruby or whatever processing issue, then Nginx is less helpful.

Nginx is better for serving static content, so if most of the overhead comes from dynamic content (which it seems to be the case, at least I recall you talking about SAX) then making the switch won't help as much. Using Nginx as a proxy server so that Apache doesn't need to care about serving static content may be more appropriate - that way each of the web servers can focus on what they are best at.

From my personal experiences (which consist on using just Nginx+PHP-FPM on a VPS), with many visitors at once, Nginx usually keeps a lower and steadier memory usage and page load times when compared to Apache.

Also note that there are other light web server solutions, which may be more appropriate for serving dynamic content while still reducing resource usage. There's lighttpd which is more Apache-like, for example.
Over two months I've been monitoring the server we now host Cemetech on. Almost a month ago, we moved Cemetech to this server. This graph represents the past 30 days and the black line indicates when the transfer happened.


It's important to note, that the Memory Usage graph at top is a representation of free memory, not used memory.
The graphs auto-scale to the highest value and does not accurately represent any limits.


I am not able to directly correlate any spikes to any particular event. The server seems to consume RAM until there's hardly any free memory left, then it purges RAM, resulting in a big spike which continually gets consumed; this has happened two times before we moved Cemetech. I'll continue to monitor the server but it seems that we are far from reaching any limits imposed upon us.
Apologies for the necrobump. I ran across this topic while looking for something unrelated, and thought it would be fun to post a more recent activity graph.
comicIDIOT wrote:
That is pretty impressive long-term growth.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement