"Craig Westerman" <[EMAIL PROTECTED]> writes:

> I'm needing counter for site that receives 80 to 120 hits a minute
> at peak load. Many I have tried cause excessive server load and need
> to be deactivated or they lose data and return to zero without
> warning. All tried so far have been written in Perl writing to a
> file.

I did a similar project recently, and found that an extremely fast way
to do this was keeping the stats in a shared memory segment.  I found
I could do about 40,000 writes/second in Perl (see shmget), and
250,000 in C (see shmget(2) and shmop(2)).  This information isn't
kept across a reboot, but you can poll the segment periodically and
record the value in a file, or else recreate the stats information
from the logs on reboot.

Don't know how mySQL's performance would be for something like this,
but thought I would throw out what I did know.  :-)

Good luck,

----ScottG.

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to