Re: brk() function and performance

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: PostgreSQL general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: brk() function and performance
Date: 2002-07-16 14:28:02
Message-ID: 20020716102802.F26587@mail.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)libertyrms(dot)info> M6K 3E3
+1 416 646 3304 x110

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Neil Conway 2002-07-16 14:37:31 Re: Backend died abnormally - postgresql 7.2.1-5
Previous Message Cyrill Polikarpov 2002-07-16 14:27:18 User's management