Your skill will accomplish what the force of many cannot |
|
PerlMonks |
about understanding module memoryby smackdab (Pilgrim) |
on Dec 30, 2003 at 02:22 UTC ( [id://317607]=perlquestion: print w/replies, xml ) | Need Help?? |
smackdab has asked for the wisdom of the Perl Monks concerning the following question:
UPDATE: missed some of the io::file code...I see it loads other common modules that my test program didn't have...
Maybe it is just the case the most modules use other common module and that is just the way it is...should have choosen a better example...oops. Still curious what others do to reduce memory if they have many running at once. Hi, my program spawns off a few perl processes to do some work (win32, but will get to linux soon ;-) Normally I am not too concerned about memory useage, but the children each take 20megs(RAM)+ 20megs(VM - Virtual Memory)...at least this is what taskman is showing... I don't load a lot of modules in the child code, but do want to remove the big ones and roll my own if it is a good tradeoff... If I load perl and check taskman, it says 1.7Megs + 0.5(VM). Not too bad! If I use IO::File, which seems nice since I use IO::Socket and IO::Select ;-). It takes an extra 1Meg of RAM + 1Meg(VM). But IO::File is tiny and looks like it just inherits existing loaded "stuff". Most modules that I have checked take 1Meg minimum. (I specifically chose a small example as it is easy to understand that a PDF module might take a lot of ram!) More curiosity than anything, but any reading pointers or if you know the answer would be great! Also, what have you done in this situation? (need to avoid swapping at all costs ;-)
Back to
Seekers of Perl Wisdom
|
|