Where's my web server bottleneck?

nathan r. hruby yellowdog-general@lists.terrasoftsolutions.com
Thu Nov 21 08:03:01 2002


On Wed, 20 Nov 2002, bronto wrote:

> >On Wed, 20 Nov 2002, bronto wrote:
> >
> >>  YDL 2.1
> >
> >- Upgrade to 2.3 or make sure you are running a *recent* 2.4 series
> >   kernel.
> 
> Is Apt reliable for this?  I could never get it working in 2.0.  Will 
> it hose any of my existing self compiled applications?
> 

It might.  depends on what you have installed, where it's installed and 
what apt says that it needs to upgrade and the associated dependancies.  
You can always jsut compile a newer 2.4 kernel yourself.

[snip]

> 
> Swap is on the 4gb.  No unallocated space on the 60gb.  Its been two 
> weeks since my last reboot, today was my heaviest day since then, I 
> have X running, and no swap space is being used.
> 

Err.. X has no place on a server :)

[snip]

> >  > connected to internet via bronze DSL (which means 256k up, 768 down) :')
> >>
> >
> >I'm sure you understand the implication of that statement ;)
> 
> Yes, but what I don't know is the relative effects of different 
> upgrades.  I have a net traffic monitor running often and I NEVER see 
> it come close to saturating the network.  I presume it's reading the 
> cards capability and has no clue that the connection's limit is.
> 

You never see it use more than 256k up or you never see your internal 
network saturated?  Is the machine plugged into the DSl modem or are we 
talking though a cable/dsl router thingy?

[snip]

> 
> The 60gig drive is partitioned to contain both the /home and /var 
> directories in separate partitions.
> Are there any docs for jpcaching PostNuke anywhere?  I looked at 
> jpcache and it seemed to me like it wouldn't be that effective if the 
> page was changing all the time.  Curious: what's your pn username, 
> I'd probably recognize it.  I'm bronto.
> 

Don't have one.  I know several of the PostNuke developers from a 
different project :)  

jpcache *will* save a ton of processing time, what you give up is the fact
that the page is auto generated every time.  I doubt that your pages will
be changin on a minute by minute basis, so if you jpcached the PN front
page, with a TTL 5 minutes, that means the machine would only have to run
php to generate that page, once every five minutes - big savings.  
jpcache can also look at $_POST, $_GET and $_COOKIE to determin of it
should feed the user a cached page or live one.  Really it should be a
simple as at the top of every page you want jpache enabled doing a 

$ttl =360; 
include('/path/to/jpcache');

php is fast, but as someone mentioned it's easy to make slow apps, nuke 
is one of them.  Someone mentioned mod_perl+slashcode as a faster 
alternative - I would caution aginst that.  mod_perl really reqires a lot 
of processing power.  yes it can be fast if it has the hardware behind it, 
and it's super powerful, but it's also a complicated and difficult beast 
to master.

One thing I forgot to mention was to poke at apache's config.  The default 
YDL/Redhat rpm's load every module under the sun and it does help to go in 
and prune mod_perl if you're not using it and other things.  Also make 
sure that hostnakelookups is off, or you have a dedicated caching dns 
server running on that machine.  If you're using lots of .htaccess files 
in your site, stop and move them into your httpd.conf file (.htaccess can 
slow things down a lot)  There are a bunch of speed-tuning tips at 
apache's site as well, you may want to look at them.

> >Above that, there are a bunch of services running on that box, if alot of
> >them are getting heavy traffic, you'll maybe want to migrate some of them
> >over to something else (for instance, mail service could move to another
> >slower box without a lot of hassle).
> 
> I had planned on migrating the postnuke services to a speedier box 
> when I outgrew this one, and leaving the other services on this one.
> 

Well.. seeing as we're having this conversation, maybe you shoould start 
thing about that :)

[snip]

> 
> Oh, I know all about the DSL quality of my connection.  For web 
> surfing it's OK, but I frequently experience latencies in responses 
> that I can't blame on the server.  No, I am negotiating a deal with 
> someone I know to get on to their dedicated, genuine T1 running other 
> servers.  No browsers there :').
> 

DSL is a fuzzy beast.  The link is asymettrical (slower up than down)  
which is fine for consuming, not serving which can be part of the reason
for the latencies.  Many providers also implement proxies and transparent
caches to make content consumption appear speedier.  Above that, there's
PPoE which is werid (to me).

> >  > FWIW, the latest complaint I got was that the main page (about 100k
> >>  in size) took 15 sec. to load.
> >>
> >
> >100k is a little big, dontcha think?  Is that page static, dynamic, image
> >heavy?  why's it 100k and what being done to generate it.
> 
> It's data.  No individually heavy images but lots of light ones over 
> and over.  And a banner ad or two.
> 

Images repeated are fine, they'll be pulled fromt he browsers cache on 
successive loads.  Is the "data" generated on the fly by php or not.

Maybe if you posted a link to your site we could look at what's going on 
we could give you some better tips.

-n

-- 
----------------------------------------
nathan hruby <nathan@drama.uga.edu>
computer services specialist
uga drama
http://www.drama.uga.edu/support/
----------------------------------------