View Full Version : Server loads and high volume sites
MPDev
09-20-2006, 07:49 PM
I've been meaning to post this for a while; but some time back I was having some performance issues on my server. With 1,000+ users online at my forums I was getting some long page generation times; after doing some research I found a solution that has helped me greatly.
I am running two web servers on my server - one Apache server bound to my main IPs and one thttpd server bound to a single IP which I use for all image hosting. By changing my configuration to load all the style images from the lightweight thttpd server I was able to remove the need for Apache to handle all the image requests. Using Apache to host up all those images was a resource dog because of the need to have PHP, MySQL and all the other extensions loaded when all I want was to serve up images.
So, if you have a forum with a high load and are looking to find ways to make your forums a little snappier; you might consider trying this solution.
Cheers.
trackpads
09-20-2006, 09:18 PM
Do you have a tutorial for something like this? I definately could use it! Thanks!!
MPDev
09-21-2006, 11:38 PM
I'd be glad to post how I did it - it was a little daunting at first, but it pretty straight forward.
trackpads
09-22-2006, 12:46 AM
Please!
Ntfu2
09-22-2006, 01:27 AM
Would the attachment images also be getting served from the thttpd server.
I'm serving up probably on average 15-50 attachments per thread and sometimes alot more, and i think its cuasing alot of my load issues.
Thanks
I know Erwin did something similar to this and it reduced his server load a lot! :) I have not gotten to the point where I need multiple servers yet, but I do plan on doing this is the need ever arises. :)
MPDev
09-23-2006, 01:36 AM
Basically it works like this - you need to have multiple IPs assigned to your server. You'll need an IP you haven't used because you'll be running a web server that doesn't process PHP or anything else, just serves up html and images.
Make sure your apache doesn't bind to that IP; just the other IP(s) for your apache sites which have PHP, MySQL, etc.
Install thttpd and configure it to run on the new IP address , create the images directory and move all your skin images, etc into that tree and start it. Then change your skins to use either the new IP or a domain you assign to the new IP.
I can post my thttpd config file if that helps. I created a domain that I use only to host my images from and all that traffic is offloaded from my Apache server saving alot of processing time loading the fullblown Apache when only a lightweight image server is needed.
The only trick is making sure you have a free IP to use (or getting one) and then making sure that thttpd is bound to that IP and everything else to Apache.
mikeclarke
09-23-2006, 03:49 PM
Page generated in 1.70361 seconds with 10 queries [Server Loads: 13.87 6.96 : 4.52]
Hostgator reseller plan.
MPDev
09-23-2006, 04:16 PM
Yikes! That's bad.... First you have a load over 3 - way over 3, over 10 means your server is struggling big time and possibly swapping.
hotwheels
09-23-2006, 04:20 PM
[Page generated in 1.70361 seconds with 10 queries [Server Loads: 13.87 6.96 : 4.52]
Dang, that is bad.....Are you on a shared server? If so, contact them and have them look into that or move you to a less intense server.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.