modperl-usemymalloc_perl_build_option_and_solaris

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Date: Sat, 16 Sep 2000 22:05:27 -0700 (PDT)
From: Ian Kallen <spidaman@salon.com>
To: modperl@apache.org
Subject: usemymalloc && mod_perl


I've seen some of the 'perl -V' outputs on this list over the years.  Most
people have usermymalloc=n but I've a seen a number of Solaris cases that
have usemymalloc=y

I have a system on Solaris 2.6 with usemymalloc=y and I have a very
infrequent bug that usually manifests iteslef as corrupted data at the
64th byte (it can also happen at the 32nd byte!).  It doesn't seem to
happen ever in single process mode but I have some data objects that
will consistently demonstrate this behavior with Apache forked (the bug
survives apache shutdowns/startups, so it's not just an errant child).
The other pieces of the puzzle: latest DBI, DBD::Oracle, Oracle 8.1.5 

So, my question for this group:  why would I want usemymalloc=y on Solaris
2.6?  Besides having to rebuild a somewhat complex mod_perl compile, I'm
not looking forward to rebuilding all libraries with XS code so any
insight as to the ins and outs of compiling w/ and w/o usemymalloc would
be much appreciated!
thanks,
-Ian

--
Salon Internet 				http://www.salon.com/
  Manager, Software and Systems "Livin' La Vida Unix!"
Ian Kallen <idk@salon.com> / AIM: iankallen / Fax: (415) 354-3326 



===

Date: Sun, 17 Sep 2000 00:32:08 -0500 (CDT)
From: Dave Rolsky <autarch@urth.org>
To: Ian Kallen <spidaman@salon.com>
Subject: Re: usemymalloc && mod_perl

On Sat, 16 Sep 2000, Ian Kallen wrote:

> So, my question for this group:  why would I want usemymalloc=y on Solaris
> 2.6?  Besides having to rebuild a somewhat complex mod_perl compile, I'm
> not looking forward to rebuilding all libraries with XS code so any
> insight as to the ins and outs of compiling w/ and w/o usemymalloc would
> be much appreciated!

>From the guide:

It seems that Linux still defaults to system malloc so you might want to
configure Perl with -Dusemymalloc. Perl's malloc is not much of a win
under linux, but makes a huge difference under Solaris


I don't know who established this though.  Ask Stas ;)

-dave

/*==================
www.urth.org
We await the New Sun
==================*/



===

Date: Sun, 17 Sep 2000 15:42:54 +0200 (CEST)
From: Stas Bekman <stas@stason.org>
To: Dave Rolsky <autarch@urth.org>
Cc: Ian Kallen <spidaman@salon.com>, modperl@apache.org
Subject: Re: usemymalloc && mod_perl

On Sun, 17 Sep 2000, Dave Rolsky wrote:

> On Sat, 16 Sep 2000, Ian Kallen wrote:
> 
> > So, my question for this group:  why would I want usemymalloc=y on Solaris
> > 2.6?  Besides having to rebuild a somewhat complex mod_perl compile, I'm
> > not looking forward to rebuilding all libraries with XS code so any
> > insight as to the ins and outs of compiling w/ and w/o usemymalloc would
> > be much appreciated!
> 
> >From the guide:
> 
> It seems that Linux still defaults to system malloc so you might want to
> configure Perl with -Dusemymalloc. Perl's malloc is not much of a win
> under linux, but makes a huge difference under Solaris
> 
> 
> I don't know who established this though.  Ask Stas ;)

According to CHANGES:

04.09.2000 ver 1.22

* performance: new: "-Dusemymalloc Perl Build Option" (Doug, Jeffrey
  W. Baker)

Ask Doug :) Ask Jeffrey W. Baker :) Ask Ask? :)

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:stas@stason.org   http://apachetoday.com http://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org




===

Date: Mon, 25 Sep 2000 13:25:12 -0700 (PDT)
From: Doug MacEachern <dougm@covalent.net>
To: Ian Kallen <spidaman@salon.com>
Subject: Re: usemymalloc && mod_perl

