You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tom Bednarz <li...@bednarz.ch> on 2002/02/01 09:18:58 UTC

Re: Help giving Tomcat more memory

Michael,

> I then start the program with
> java -Xms145M -Xmx160M test
>
> If I understand this correctly, the initial heap size should be 145 megs.
> However, looking at my processes, there is only about 7200K allocated for
the
> program. Why doesn't it start out at 145? That is the same behaviour I'm
> seeing on the Win2K machine with Tomcat. It ignores the initial heap size
I'm
> specifying and starts around 16MB, and then dies around 78.
>
> Am I misunderstanding how the -Xms and -Xmx flags work?
>

No, but when looking at the task manager you should not look at Mem Usage
but at VM Size. (You can select the columns at View | Select Columns...)
NT/W2K/XP allocate Memory usually as virtual memory (using LocalAlloc() or
GlobalAlloc() API functions in C/C++). The OS decides when it will swap
unused data and program code to the page file and give more "fast" memory to
a process. So if you specify -Xmsn and -Xmxn the OS will not immediately
take away all memory when the process starts. You just made sort of a
reservation. If you look at VMSize you will see, that you got your 145
MB.....

HTH

Thomas


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>