2015-11-08 14:22 GMT+01:00 莎士比亚说: <657985552@xxxxxx>:
Hi moran and others;yesterday i get the pg problem again, and i use perf top Observation follows:PerfTop: 11574 irqs/sec kernel: 2.2% exact: 0.0% [4000Hz cycles], (all, 32 CPUs)81.39% postgres [.] s_lock5.42% postgres [.] LWLockAcquire4.59% postgres [.] LWLockRelease3.06% postgres [.] TransactionIdIsInProgress0.38% postgres [.] PinBuffer0.31% postgres [.] TransactionIdPrecedes0.27% postgres [.] UnpinBuffer0.19% postgres [.] TransactionIdIsCurrentTransactionId0.16% postgres [.] heap_hot_search_buffer0.15% [kernel] [k] number.isra.10.14% [kernel] [k] kallsyms_expand_symbol.constprop.10.10% [kernel] [k] module_get_kallsym0.10% libc-2.17.so [.] __strcmp_sse420.09% [kernel] [k] _raw_spin_lock0.09% postgres [.] hash_search_with_hash_valueis spin lock problem ? I need everyone's help to solve the problem.thsnks!
yes, it is spin lock problem. you can try to limit number of active connections - http://www.enterprisedb.com/postgres-plus-edb-blog/amit-kapila/read-scalability-postgresql-95. You can try 9.4, where some issues is fixed
When you hit this issue, the basic prerequisite is test case. If you can run the simulation with this issue, then we can identify bottleneck.
You can try to check lwlocks via systemtap http://postgres.cz/wiki/Monitorov%C3%A1n%C3%AD_lwlocku_pomoc%C3%AD_systemtapu - the article is in Czech language, but this page support Google transalator.
Regards
Pavel