Re: Single client performance on trivial SELECTs - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Single client performance on trivial SELECTs
Date
Msg-id 201104142234.57491.andres@anarazel.de
Whole thread Raw
In response to Re: Single client performance on trivial SELECTs  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Single client performance on trivial SELECTs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thursday 14 April 2011 22:21:26 Alvaro Herrera wrote:
> Excerpts from Andres Freund's message of jue abr 14 17:08:34 -0300 2011:
> > Hi,
> > 
> > On Thursday 14 April 2011 16:43:16 Tom Lane wrote:
> > > I doubt that it's possible to make AllocSetAlloc radically cheaper.
> > 
> > I actually doubt your doubt. I think you could add some SLAB like
> > interface for common allocation sizes making it significantly faster for
> > some uses (because allocation/deallocation is a single linked list
> > operation). Maybe even treat everything < some_size as a slab object in
> > the next bigger slab.
> I think the problem with a slab allocator is that it would make
> hierarchical context management slower and/or more complicated (e.g.
> reset context on transaction abort).
I am not that sure that it would be slower. I think that if youre careful you 
mostly can reuse what currently is done for chunks to implement slabs.
For context resets you can just throw away all chunks/blocks.

Where I am with you is that its quite possible that it will not make sense 
(performancewise) for all contexts. Which is quite annoying.

Andres


pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Single client performance on trivial SELECTs
Next
From: Tom Lane
Date:
Subject: Re: Single client performance on trivial SELECTs