The Future of Performance: Scaling
David Lawrence
dkl at redhat.com
Mon Jan 5 21:29:12 UTC 2009
Max Kanat-Alexander wrote:
> On Tue, 30 Dec 2008 22:16:20 -0600 "Bradley Baetz" <bbaetz at acm.org>
> wrote:
>
>> In general, we scale read-only pretty well.
>>
>
> Yeah, although there are a few operations that don't take as
> much advantage of that as they could. There are probably a lot more
> places where we could be using the shadow DB.
>
>
>> The shadowdb stuff pushes db reads off, but Bugzilla doesn't have a
>> clear goal as to how out of date data can be - if we relaxed the rules
>> a bit then some more queries could possibly move to the replication
>> db. However, I don't think that thats much of an issue given the
>> typical read:write ratio.
>>
>
> Yeah, on most installations I don't think it's an issue, but at
> places like bmo it could always be handy to see what else we can push
> off. Apparently the ratio of master reads to slave reads increased a
> lot in 3.2 for some reason, and we should probably look into it.
>
> -Max
>
Now that we allow search engines to index bugzilla.redhat.com using
sitemap index files, we have a large amount
of accesses to show_bug.cgi over the past month. We have seen, using
mysql's process list commands, that
a large amount of "DELETE FROM logincookies WHERE TO_DAYS(NOW()) -
TO_DAYS(lastused) > 30"
statements are being executed that was causing the replicated slaves to
get backed up. This statement is executed
everytime Bugzilla->login is called without auth data and since DELETE
is a SELECT/INSERT block for a table, things could get slower if it is
executed very frequently.
To solve the issue we are moving that code to a separate script that
will be ran once a night to clean up expired
cookies in the logincookies table. By commenting out that line in
Bugzilla::Auth we saw the database load decrease and the slaves were
able to get caught up. Does this sound like something that would be
useful to the
upstream and a bug/patch generated?
Dave
--
David Lawrence, RHCE dkl at redhat.com
------------------------------------
Red Hat, Inc. Web: www.redhat.com
1801 Varsity Drive Raleigh, NC 27606
More information about the developers
mailing list