Re: why after increase the hash table partitions, TPMC decrease

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Xiaoyulei <xiaoyulei(at)huawei(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: why after increase the hash table partitions, TPMC decrease
Date: 2014-09-02 22:49:57
Message-ID: CAMkU=1ym9DaKKS-ABZRh=vRJs9GLvgNQH9Un1vMiL6JWOWa0gg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 2, 2014 at 1:39 AM, Xiaoyulei <xiaoyulei(at)huawei(dot)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.
>

Can you give the complete invocation parameters for benchmarksql?

How many CPUs/cores do you have?

> We expect that after increase the number of partitions, reduces
> lock competition, TPMC should be increased. But the test results on the
> contrary, after modified to 1024, TPMC did not increase, but decrease.
>
> Why such result?
>

Increasing the partition numbers would only help with contention that is
due to hash collision. If all of the contention is on, for example, the
root block of one index, then increasing the number partitions won't change
that, because that block is always going to map to a single partition.

Can you "perf" or some other profiling tool to find where your bottleneck
is?

Cheers,

Jeff

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2014-09-02 22:50:16 Re: PL/pgSQL 2
Previous Message Joshua D. Drake 2014-09-02 22:42:23 Re: PL/pgSQL 2