Re: Very slow planning performance on partition table

From: Rural Hunter <ruralhunter(at)gmail(dot)com>
To: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Very slow planning performance on partition table
Date: 2014-07-27 15:44:09
Message-ID: 53D51E49.102@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-performance

Anyone? I can see many pg processes are in BIND status with htop. Some
of them could be hanging like 30 mins. I tried gdb on the same process
many times and the trace shows same as my previous post. This happened
after I partitioned my main tables to 60 children tables. And also, I'm
experiecing a cpu peak around 30-60 mins every 1-2 days. During the
peak, all my cpus(32 cores) are full utilized while there is no special
load and the memory and io are fine. Sometimes I had to kill the db
process and restart the db to escape the situation. I tried to upgrade
to the latest 9.2.9 but it didn't help.

在 2014/7/25 22:23, Rural Hunter 写道:
> I run dbg on the backend process and got this:
> (gdb) bt
> #0 0x00007fc4a1b6cdb7 in semop () from /lib/x86_64-linux-gnu/libc.so.6
> #1 0x00000000005f8703 in PGSemaphoreLock ()
> #2 0x0000000000636703 in LWLockAcquire ()
> #3 0x0000000000632eb3 in LockAcquireExtended ()
> #4 0x000000000062fdfb in LockRelationOid ()
> #5 0x0000000000474e55 in relation_open ()
> #6 0x000000000047b39b in index_open ()
> #7 0x00000000005f3c22 in get_relation_info ()
> #8 0x00000000005f6590 in build_simple_rel ()
> #9 0x00000000005f65db in build_simple_rel ()
> #10 0x00000000005de8c0 in add_base_rels_to_query ()
> #11 0x00000000005df352 in query_planner ()
> #12 0x00000000005e0d51 in grouping_planner ()
> #13 0x00000000005e2bbe in subquery_planner ()
> #14 0x00000000005e2ef9 in standard_planner ()
> #15 0x00000000006426e1 in pg_plan_query ()
> #16 0x000000000064279e in pg_plan_queries ()
> #17 0x00000000006f4b7a in BuildCachedPlan ()
> #18 0x00000000006f4e1e in GetCachedPlan ()
> #19 0x0000000000642259 in exec_bind_message ()
> #20 0x0000000000643561 in PostgresMain ()
> #21 0x000000000060347f in ServerLoop ()
> #22 0x0000000000604121 in PostmasterMain ()
> #23 0x00000000005a5ade in main ()
>
> Does that indicate something? seems it's waiting for some lock.
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2014-07-27 16:28:07 Re: Very slow planning performance on partition table
Previous Message klo uo 2014-07-27 13:16:04 Auto-complete and Calltips in SQL Editor

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2014-07-27 16:28:07 Re: Very slow planning performance on partition table
Previous Message Craig James 2014-07-27 15:35:25 Re: Cursor + upsert (astronomical data)