答复: [HACKERS] why after increase the hash table partitions, TPMC decrease

Поиск
Список
Период
Сортировка
От Xiaoyulei
Тема 答复: [HACKERS] why after increase the hash table partitions, TPMC decrease
Дата
Msg-id E8870A2F6A4B1045B1C292B77EAB207C5BA39383@SZXEMA501-MBX.china.huawei.com
обсуждение исходный текст
Ответ на Re: why after increase the hash table partitions, TPMC decrease  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: 答复: [HACKERS] why after increase the hash table partitions, TPMC decrease  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers

I already modified MAX_SIMUL_LWLOCKS to make sure it is enough.

 

Total RAM is 130G, and I set shared_buffers 16G, CPU and IO is not full. 50% CPUs are idle. So I think maybe pg is blocked by some place in itself.

 

 

发件人: Amit Kapila [mailto:amit.kapila16@gmail.com]
发送时间: 201492 19:31
收件人: Xiaoyulei
抄送: pgsql-hackers@postgresql.org
主题: Re: [HACKERS] why after increase the hash table partitions, TPMC decrease

 

On Tue, Sep 2, 2014 at 2:09 PM, Xiaoyulei <xiaoyulei@huawei.com> wrote:
>
>  
>
> We use benchmarksql to start tpcc test in postgresql 9.3.3.
>
> Before test we set benchmarksql client number about 800. And we increase the hash partitions from 16 to 1024 , in order to reduce the hash partition locks competition.
>
> We expect that after increase the number of partitions, reduces lock competition, TPMC should be increased.

 

I think you can expect some increase mainly if your test is

read only and you have sufficient RAM such that it can contain

all the data, for other cases there can be I/O due to which you

might not see any increase.

 

> But the test results on the contrary, after modified to 1024, TPMC did not increase, but decrease.
>
> Why such result?
>
> We modify the following macro definition:
>
> NUM_BUFFER_PARTITIONS 1024
>
> LOG2_NUM_PREDICATELOCK_PARTITIONS 10
>
> LOG2_NUM_LOCK_PARTITIONS 10

Increasing these numbers might lead to error

"too many LWLocks taken", unless you increase

MAX_SIMUL_LWLOCKS.  Once you can check the server

log if it contains any errors, that might lead to decrease in

performance.

 

Also another side effect would be that increasing above numbers

will lead to increase in shared memory usage.

 


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: why after increase the hash table partitions, TPMC decrease
Следующее
От: Jeevan Chalke
Дата:
Сообщение: Re: Re: proposal: ignore null fields in not relation type composite type based constructors