Re: Patch: Write Amplification Reduction Method (WARM)
Pavan Deolasee <pavan.deolasee@gmail.com>
From: Pavan Deolasee <pavan.deolasee@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
Robert Haas <robertmhaas@gmail.com>, Bruce Momjian <bruce@momjian.us>,
Jaime Casanova <jaime.casanova@2ndquadrant.com>, Haribabu Kommi <kommi.haribabu@gmail.com>,
Tomas Vondra <tomas.vondra@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-03-29T06:21:17Z
Lists: pgsql-hackers
Attachments
- 0006_warm_taptests_v22.patch (application/octet-stream) patch v22
- 0007_vacuum_enhancements_v22.patch (application/octet-stream) patch v22
- 0004_Free-3-bits-of-ItemPointerData.ip_posid_v22.patch (application/octet-stream) patch v22
- 0002_track_root_lp_v22.patch (application/octet-stream) patch v22
- 0001_interesting_attrs_v22.patch (application/octet-stream) patch v22
- 0005_warm_updates_v22.patch (application/octet-stream) patch v22
On Wed, Mar 29, 2017 at 3:42 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote: > I pushed 0002 after some makeup, since it's just cosmetic and not > controversial. Thanks. I think your patch of tracking interesting attributes seems ok too after the performance issue was addressed. Even though we can still improve that further, at least Mithun confirmed that there is no significant regression anymore and in fact for one artificial case, patch does better than even master. > Here's 0003 rebased on top of it. > > (Also, I took out the gin and gist changes: it would be wrong to change > that unconditionally, because the 0xFFFF pattern appears in indexes that > would be pg_upgraded. We need a different strategy, if we want to > enable WARM on GiST/GIN indexes.) > > Yeah, those changes would have broken pg-upgraded clusters. So looks good. But the rebased patch throws an assertion failure. ItemPointerGetOffsetNumberNoCheck will mask the first 3 bits and return the rest, but since GIN continues to store ip_posid greater than OffsetNumberMask, the masking causes problems. May be we can teach GinItemPointerGetOffsetNumber to fetch the flags separately and add them back to what ItemPointerGetOffsetNumberNoCheck returns. This avoids referencing ip_posid directly from this code. BTW we have messed up patch names a bit here. You applied 0003 from v21 and rebased 0004. But the rebased patch was named 0001-Free-3-bits-of-ItemPointerData.ip_posid.patch. I'm reverting back to the earlier used names. So rebased v22 set of patches attached. 0001_interesting_attrs_v22.patch - Alvaro's patch of simplifying attr checks. I think this has settled down 0002_track_root_lp_v22 - We probably need to decide whether its worth saving a bit in tuple header for additional work during WARM update of finding root tuple. 0004_Free-3-bits-of-ItemPointerData.ip_posid_v22 - A slight update to Alvaro's rebased version posted yesterday 0005_warm_updates_v22 - Main WARM patch. Addresses all review comments so far and includes fixes for toasted value handling 0007_vacuum_enhancements_v22 - VACUUM enhancements to control WARM cleanup. This now also includes changes made to memory usage. The dead tuples and warm chains are tracked in a single work area, from two ends. When these ends meet, we do a round of index cleanup. IMO this should give us most optimal utilisation of available memory depending on whether we are doing WARM cleanup or not and percentage of dead tuples and warm chains. 0006_warm_taptests_v22 - Alvaro reported lack of Makefile. It also seemed that he wants to rename it to avoid "warm" reference. So done that, but Alvaro is seeing hangs with the tests in his environment, so probably needs some investigation. It works for me with IPC::Run 0.94 Thanks, Pavan -- Pavan Deolasee http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Implement SortSupport for macaddr data type
- f90d23d0c518 10.0 cited
-
Simplify check of modified attributes in heap_update
- 2fd8685e7fd9 10.0 landed
-
Remove direct uses of ItemPointer.{ip_blkid,ip_posid}
- ce96ce60ca22 10.0 landed
-
Fix CatalogTupleInsert/Update abstraction for case of shared indstate.
- aedd554f84bb 10.0 landed
-
Provide CatalogTupleDelete() as a wrapper around simple_heap_delete().
- ab02896510e2 10.0 landed
-
Band-aid fix for incorrect use of view options as StdRdOptions.
- e3e66d8a9813 10.0 cited
-
Update visibility map in the second phase of vacuum.
- fdf9e21196a6 9.3.0 cited
-
Avoid having two copies of the HOT-chain search logic.
- 4da99ea4231e 9.2.0 cited
-
Postgres95 1.01 Distribution - Virgin Sources
- d31084e9d111 7.1.1 cited