On Sat, 16 Sep 2000, Ian Kallen wrote:

> 
> I've seen some of the 'perl -V' outputs on this list over the years.  Most
> people have usermymalloc=n but I've a seen a number of Solaris cases that
> have usemymalloc=y
> 
> I have a system on Solaris 2.6 with usemymalloc=y and I have a very
> infrequent bug that usually manifests iteslef as corrupted data at the
> 64th byte (it can also happen at the 32nd byte!).  It doesn't seem to
> happen ever in single process mode but I have some data objects that
> will consistently demonstrate this behavior with Apache forked (the bug
> survives apache shutdowns/startups, so it's not just an errant child).
> The other pieces of the puzzle: latest DBI, DBD::Oracle, Oracle 8.1.5 
> 
> So, my question for this group:  why would I want usemymalloc=y on Solaris
> 2.6?  Besides having to rebuild a somewhat complex mod_perl compile, I'm
> not looking forward to rebuilding all libraries with XS code so any
> insight as to the ins and outs of compiling w/ and w/o usemymalloc would
> be much appreciated!
> thanks,

solaris system malloc will degrade your Perl performance a great deal.
i'd be surprised if the bug is caused by Perl's malloc implementation.
sounds more like buggy xs (or linked in library code) that is stepping out
of bounds, duplicate free() or similar.  purify would be the best tool to
find the bug, but rather expensive if you don't have it already.
can you tell us more about this data, like what structure it is, where
it's passed around in what code?



===

Date: Tue, 17 Oct 2000 18:22:14 -0700
From: Ian Kallen <spidaman@salon.com>
To: Doug MacEachern <dougm@covalent.net>
Subject: Re: usemymalloc && mod_perl


I wanted to follow up on this: our intermitten problem with corrupted
32nd & 64th byte data was, at least outwardly, fixed by recompiling perl
and rebuilding mod_perl.  The only remaining performance issues I'm
dealing with I'm looking at IO::File to blame, I'm going to comb through
%INC to find who's loading it and see if I can completely eliminate
those now!

Doug MacEachern wrote:
> 
> On Sat, 16 Sep 2000, Ian Kallen wrote:
> 
> >
> > I've seen some of the 'perl -V' outputs on this list over the years.  Most
> > people have usermymalloc=n but I've a seen a number of Solaris cases that
> > have usemymalloc=y
> >
> > I have a system on Solaris 2.6 with usemymalloc=y and I have a very
> > infrequent bug that usually manifests iteslef as corrupted data at the
> > 64th byte (it can also happen at the 32nd byte!).  It doesn't seem to
> > happen ever in single process mode but I have some data objects that
> > will consistently demonstrate this behavior with Apache forked (the bug
> > survives apache shutdowns/startups, so it's not just an errant child).
> > The other pieces of the puzzle: latest DBI, DBD::Oracle, Oracle 8.1.5
> >
> > So, my question for this group:  why would I want usemymalloc=y on Solaris
> > 2.6?  Besides having to rebuild a somewhat complex mod_perl compile, I'm
> > not looking forward to rebuilding all libraries with XS code so any
> > insight as to the ins and outs of compiling w/ and w/o usemymalloc would
> > be much appreciated!
> > thanks,
> 
> solaris system malloc will degrade your Perl performance a great deal.
> i'd be surprised if the bug is caused by Perl's malloc implementation.
> sounds more like buggy xs (or linked in library code) that is stepping out
> of bounds, duplicate free() or similar.  purify would be the best tool to
> find the bug, but rather expensive if you don't have it already.
> can you tell us more about this data, like what structure it is, where
> it's passed around in what code?

--
Salon Internet 				http://www.salon.com/
  Manager, Software and Systems "Livin' La Vida Unix!"
Ian Kallen <idk@salon.com> / AIM: iankallen / Fax: (415) 354-3326


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu