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 ;-)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.