Re: Make NUM_XLOGINSERT_LOCKS configurable

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Make NUM_XLOGINSERT_LOCKS configurable
Дата
Msg-id 2266698.1704854297@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Make NUM_XLOGINSERT_LOCKS configurable  (<1111hqshj@sina.com>)
Ответы Re: Make NUM_XLOGINSERT_LOCKS configurable
Список pgsql-hackers
<1111hqshj@sina.com> writes:
> I recently used benchmarksql to evaluate the performance of postgresql. I achieved nearly 20% improvement
> with NUM_XLOGINSERT_LOCKS changed from 8 to 16 under some cases of high concurrency. I wonder whether
> it is feasible to make NUM_XLOGINSERT_LOCKS a configuration parameter, so that users can get easier to optimize
> their postgresql performance through this setting.

Making it an actual GUC would carry nontrivial costs, not least that
there are hot code paths that do "foo % NUM_XLOGINSERT_LOCKS" which
would go from a mask operation to a full integer divide.  We are
unlikely to consider that on the basis of an unsupported assertion
that there's a performance gain under unspecified conditions.

Even with data to justify a change, I think it'd make a lot more sense
to just raise the constant value.

            regards, tom lane



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

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: add AVX2 support to simd.h
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows