Tune application for minimum virtual memory footprint

I have an application that needs to have low virtual memory usage, since several instances of different users are running on the same machine. I'd like to avoid -Xmx limit since the application sometimes needs more memory. I've tried using:

-XX:ReservedCodeCacheSize=48m -XX:MaxGCPauseMillis=10000 -XX:GCTimeRatio=0

but it still takes ~1G of virtual memory on startup. Resident size is 40MB - which is good. Is there a way to tell the JVM to use the minimum amount of virtual memory?

I'm running on Linux SUSE kernel 2.6 - the problem is both on x86 and amd64

Thank You,

Noam

[615 byte] By [Noam_Ambara] at [2007-11-27 8:26:17]
# 1
I am curious - why do you think that the addressable address space (versus the space actually used) has any impact on other applications?
jschella at 2007-7-12 20:15:38 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2

This creates two issues:

1) On Linux, when the system gets to low virtual memory, it starts to kill processes, and those are the first to be killed due to the high virtual memory.

2) Users always complain about it. Looking into their processes - they don't understand why it is taking so much space in virtual memory.

Noam_Ambara at 2007-7-12 20:15:38 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3

> This creates two issues:

>

> 1) On Linux, when the system gets to low virtual

> memory, it starts to kill processes, and those are

> the first to be killed due to the high virtual

> memory.

Obviously if you are running out of memory (which basically is the case if you have used up most of the swap space) then you need to adjust for that.

Something that has actually used the addressable space can use it again. And if several apps do it at the same time then regardless of what you do then it will fail (because they actually do need the memory.)

> 2) Users always complain about it. Looking into their

> processes - they don't understand why it is taking so

> much space in virtual memory.

That has nothing to do with technology. You shouldn't be attempting to modify functioning systems because someone doesn't understand how a computer works.

jschella at 2007-7-12 20:15:38 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 4
It is bad when system runs into low memory, but my process is the first one to be killed since it gets bad score due to the high virtual memory and low CPU consumption. Even if some other process caused the memory issue, the java process if the first one that is killed.
Noam_Ambara at 2007-7-12 20:15:38 > top of Java-index,Java HotSpot Virtual Machine,Specifications...