Re: Performance degradation on concurrent COPY into a single relation in PG16.

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: Performance degradation on concurrent COPY into a single relation in PG16.
Дата
Msg-id CAD21AoDenr=g1rKTMJf8JXmVOJqwmrmjjqPRTR4aBxCoXzFO=w@mail.gmail.com
обсуждение исходный текст
Ответ на Performance degradation on concurrent COPY into a single relation in PG16.  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: Performance degradation on concurrent COPY into a single relation in PG16.  (Heikki Linnakangas <hlinnaka@iki.fi>)
Re: Performance degradation on concurrent COPY into a single relation in PG16.  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Mon, Jul 3, 2023 at 11:55 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> After further investigation, the performance degradation comes from
> calling posix_fallocate() (called via FileFallocate()) and pwritev()
> (called via FileZero) alternatively depending on how many blocks we
> extend by. And it happens only on the xfs filesystem.

FYI, the attached simple C program proves the fact that calling
alternatively posix_fallocate() and pwrite() causes slow performance
on posix_fallocate():

$ gcc -o test test.c
$ time ./test test.1 1
total   200000
fallocate       200000
filewrite       0

real    0m1.305s
user    0m0.050s
sys     0m1.255s

$ time ./test test.2 2
total   200000
fallocate       100000
filewrite       100000

real    1m29.222s
user    0m0.139s
sys     0m3.139s

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

Вложения

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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Performance degradation on concurrent COPY into a single relation in PG16.
Следующее
От: Noah Misch
Дата:
Сообщение: Re: pgsql: Fix search_path to a safe value during maintenance operations.