"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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |