Re: Backend memory dump analysis
Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
From: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-03-25T17:50:08Z
Lists: pgsql-hackers
Tom>Well, as I said, you can do anything you want now in an extension. That is true. However it basically means "everybody who cares to troubleshoot the memory use of a production system should install an extension". Should https://wiki.postgresql.org/wiki/Developer_FAQ#Examining_backend_memory_use provide a link to the extension then? Tom>Actually the key number is the one that already is printed Tom>first, ie the total space consumed by the context The space used is more important than the context name itself. What do you think of 8192 (2 blocks) CachedPlan: 1504 free (0 chunks); 6688 used: SELECT (SELECT COUNT(*) FROM (SELECT * FROM new_test UNION ALL SELECT * FROM new_test) ss) ? PS. "1504 free (0 chunks)" reads odd. Tom>Very occasionally, you might be interested in spotting contexts that have Tom>a disproportionate amount of free space, but IME that's seldom the main Tom>issue. Fully agree. That is why I suggest "total, used, free" order so it matches the likelihood of usage. Vladimir
Commits
-
Add memory context identifier to portal context
- 94c1f9ba11d1 11.0 landed
-
Rename MemoryContextCopySetIdentifier() for clarity
- bbca77623fb5 11.0 landed
-
Allow memory contexts to have both fixed and variable ident strings.
- 442accc3fe0c 11.0 landed
-
Rethink MemoryContext creation to improve performance.
- 9fa6f00b1308 11.0 cited