Re: Perl FCGI process and Perl's garbage collection
David Birnbaum <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel,gmane.spam.detected |
|---|---|
| Message-ID | <[email protected]> |
Galen, I thought that, as of Perl 5.6, the system malloc() was the default on most implementations, which returns memory back to the system. Maybe you need to see how your Perl was compiled? Or perhaps you're not freeing memory when you think you are. We have, in our applications, had a counter that caused it to exit after X iterations, just to clear up other memory bugs. It's not a big problem, as long as your counter is sufficiently high. David. ------------------------------------------------------------------------ Guorui Wu wrote: > HI, > > On most system, Garbage collection of a perl process does Not return > the memory freed to system, instead, it reserves it for its (the perl > process) future use. > > I am developing a Perl FCGI application. ab stress test with 30,000 > requests result in a huge accumulated memory footprint for the FCGI > perl process. > > My question is: even if the code is clean, but due to perl's garbage > collection behavior as stated above, a long run perl FCGI process will > bound to accumulate memory footprint. so we have to spawn a new > process once over some time and exit the parent? > > Is my understanding correct? or any other alternative solution to this > problem so that perl FCGI process Does return memory to the OS? > > Many thanks > > Galen > ___________________________________ > fastcgi-developers mailing list > http://fastcgi.com/fastcgi-developers/ > ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/