Re: brk() function and performance - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: brk() function and performance
Date
Msg-id 20020716102802.F26587@mail.libertyrms.com
Whole thread Raw
In response to brk() function and performance  (Andrew Sullivan <andrew@libertyrms.info>)
Responses Re: brk() function and performance
Re: brk() function and performance
Re: brk() function and performance
List pgsql-general
On Thu, Jul 11, 2002 at 12:30:12PM -0400, Andrew Sullivan wrote:
> Hi,
>
> We're running PostgreSQL 7.1.3 (I know, I know) on Solaris 7 on two
> Sun E4500s with 8 CPUs and 16 Gig of RAM.
>
> We have noticed that one of the machines is considerably slower than
> the other.  We have traced the problem to the brk() funciton call.

My Sun-loving colleague, Sorin Iszlai, wondered why this problem was
cropping up, and remembered the qsort() debacle.  So he did some
tests.  Guess what?  Here's what he found:

> I ran some tests with the realloc() function from the standard lib;
> If the application calls realloc() 4096 times the results are:

> - if linked with bsdmalloc, realloc() calls brk() 17 times only:
> syscall      seconds   calls
> brk              .40      17

> - and without bsdmalloc :
> syscall      seconds   calls
> brk             1.36   24527

At this rate, I'm beginning to get the feeling that maybe getting
FreeBSD to work well on 64 bit Sun machines is the most important
project we could undertake ;-)

Anyway, I'm going to do some tests with this, but in the meantime, if
anyone has any views on the subject, insights, or experience, it'd be
much appreciated.

Thanks.

A

--
----
Andrew Sullivan                               87 Mowat Avenue
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M6K 3E3
                                         +1 416 646 3304 x110


pgsql-general by date:

Previous
From: Adrian 'Dagurashibanipal' von Bidder
Date:
Subject: OIDs (Or: another RTFM question?)
Next
From: nconway@klamath.dyndns.org (Neil Conway)
Date:
Subject: Re: Backend died abnormally - postgresql 7.2.1-5