Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Re: Re: reducing memory usage

by Elian (Parson)
on Dec 17, 2002 at 15:56 UTC ( #220556=note: print w/replies, xml ) Need Help??

in reply to Re: Re: reducing memory usage
in thread reducing memory usage

Are you sure it's total memory used and not just in-core memory? You might be seeing some of your unused pages swapped out to disk. If so, that's usually a sign you've got garbage that's not getting cleaned up, either because of circular data structures, or you (or perl) isn't disposing of something used earlier on.

If you really are seeing a footprint shrink like that, it's likely you've got something being cached somewhere that gets reused after a while and shrinks on that reuse. (Perl does some aggressive caching of array structures in lexicals, for example)

Finally, it's possible you're running afoul of an almost-but-not-quite empty memory segment. Perl's asked for a 5 meg chunk at some point, uses it and then frees up all but a few bytes right at the beginning, so it has to hold on to the chunk until the last thing using a part of it dies or goes somewhere else. (And there's not much you can do about that, unfortunately)

Replies are listed 'Best First'.
Re: Re: Re: Re: reducing memory usage
by batkins (Chaplain) on Dec 17, 2002 at 20:25 UTC
    Hmm, in the Task Manager on Windows XP, I see 13 megs. Does this include swapped-out pages?
      Enable all the memory columns in the task manager and see. (You could do that with Win2K, so I assume XP will as well) Someone else'll have to say for sure with that info--I don't have a win box around to check.
        the only thing that stands out is its unusually high number of page faults, around 8000 and increasing whenever i send events.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://220556]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2019-09-17 22:24 GMT
Find Nodes?
    Voting Booth?
    The room is dark, and your next move is ...

    Results (218 votes). Check out past polls.