Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: How to Accurately Determine Amount of RAM

by sundialsvc4 (Abbot)
on Jul 08, 2014 at 19:55 UTC ( [id://1092784]=note: print w/replies, xml ) Need Help??


in reply to How to Accurately Determine Amount of RAM

Honestly, it might be preferable to design your script to take a command-line parameter, e.g. -m integerG, which specifies at runtime the amount of memory that you want the program to take as its maximum.

In addition to being a convenient cop-out ... ;-) ... this simple-minded-sounding approach actually adds flexibility:   If, say, at some point you want to run four instances of your program concurrently on a 16-gig machine, you would want to tell each of them, say, -m 3G.   Absent the parameter, the program would assume a fixed limit of your arbitrary choosing.   (“Assume that you can have it all” might or might not be a great assumption to make or to have made, down the line, even if it looks prescient now.)   Instead of making a guess that might turn out to be wrong, using logic that might have to be programmatically tweaked at an inconvenient wee hour of the early morning moment, it would make a conservative assumption that you know would be okay.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-03-19 03:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found