> > On Fri, Jun 6, 2014 at 8:30 PM, Michael Stauffer <mgsta...@gmail.com> > wrote: > > > OGS/GE 2011.11p1 > > > > Hi, > > > > Is there an alternative to h_vmem that checks resident memory rather than > > virtual? I'd like a consumable that kills a job when it oversteps its > > requested memory quota, so h_vmem is great. But I'm having trouble with > > Matlab (and maybe other apps, haven't checked fully yet) which at > startup, > > allocates a somewhat-variable large amount of VIRT memory (~4G) but > little > > RES memory (~300M) (according to 'top'). > > > > Matlab's java environment is allocating most of the virtual memory, but > > they can't tell me a way to limit this. In any case this large VIRT value > > makes it impossible to set a smaller default h_vmem value because Matlab > > won't launch. > > > > Thanks for any thoughts. > > > > -M > > > > _______________________________________________ > > users mailing list > > users@gridengine.org > > https://gridengine.org/mailman/listinfo/users > > > > I've got a workaround/solution from Mathworks about the issue above. Turn on Redhat 6 introduced a new memory tool called arenas. These are behind (at least most of) the large allocations of VIRT memory in Java-based programs. They were added to reduce 'false sharing' with multi-threaded apps, not that I understand the details.
The env var MALLOC_ARENA_MAX can be set to a low number to limit these arenas and thus the VIRT allocations. It seems the recommended value is 4 to limit arenas, but not completely lose out on the advantages. When I set to 4, matlab (R2013a) now alloc's 1350MB of VIRT instead of ~4GB. Some discussion online: Hadoop says set to 4: https://issues.apache.org/jira/browse/HADOOP-7154 IBM: https://www.ibm.com/developerworks/community/blogs/kevgrig/entry/linux_glibc_2_10_rhel_6_malloc_may_show_excessive_virtual_memory_usage?lang=en -M
_______________________________________________ users mailing list users@gridengine.org https://gridengine.org/mailman/listinfo/users