develooper Front page | perl.perl5.porters | Postings from March 2007

Re: The performance problem of 30678

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
March 24, 2007 08:06
Subject:
Re: The performance problem of 30678
Message ID:
20070324150623.GK5748@plum.flirble.org
On Sat, Mar 24, 2007 at 08:22:13AM +0100, Rafael Garcia-Suarez wrote:
> On 23/03/07, Nicholas Clark <nick@ccl4.org> wrote:
> >Yes, with PERL_DESTRUCT_LEVEL=2 Solaris now takes 2 hours to run t/op/pat.t
> >
> >We seem to have hit pathological malloc behaviour. I'm not quite sure how,
> >or why, given that Linux copes.

> Without any PERL_DESTRUCT_LEVEL, t/op/pat is extremely slow. Another
> hint that we hit some malloc pathological case here. strace() shows
> that the tests that are slowed down are towards the end...

Without PERL_DESTRUCT_LEVEL, a flat profile from gprof starts:

  %   cumulative   self              self     total           
 time   seconds   seconds    calls  ms/call  ms/call  name    
 26.7      13.44    13.44  1186773     0.01     0.01  S_regmatch <cycle 1> [9]
 17.0      22.00     8.56       22   389.03   389.03  S_make_trie_failtable [13]
 12.4      28.23     6.24      103    60.54    60.85  S_make_trie <cycle 1> [15]

With PERL_DESTRUCT_LEVEL=2, we see:

  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
 88.0     371.92   371.92   531443     0.70     0.79  S_visit [5]
  3.2     385.52    13.60  1186773     0.01     0.01  S_regmatch <cycle 1> [8]
  2.0     394.07     8.55       22   388.62   388.62  S_make_trie_failtable [10]
  1.5     400.27     6.20      103    60.21    60.48  S_make_trie <cycle 1> [11]


Profiles at

  http://www.ccl4.org/~nick/P/pat.t.profiletxt
  http://www.ccl4.org/~nick/P/pat.t.profile.D2.txt

respectively.

So. I don't think that the problem was quite what we thought that it was :-)

Are we making lots more SVs? Or are we just bumping the refcounts through the
roof?

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About