pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Yura Sokolov <y.sokolov@postgrespro.ru>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Reducing the chunk header sizes on all memory context types
Date: Mon, 10 Oct 2022 17:07:53 -0400
Message-ID: <153589.1665436073@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApHDvoJne738BcqVpzSEBHMBstWEndzRqcakpb8=ivBTv3MVA@mail.gmail.com>
References: <555399.1663636988@sss.pgh.pa.us>
	<CAApHDvoBxz7RiJiyGzi-wN4c-vLg9TGQ8yTmFW1j6eUJPsP4DA@mail.gmail.com>
	<1693074.1664825870@sss.pgh.pa.us>
	<1913788.1664898906@sss.pgh.pa.us>
	<CAApHDvoOWpxq0UucD0W11=99GopDwozTr=+bt2AmZFgHi87gmg@mail.gmail.com>
	<2869610.1665077908@sss.pgh.pa.us>
	<2910981.1665080361@sss.pgh.pa.us>
	<20221006190058.rgk4gxa34d6rg77o@awork3.anarazel.de>
	<2921309.1665083444@sss.pgh.pa.us>
	<20221006191454.yviucagfzayak3x6@awork3.anarazel.de>
	<2922295.1665084196@sss.pgh.pa.us>
	<2963487.1665086713@sss.pgh.pa.us>
	<2975022.1665093421@sss.pgh.pa.us>
	<2983672.1665097833@sss.pgh.pa.us>
	<3023166.1665099327@sss.pgh.pa.us>
	<CAApHDvqhOF+6-eo7O7s2gEkYkj1vBhfrByU=cAuszoe62tM87Q@mail.gmail.com>
	<3032206.1665104414@sss.pgh.pa.us>
	<3578387.1665244345@sss.pgh.pa.us>
	<142246.1665430516@sss.pgh.pa.us>
	<CAApHDvoJne738BcqVpzSEBHMBstWEndzRqcakpb8=ivBTv3MVA@mail.gmail.com>

David Rowley <dgrowleyml@gmail.com> writes:
> Looking at your changes to SlabFree(), I don't really think that
> change is well aligned to the newly proposed policy. My understanding
> of the rationale behind this policy is that large chunks get malloced
> and will be slower anyway, so the elog(ERROR) is less overhead for
> those.  In SlabFree(), we're most likely not doing any free()s, so I
> don't quite understand why you've added the elog rather than the
> Assert for this case. The slab allocator *should* be very fast.

Yeah, slab.c hasn't any distinction between large and small chunks,
so we have to just pick one policy or the other.  I'd hoped to get
away with the more robust runtime test on the basis that slab allocation
is not used so much that this'd result in any noticeable performance
change.  SlabRealloc, at least, is not used *at all* per the code
coverage tests, and if we're there at all we should be highly suspicious
that something is wrong.  However, I could be wrong about SlabFree,
and if you're going to hold my feet to the fire then I'll change it
rather than try to produce some performance evidence.

			regards, tom lane





view thread (152+ messages)  latest in thread

Message-ID: <153589.1665436073@sss.pgh.pa.us>
Permalink:  ../153589.1665436073@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/153589.1665436073@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, andres@anarazel.de, rjuju123@gmail.com, robertmhaas@gmail.com, y.sokolov@postgrespro.ru
  Subject: Re: Reducing the chunk header sizes on all memory context types
  In-Reply-To: <153589.1665436073@sss.pgh.pa.us>
  References: <555399.1663636988@sss.pgh.pa.us> <CAApHDvoBxz7RiJiyGzi-wN4c-vLg9TGQ8yTmFW1j6eUJPsP4DA@mail.gmail.com> <1693074.1664825870@sss.pgh.pa.us> <1913788.1664898906@sss.pgh.pa.us> <CAApHDvoOWpxq0UucD0W11=99GopDwozTr=+bt2AmZFgHi87gmg@mail.gmail.com> <2869610.1665077908@sss.pgh.pa.us> <2910981.1665080361@sss.pgh.pa.us> <20221006190058.rgk4gxa34d6rg77o@awork3.anarazel.de> <2921309.1665083444@sss.pgh.pa.us> <20221006191454.yviucagfzayak3x6@awork3.anarazel.de> <2922295.1665084196@sss.pgh.pa.us> <2963487.1665086713@sss.pgh.pa.us> <2975022.1665093421@sss.pgh.pa.us> <2983672.1665097833@sss.pgh.pa.us> <3023166.1665099327@sss.pgh.pa.us> <CAApHDvqhOF+6-eo7O7s2gEkYkj1vBhfrByU=cAuszoe62tM87Q@mail.gmail.com> <3032206.1665104414@sss.pgh.pa.us> <3578387.1665244345@sss.pgh.pa.us> <142246.1665430516@sss.pgh.pa.us> <CAApHDvoJne738BcqVpzSEBHMBstWEndzRqcakpb8=ivBTv3MVA@mail.gmail.com> <153589.1665436073@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox