Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions

Поиск
Список
Период
Сортировка
От Dilip Kumar
Тема Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions
Дата
Msg-id CAFiTN-tYAUmNguOMy1kx5t3kndvC23Y0xwmnw5RjdU5VxR0+ZA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Tue, Jun 9, 2020 at 3:39 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Thu, Jun 4, 2020 at 5:06 PM Mahendra Singh Thalor <mahi6run@gmail.com> wrote:
>>
>> On Fri, 29 May 2020 at 15:52, Amit Kapila <amit.kapila16@gmail.com> wrote:
>> >
>>
>>
>> To see all the operations(DDL's and DML's), please see test_results
>>
>> Testing summary:
>> Basically, we are writing per command invalidation message and for testing that I have tested with different
combinationsof the DDL and DML operation.  I have not observed any performance degradation with the patch. For "create
index"DDL's, %change in wal is 1-7% for 1-15 DDL's. For "add col int/date" DDL's, it is 11-17% for 1-15 DDL's and for
"addcol text" DDL's, it is 2-6% for 1-15 DDL's. For mix (DDL & DML), it is 2-10%. 
>>
>> why are we seeing 11-13 % of the extra wall, basically,  the amount of extra WAL is not very high but the amount of
WALgenerated with add column int/date is just ~1000 bytes so additional 100 bytes will be around 10% and for add column
textit is  ~35000 bytes so % is less. For text, these ~35000 bytes are due to toast 
>> There is no change in wal size for DML operations. For savepoints, we are getting max 8 bytes per savepoint wal
increment(basically for Sub-transaction, we are adding 5 bytes to store xid but due to padding, it is 8 bytes and some
timesif wal is already aligned, then we are getting 0 bytes increment) 
>
>
> So, if I read it correctly, there is no performance penalty with either of the patches but there is some additional
WALwhich in most cases is 2-5% but in worst cases and some specific DDL's it is upto 15%.  I think as this WAL overhead
iswhen wal_level is logical, we might have to live with it as the other alternative is to blew up all caches on any DDL
inWALSenders and that will have bot CPU and Network overhead as expalined previously [1].  I feel if the WAL overhead
pinchesany workload, we might want to do it under some new guc (which will disable streaming of transactions) but I
don'tthink we need to go there. 
>
> What do you think?

Even I feel so because the WAL overhead is only with wal_level=logical
and especially with DDL and ideally, there should not be a large amount
of DDL in the system compared to other operations.  So I think we can live
with the current approach.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Index Skip Scan (new UniqueKeys)