Re: Re: [WIP] Performance Improvement by reducing WAL for Update Operation

From: Amit kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Heikki Linnakangas'" <hlinnakangas(at)vmware(dot)com>, "noah(at)leadboat(dot)com" <noah(at)leadboat(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [WIP] Performance Improvement by reducing WAL for Update Operation
Date: 2012-10-04 14:33:53
Message-ID: 6C0B27F7206C9E4CA54AE035729E9C38285374E2@szxeml509-mbs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, October 03, 2012 9:33 PM Amit Kapila wrote:
On Friday, September 28, 2012 7:03 PM Amit Kapila wrote:
> > On Thursday, September 27, 2012 6:39 PM Amit Kapila wrote:
> > > On Thursday, September 27, 2012 4:12 PM Heikki Linnakangas wrote:
> > > On 25.09.2012 18:27, Amit Kapila wrote:
> > > > If you feel it is must to do the comparison, we can do it in same
> > way
> > > > as we identify for HOT?
> > >
>
>
> > Now I shall do the various tests for following and post it here:
> > a. Attached Patch in the mode where it takes advantage of history
> > tuple b. By changing the logic for modified column calculation to use
> > calculation for memcmp()
>
>

> 1. Please find the results (pgbench_test.htm) for point -2 where there is
> one fixed column updation (last few bytes are random) and second column
> updation is 32 byte random string. The results for 50, 100 are still going
> on others are attached with this mail.

The results for updated record size (50,100) is attached with this mail

Observations
a. The performance is comparable for both approaches

>> 4. Complete testing for LZ compression patch using testcases defined for
>> original patch
> a. During testing of LZ patch, few issues are found related to when the updated record contains NULLS. Working on it to fix.

The problems were that
a. offset calculation during compression is based on input buffer [new tuple] and oldtuple [history]. Offset should be relative to history end.
In normal LZ compression always input buffer and history will be adjacent, so there is no problem for it.
b. The new tuple contents should not be added to history buffer as the addresses will be different for new tuple and history. So it will make offset
calculation go wrong.

Patch containing fix of above problems is attached with this mail.

With Regards,
Amit Kapila.

Attachment Content-Type Size
pgbench_test_50_and_100.htm text/html 36.6 KB
pglz_wal_update_v1.patch application/octet-stream 20.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-10-04 14:43:15 Re: [PATCH] Make pg_basebackup configure and start standby [Review]
Previous Message Tom Lane 2012-10-04 14:32:59 Re: Raise a WARNING if a REVOKE affects nothing?