Unix Technical Forum

AllocSetReset improvement

This is a discussion on AllocSetReset improvement within the Pgsql Patches forums, part of the PostgreSQL category; --> Bruce Momjian <pgman@candle.pha.pa.us> writes: > Patch applied. Thanks. (The first if == NULL test was already in CVS). The ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 04-18-2008, 12:25 AM
Tom Lane
 
Posts: n/a
Default Re: AllocSetReset improvement

Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Patch applied. Thanks. (The first if == NULL test was already in CVS).


The first if == NULL test was the only part I wanted to apply ...
I do not think this patch is a performance win in general.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 04-18-2008, 12:25 AM
Bruce Momjian
 
Posts: n/a
Default Re: AllocSetReset improvement

Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Patch applied. Thanks. (The first if == NULL test was already in CVS).

>
> The first if == NULL test was the only part I wanted to apply ...
> I do not think this patch is a performance win in general.


OK, patch reverted. a_ogawa, would you run tests with just the part I
reverted to see if it is a win. Thanks.

--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 04-18-2008, 12:25 AM
Bruce Momjian
 
Posts: n/a
Default Re: AllocSetReset improvement

Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Patch applied. Thanks. (The first if == NULL test was already in CVS).

>
> The first if == NULL test was the only part I wanted to apply ...
> I do not think this patch is a performance win in general.


Attached is the part I backed out of CVS.

--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Index: aset.c
================================================== =================
RCS file: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -c -c -r1.60 -r1.61
*** aset.c 14 May 2005 20:29:13 -0000 1.60
--- aset.c 4 Jun 2005 20:14:12 -0000 1.61
***************
*** 399,404 ****
--- 399,415 ----
if (block == NULL)
return;

+ /*
+ * When blocks list has only "keeper" block and freeptr of the block
+ * is initial value, the context is not used from last reset.
+ */
+ if (block == set->keeper && block->next == NULL)
+ {
+ char *datastart = ((char *) block) + ALLOC_BLOCKHDRSZ;
+ if (block->freeptr == datastart)
+ return;
+ }
+
/* Clear chunk freelists */
MemSetAligned(set->freelist, 0, sizeof(set->freelist));



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com