Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2005-06-06, 08:47 AM   #1
cellinis
They have the Internet on computers, now?
 
Join Date: Feb 2005
Location: Paris
Posts: 146
Server Setup

Hi

This one is for guys who are at ease with the sysadmin stuff.

I have a machine that basically hosts a single site for mgps. However, under extreme load conditions, the server stops responding. Searching for solutions, I came up with the following:
Use thttpd (or similar small server) to serve videos/images/html) and apache for php based tasks for maximum output.
Now my site is divided into two parts - maindomain that hosts static html pages with movies etc, and a subdomain that hosts a link tracking script using php/mysql.

The idea would be to put maindomain on thttpd server and subdomain on apache server.

Questions:
1. Has anyone tried it? Did it really increase the performance of the machine?
2. Anyone knows of where I can find some tuts on doing this?
3. How much ram should ideally be required for serving 130-180k uniques per day for MGP galleries? I am currently on 2GB; and I thought that it should be enough...
__________________
Submit your freesites & galleries here and here.
cellinis is offline   Reply With Quote
Old 2005-06-06, 08:48 AM   #2
cellinis
They have the Internet on computers, now?
 
Join Date: Feb 2005
Location: Paris
Posts: 146
In case it ain't clear, the site is hosted on a dedicated box and is the only site hosted on this box.
__________________
Submit your freesites & galleries here and here.
cellinis is offline   Reply With Quote
Old 2005-06-06, 08:50 AM   #3
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
This is why I always get managed hosting. I can just send an e-mail off to my host that says make it work and so that I can go about getting traffic and making sales.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2005-06-06, 09:09 AM   #4
cellinis
They have the Internet on computers, now?
 
Join Date: Feb 2005
Location: Paris
Posts: 146
Hey Cleo!
I'm on managed hosting too. But I want to get a second opinion on this one plus take a look at other available options myself. Their solution is simple, increase RAM, increase CPU power... but then I remember CD34 (that's his code right?) graph on the P3 handling 100MBPS, and I just can't figure out why my box shouldn't handle the same loads too.
This secondary server has been hogging a lot of my time lately, that is fucking true... with all the other things I must do in tandem...
__________________
Submit your freesites & galleries here and here.
cellinis is offline   Reply With Quote
Old 2005-06-06, 09:11 AM   #5
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
Like I posted in another thread, CD34 makes servers do amazing things. I'm still in awe at how fast my stuff is now that I moved to his hosting.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2005-06-06, 09:20 AM   #6
cellinis
They have the Internet on computers, now?
 
Join Date: Feb 2005
Location: Paris
Posts: 146
So Nows a good time for me to ask... what's his company site? I tried looking up on his provile, couldn't find anything.
__________________
Submit your freesites & galleries here and here.
cellinis is offline   Reply With Quote
Old 2005-06-06, 09:26 AM   #7
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
Quote:
Originally Posted by cellinis
So Nows a good time for me to ask... what's his company site? I tried looking up on his provile, couldn't find anything.
You would think he would have it is his sig but since he doesn't I have it in mine.

Click my link list button or use the drop down menu in my sig.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2005-06-06, 10:48 AM   #8
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
Quote:
Originally Posted by Cleo
You would think he would have it is his sig but since he doesn't I have it in mine.
Maybe he should change his sig to say "PM Useless Warrior and ask him for my hosting URL" |cool|
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Old 2005-06-06, 10:54 AM   #9
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
I fixed me sig

But I still love the HPA on my submit page.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2005-06-06, 11:35 AM   #10
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Apache can handle 20mb/sec without problem. you don't mention which version of Apache, but, if you are running Apache2, mpm-worker is much faster than mpm-prefork if you are doing just static hosting. Of course, mpm-prefork is required for php to run as a module, but, mpm-worker + fastcgi/php is actually faster than mpm-prefork. You say the machine hung, but, that can mean different things. Did it slow to a crawl and have a load of 80+, or did the machine require a reboot that worked for a while afterwards?

thttpd only runs on one thread, so, if you are using HyperThreading and have a dual cpu, all requests will get routed to one cpu -- if you haven't masked your netcard irq to the same cpu that thttpd happens to run on, you could run into other performance issues. boa is also quite fast, but, again, single threaded. Dan Kegel talks a lot about web performance in his C10K paper. Apache also has a series of modifications called the Accelerating Apache project. Most of these are patches that Apache turned down because they broke functionality in the quest for speed. The patches are old, but, none of the issues addressed in the 'SGI' patches have ever been 'fixed'.

If you're looking for all out speed, and you're talking a usermode process, Fnord with dietlibc is very fast as is Chromium. If you don't mind kernel modifications, Tux is what I would suggest.

However, back to your initial Apache issue.

Apache was built to serve reliably, and then quickly. The default configs of most apache installations are sometimes quite bad. The other thing you need to do is identify WHY apache bogs down. When the machine gets slow, are processes waiting on IO, or is the machine CPU bound? It would be doubtful that any machine nowdays would be bound by interrupts.

ExtendedStatus inserts timestamp checks throughout the process -- you can see the obvious detriment here. That is usually one of the first things to go.
If you use mod_rewrite on heavily used pages, move that to your apache config and turn off Overrides. Check to make sure that AllowOverride all isn't set at the root directory (this can kill performance on busy sites). Make sure you don't have any deny from .domain.com in your .htaccess and that reverse dns resolution is turned off in apache. strace one of the child pids to see what it is doing. Then you can see where the bottleneck is.

Or, PM Useless Warrior and ask him for my hosting URL.

http://www.boa.org/ (I always found it ironic this site was hosted on apache)
http://www.kegel.com/c10k.html
http://aap.sourceforge.net/
http://www.fefe.de/fnord/
http://chromium.com/x15.html
http://www.redhat.com/docs/manuals/t...ual/intro.html

and last but not least

http://colo-cation.com/
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2005-06-06, 12:17 PM   #11
cellinis
They have the Internet on computers, now?
 
Join Date: Feb 2005
Location: Paris
Posts: 146
Cd34, that's a lot of informative links First I'll have to go over them and look up the patches you talked about before responding informatively to your post.
In short:
It is 1.3.33 Apache (I didn't upgrade to 2)
It is a single celeron CPU.
I played around with the default configs on Apache a bit, but didn't take it overboard since I am hosting a production site on this server. The server is set to max connections of 312. Anything over it makes it unstable.
I haven't bothered with htaccess on this domain other than hotlink protection for movie files... and I'll turn off the reverse dns solution. ExtendedStatus is in the httpd.conf, right? I'll check it out too.

Plus, with your permission, I'll also forward your post to my current host and do a bit of reading on my own.
__________________
Submit your freesites & galleries here and here.
cellinis is offline   Reply With Quote
Old 2005-06-06, 12:28 PM   #12
cellinis
They have the Internet on computers, now?
 
Join Date: Feb 2005
Location: Paris
Posts: 146
When I said hung, I meant it slowed to a crawl. Upon a reboot, it works fine for about a minute (the time the connections start comming) and then gets bogged down again. On kernal modifications or usermode processes, I don't have any preferences, whatever gets my pages loaded faster with minimal work (I'm lazy lol). Tux seems a tedious installation but let me read up on it.
If my host doesn't come up with a solution by tonight, then I'll have a decision to make.... should I use Cleo's link or should I ask Useless Warrior... or should I just click on colo-cation link you provided
__________________
Submit your freesites & galleries here and here.
cellinis is offline   Reply With Quote
Old 2005-06-06, 04:13 PM   #13
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
you can pass it on.

Use Cleo's link -- she'll get the referral credit
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:22 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc