[nycphp-talk] PHP Solution for Website stats
inforequest
sm11szw02 at sneakemail.com
Thu Jun 3 14:39:56 EDT 2004
Rolan Yang rolan-at-omnistep.com |nyphp 04/2004| wrote:
> Actually, it would be quite easy to import. You would only need a 5
> line shell
> script which sliced and diced the existing logs. Then a mysql query
> to "load data infile into table blag_logs".
>
> For low bandwidth sites, I don't see a problem with mod_log_sql,
> however if you are
> serving lots of pages, you could quickly saturate your network or disk
> i/o bandwidth (depending
> on if your mysql is on the same machine or another).
>
> As an example, I'm hosting a pretty high traffic phpBB for someone
> right now. Sometimes
> the site is hit with like 30+ page requests/sec. PhpBB is quite a hog
> and when people are viewing
> a page full of posts that contain 100+smiley icons, etc (each one
> counting as a hit) you can
> easily run up like 3000 hits/sec. Each hit is an entry in the apache
> log... Now if you had mod_log_sql
> running, your server would have to manage 3000+ mysql inserts per
> sec.. that would place a serious
> load not only on your disk i/o but also cpu. What makes matters worse
> with phpBB, is (and I'm not
> completely sure about this) that the pages are set to "nocache" so
> everything is reloaded upon
> every page access. This keeps the load on the server consistently high
> throughout the day.
>
> ~Rolan
>
Now there's an example of the expertise associated with the NYPHP talk
lists.... and free-as-in-beer as well!
More information about the talk
mailing list