On Wed, 3 Aug 2011 20:39:12 +0200
"Giampaolo Tomassoni" <giampa...@tomassoni.biz> wrote:

> The problem is possibly this:
[ASCII art deleted]

> Instead, if one rewrites the boundaries this way:
[More ASCII art deleted]

That will help, but *no* contention is always better than *some*
contention, and the difference becomes more important the busier your
server.

[...]

> you may see that the contention per scan lasts at most ~5ms, which is
> ~1/1000 of the above one.

Except that in real life, the write transaction lasts much longer,
especially when multiple processes are trying to update the same rows.
(That happens quite often.)

> It is a matter of facts, however, that I don't know if the transaction
> boundaries in Mail::SpamAssassin::BayesStore::MySql are like the ones
> I depicted in the previous figure. I don't know exactly the timing of
> the various bayes operators in SA.

Looking at the code, it seems that the reads and the writes are done
in non-overlapping transactions.

Regards,

David.

Reply via email to