Hmm.

Taking a stab in the dark here, but..

If it's purely a 'hit counter' type affair, and you're updating a single
row, perhaps performance could be gained by instead inserting into a table
(presumably this can be done with single-row level locking - at least in
InnoDB?), and running a regular job that aggregates the contents of this
table into the counter row?

Data won't be up-to-date instantly, but it might reduce contention. Do you
experience contention when the counter is being read from? If so, this could
possibly be reduced using a 'dirty read' (no locking on select), so that
although slightly outdated information may be read, no updates would be
delayed?

Depends on what you're doing, and what you're trying to achieve, really!


Thanks,


Matt.

-----Original Message-----
From: Jim Richardson [mailto:[EMAIL PROTECTED] 
Sent: 25 March 2004 03:17
To: [EMAIL PROTECTED]
Subject: Re: Speeding up MySQL server

On Wed, Mar 24, 2004 at 08:21:15PM -0600, Paul DuBois wrote:
>At 17:55 -0800 3/24/04, Jim Richardson wrote:
>>I have a rather heavily loaded server, which I would like to tweak a
>>little more performance out of. It currently is binlogging although
>>there is no slave yet. Does the process of bin logging take significant
>>resources? It's putting out about 1GB log per day, the IO load on the
>>disks isn't too bad. But I am curious about the internal to MySQL load
>>of logging all that data.
>
>It costs you about 1 percent in performance:
>
>http://www.mysql.com/doc/en/Binary_log.html
>

Thanks for the pointer.

No big deal then, I'll have to actually do some work to improve the
performance of the system :) darn, I was hoping for a quick easy
victory.


OK, so the system gets about 10million hits/day, and each hit, is
acompanied by incrementing a counter in one of the tables. That's where
the vast bulk of the writes come from, unfortunately, the table is
locked with each write, and although it's quick, it still takes time.
Any suggestions on where to look for info on improving this? Kind of a
general question I know, but I don't need someone to do my work, just
point me to someplace I can crib from :)



-- 
Jim Richardson     http://www.eskimo.com/~warlock
Balance the budget. Declare politicions a game species and sell hunting
stamps.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to