[Spacewalk-list] Postgresql slowness

Jan Pazdziora jpazdziora at redhat.com
Thu Jul 21 15:58:04 UTC 2011


On Wed, Jul 20, 2011 at 12:17:08PM +0100, John Hodrien wrote:
> So making some paltry effort to track down the slowness, I thought I'd log the
> slow queries in postgres (I'm making this up as I go along, I'm no seasoned
> DBA).
> 
> Every package push, I'll get:
> 
> LOG:  duration: 2379.433 ms  statement: SELECT rhn_channel.refresh_newest_package(102, E'server.app.yumreposync')
> 
> The time this takes seems to increase fairly linearly as more packages get
> added.
> 
> Any tips on either making this faster, or at least understanding why it takes
> so long?  Does this really need calling every package during a repo-sync?

After each package "push" is done, the code tries to make sure the
rhnChannelNewestPackage "cache" is in sync, so it recalculates the
whole channel.

We could do it after the whole channel is synced -- but what if the
sync fails before it gets chance to call the refresh?

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat




More information about the Spacewalk-list mailing list