Re: Use generation context to speed up tuplesorts
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-30T14:51:10Z
Lists: pgsql-hackers
On Fri, Jul 30, 2021 at 2:42 AM David Rowley <dgrowleyml@gmail.com> wrote: > Master: > Sort Method: quicksort Memory: 5541kB > Patched: > Sort Method: quicksort Memory: 3197kB Whoa. > work_mem = '4GB'; > Test master gen sort compare > Test1 317.2 665.6 210% > Test2 228.6 388.9 170% > Test3 207.4 330.7 159% > Test4 185.5 279.4 151% > Test5 292.2 563.9 193% Very impressive. An early version of what eventually became DSA worked with backend-local memory and I saw very substantial memory usage improvements on large sorts, similar to what you show here. I am not sure I saw the same CPU improvements, and in any case I abandoned the idea of using that infrastructure to manage backend-local memory at some point, since the whole thing had lots of problems that I didn't know how to solve. What you've done here looks like a much more promising approach. -- Robert Haas EDB: http://www.enterprisedb.com
Commits
-
Use Generation memory contexts to store tuples in sorts
- 40af10b571bd 15.0 landed
-
Adjust tuplesort API to have bitwise option flags
- 77bae396df3f 15.0 landed
-
Improve the generation memory allocator
- 1b0d9aa4f728 15.0 landed