Re: Linux/PostgreSQL scalability issue - problem with 8 cores

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub Ouhrabka <kuba@xxxxxxxxxx> writes:
> What does it mean?

Look at src/include/storage/sinval.h and src/include/utils/syscache.h.
What you seem to have here is a bunch of tuple updates in pg_class
(invalidating caches 29 and 30, which in 8.2 correspond to RELNAMENSP
and RELOID), followed by a bunch of SharedInvalRelcacheMsg and
SharedInvalSmgrMsg.

What I find interesting is that the hits are coming against
nearly-successive tuple CTIDs in pg_class, eg these are all
on pages 25 and 26 of pg_class:

> LOG:  sending inval msg 30 0 25 45 30036 4294936595
> LOG:  sending inval msg 29 0 25 45 30036 2019111801
> LOG:  sending inval msg 30 0 26 11 30036 4294936595
> LOG:  sending inval msg 29 0 26 11 30036 2019111801
> LOG:  sending inval msg 30 0 25 44 30036 4294936597
> LOG:  sending inval msg 29 0 25 44 30036 3703878920
> LOG:  sending inval msg 30 0 26 10 30036 4294936597
> LOG:  sending inval msg 29 0 26 10 30036 3703878920
> LOG:  sending inval msg 30 0 26 9 30036 4294936616
> LOG:  sending inval msg 29 0 26 9 30036 3527122063
> LOG:  sending inval msg 30 0 25 43 30036 4294936616
> LOG:  sending inval msg 29 0 25 43 30036 3527122063

The ordering is a little strange --- not sure what's producing that.

I can think of three things that might be producing this:

1. DDL operations ... but most sorts of DDL on a table would touch
more catalogs than just pg_class, so this is a bit hard to credit.

2. VACUUM.

3. Some sort of direct update of pg_class.

The fact that we have a bunch of catcache invals followed by
relcache/smgr invals says that this all happened in one transaction,
else they'd have been intermixed better.  That lets VACUUM off the
hook, because it processes each table in a separate transaction.

I am wondering if maybe your app does one of those sneaky things like
fooling with pg_class.reltriggers.  If so, the problem might be soluble
by just avoiding unnecessary updates.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux