"softlimit -m" also limits the maximum virtual address space (i.e. it calls setrlimit(2) on the resource RLIMIT_AS1) — see the man page for details).   So what you're testing here is the virtual memory usage.

The virtual memory usage of a program, however, is not necessarily a useful measure of how much memory a program actually currently "needs".  It's more a measure of the address space that the program can potentially address (without allocating more), not of how much physical memory it actually has in use — the resident set size (RSS) is a better measure of the latter.   In other words, I wouldn't be worried too much :)

For comparison, my 64-bit Perl 5.12.4 on Ubuntu uses:

$ perl -le 'use version; print $version::VERSION; system "ps -p $$ -o +rss,vsz,comm"' 0.82 RSS VSZ COMMAND 2476 24236 perl

___

1)

$ strace -esetrlimit softlimit -m 25000000 perl -e1 setrlimit(RLIMIT_DATA, {rlim_cur=25000000, rlim_max=RLIM_INFINITY}) = +0 setrlimit(RLIMIT_STACK, {rlim_cur=25000000, rlim_max=RLIM_INFINITY}) = + 0 setrlimit(RLIMIT_MEMLOCK, {rlim_cur=64*1024, rlim_max=64*1024}) = 0 setrlimit(RLIMIT_AS, {rlim_cur=25000000, rlim_max=RLIM_INFINITY}) = 0

In reply to Re: memory usage on x86_64 by Eliya
in thread memory usage on x86_64 by powerman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.