Hi, >sorry for asking again a memory problem but I can't find the "one and only" >answer in the archive.
That's because there isn't a "one and only" answer in the archive. What you're asking depends greatly on the precise OS version and hardware configuration you're using (as well as JDK version of course). Essentially, you'd like to know what percentage of the OS-level memory image taken up by the JVM is the heap size. If the percentage was 100%, then setting -Xms -Xmx would precisely control what memory the JVM takes. Obviously, this magic percentage is not 100%. Pretty much the only way to determine this percentage is to continue experimenting like you have been, record your data, and try to fit them to a curve. It's linear algebra coming back at you ;) (Or maybe just me having memories of my school days ;)). So you already have two data points: 20MB heap leads to 60MB of OS-level memory => 33% is used by the heap. 70MB heap leads to 150MB of OS-level memory => 47% is used by the heap. In general, you can expect the percentage used by the heap to increase as the total size increases. But it'll never reach 100%, because there's stack size, thread overhead size, symbol tables, etc. You could continue going down this path, which gets very complicated. Especially when you take into account that you can also tune stack segment size, heap generation sizes, thread mapping, etc. and that affects the above measurements. Alternatively, you could ask yourself: how much memory can I afford? How much memory does my app need to function well? Maybe you could arrive at a faster, easier solution by working backwards, instead of digging into OS-level details. Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>