From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Xiaoyulei <xiaoyulei(at)huawei(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] RE: 答复: [HACKERS] why after increase the hash table partitions, TPMC decrease |
Date: | 2014-09-04 13:07:33 |
Message-ID: | CA+Tgmob8WYJ8HKZvTnYedqxfbG9nsA7Bsb-=C3U15dkkjUJtWw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 2, 2014 at 11:02 PM, Xiaoyulei <xiaoyulei(at)huawei(dot)com> wrote:
> benchmarSQL has about half reads. So I think it should be effective.
>
> I don't think BufFreelistLock take much time, it just get a buffer from list. It should be very fast.
You're wrong. That list is usually empty right now; so it does a
linear scan of the buffer pool looking for a good eviction candidate.
> The test server has 2 CPUs and 12 cores in each CPU. 24 processor totally. CPU Idle time is over 50%. IO only 10%(data is in SSD)
>
> I perf one process of pg. The hot spot is hash search. Attachment is perf data file.
I think you need to pass -g to perf so that you get a call-graph
profile. Then you should be able to expand the entry for
hash_search_with_hash_value() and see what's calling it.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Shaun Thomas | 2014-09-04 13:09:22 | Re: PL/pgSQL 2 |
Previous Message | Heikki Linnakangas | 2014-09-04 13:05:16 | Re: Escaping from blocked send() reprised. |