Re: Command statistics system (cmdstats) - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Command statistics system (cmdstats)
Date
Msg-id CA+Tgmoa-rgWRGgxi4o8W=OdTJ92TO3VkcLBznBKUP0NdHwPUJA@mail.gmail.com
Whole thread Raw
In response to Command statistics system (cmdstats)  (Mark Dilger <mark.dilger@enterprisedb.com>)
Responses Re: Command statistics system (cmdstats)  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Wed, Mar 4, 2020 at 10:43 PM Mark Dilger
<mark.dilger@enterprisedb.com> wrote:
> The two main differences are that
>
> (1) This implementation is based on commandtags as enums, not strings and
> (2) This implementation uses techniques to reduce lock contention
>
> I think (2) is the more important part.

My spidey sense is tingling here, telling me that we need some actual
benchmarking. Like, suppose we test the two patches under normal cases
and under cases that are constructed to be as bad as possible for each
of them. Or suppose we test this patch with the lock mitigation
strategies and then remove the mitigations for some inexpensive
command (e.g. SHOW) and then use pgbench to spam that command. Like
you, I suspect that the locking mitigations are important in some
workloads, but it would be good to have some figures to back that out,
as well as to find out whether there's still too much overhead.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Internal key management system
Next
From: Alexey Kondratov
Date:
Subject: Re: Physical replication slot advance is not persistent