Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: web server woes!



Op 14-jun-05 om 21:15 heeft Jan Steinman het volgende geschreven:

My sites are of three kinds: hand-coded static sites (very snappy), a hand-coded PHP/MySQL artists' gallery package (still pretty lightweight), and MediaWiki (slow as a slug :-).

When I have this problem, it isn't necessarily the slow MediaWiki sites that are stuck. But it's always a spider at the end of the log. (Of course, that may simply be statistical probability... :-)

Maybe, but it might also mean that a lot of requests kill of the server. Of course, with a load figure as high as you mention, *all* performance will be out the window, for the static sites too.
You say it's always the spiders who are near when bad stuff happens. But are they crawling the lightweight sites or the heavier ones? Or isn't there a pattern?


Depending on how much memory the G4 has...
1.12GB. It's been plenty so far.

Ah. MediaWiki can use memcached -- dunno if/how that runs on OS X, but I'd assume it would work.
It does on Linux. Using memcached should speed up the wiki considerably, I suppose, since it would mean less trips to the database.


When top reaced 0% idle, was named anywhere near the busiest processes (top -u)?
No. As noted, lookupd seems to be the major hog. Even after reading the man page, I can't claim I understand why. It seems to be serving as a cached for named, among other things?

I believe so, yes.

Of course, blocking all search engine bots is not a long term solution.
Exactly! (Although I don't feel too bad about blocking msn... :-)

Heh =]

It has a few things it doesn't like -- nothing that would seem to tie up lookupd. Missing files, a few PHP errors that I should clean up, but have been there forever (undefined index, undefined variable, etc.)

That's NOTICE stuff, that shouldn't impact performance the way it does on your machine.


Here's what top -u looks like at the moment, when it's working fine:
PhysMem: 124M wired, 118M active, 349M inactive, 592M used, 559M free
VM: 4.28G + 70.1M 69701(0) pageins, 236728(0) pageouts
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
11923 top 23.1% 2:36.89 1 22 26 360K 464K 732K 27.1M
5986 lookupd 21.6% 26:52:58 3 40 2327 65.5M+ 776K 45.4M 264M

Nothing too spectecular here -- you do have memory to burn, though, so I'd really look into the memcached thing. Especially since your machine might be underpowered.


<other mail>

PhysMem: 124M wired, 125M active, 401M inactive, 652M used, 499M free
VM: 4.78G + 70.1M 70007(0) pageins, 236746(0) pageouts
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
5986 lookupd 100.5% 27:16:57 24 88 2375 68.5M+ 776K 48.4M+ 275M-
11923 top 11.0% 9:11.91 1 34 26 368K 464K 740K 27.1M

There's still oodles of memory free, so I'd really look into upping the amount of spareservers for apache -- can't hurt. Spawning processes is, according to an article I read recently, something that OS X is less than top-notch in.


What does console.log say, if anything?

Oh, and connected to what Walter Lee Davis meant (I think):
what is the ServerName configured? Is UseCanonicalName set to On or Off?


I had a test apache running on my G4, too, but I was increasingly frustrated by the lack of performance. Of course, it was the development machine, so a request would be a double hit: the browser would eat CPU requesting and rendering the page, and Apache/PHP/MySQL would eat CPU spitting out content to the browser. That's on a G4@350, and I ended up doing development on a (remote) Linux server. Even with the lag that's caused by "working over FTP" it's a lot faster.


I suppose I'm kinda trying to say "Dude, maybe you should throw some more CPU muscle at it". =]


Even more curious than before,

Max

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/web-dev/email@hidden

This email sent to email@hidden
References: 
 >web server woes! (From: Jan Steinman <email@hidden>)
 >Re: web server woes! (From: Max Roeleveld - Qualion Internet Services <email@hidden>)
 >Re: web server woes! (From: Jan Steinman <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.