Re: Add GUC to tune glibc's malloc implementation.

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Ronan Dunklau <ronan(dot)dunklau(at)aiven(dot)io>, pgsql-hackers(at)postgresql(dot)org
Cc: tomas(dot)vondra(at)enterprisedb(dot)com
Subject: Re: Add GUC to tune glibc's malloc implementation.
Date: 2023-06-23 20:55:51
Message-ID: e1ce9d7e-745d-5ae9-208a-3e57065a11ec@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22.06.23 15:35, Ronan Dunklau wrote:
> The thing is, by default, those parameters are adjusted dynamically by the
> glibc itself. It starts with quite small thresholds, and raises them when the
> program frees some memory, up to a certain limit. This patch proposes a new
> GUC allowing the user to adjust those settings according to their workload.
>
> This can cause problems. Let's take for example a table with 10k rows, and 32
> columns (as defined by a bench script David Rowley shared last year when
> discussing the GenerationContext for tuplesort), and execute the following
> query, with 32MB of work_mem:

I don't follow what you are trying to achieve with this. The examples
you show appear to work sensibly in my mind. Using this setting, you
can save some of the adjustments that glibc does after the first query.
But that seems only useful if your session only does one query. Is that
what you are doing?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-06-23 21:05:52 Re: [PATCH] pg_regress.c: Fix "make check" on Mac OS X: Pass DYLD_LIBRARY_PATH
Previous Message Peter Eisentraut 2023-06-23 20:41:06 Re: Remove deprecation warnings when compiling PG ~13 with OpenSSL 3.0~