Re: Help giving Tomcat more memory

2002-02-01 Thread Tom Bednarz

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:   
For additional commands: 
Troubles with the list: 




Re: Help giving Tomcat more memory

2002-01-31 Thread J. Russell Smyth


> 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.

Assuming you are getting the 7200k from Windoze task manager, the main
problem is that this tool is inaccurate at best. About the most you can
use it for is relative memory useage - increase your -Xms param and see
if it at least changes your memory (not conclusive, but could at least
tell you that you are changing something!)

drfish


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Help giving Tomcat more memory

2002-01-24 Thread Michael Molloy

Okay, I tried Randy's suggestion below, no spaces and a capital M, but the 
application still ran out of memory around 79 megs (Windows 2000 Server).

I'm fiddling around with a simple java program on my linux box trying to 
figure this out. My main method is

public static void main(String args[]) {
while(true);
}

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?

Thanks
--Michael

On Thursday 24 January 2002 08:57 am, you wrote:
> I'll give that a try. Thanks.
>
> --Michael
>
> On Thursday 24 January 2002 09:03 am, you wrote:
> > No space and capital M works for me (i.e. -Xms256M -Xmx384M), but
> > I'm not sure what is required.
> >
> > Randy
> >
> > > -Original Message-
> > > From: Michael Molloy [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, January 24, 2002 8:47 AM
> > > To: Tomcat
> > > Subject: Help giving Tomcat more memory
> > >
> > >
> > > I'm still experiencing the memory leak with JSPs that I asked about
> > > yesterday, and I'm trying to give Tomcat more memory, but
> > > it's apparently not
> > > working.
> > >
> > > I changed the following line in tomcat.bat.:startServer from
> > >
> > > %_STARTJAVA% %TOMCAT_OPTS% -Djava.security.policy . . .
> > >
> > > to
> > >
> > > %_STARTJAVA% -Xms 256m -Xmx 384m %TOMCAT_OPTS%
> > > -Djava.security.policy . . .
> > >
> > > However, Tomcat ran out of memory around 78MB. What am I doing wrong?
> > >
> > > Thanks
> > > --Michael
> > >
> > > --
> > > To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> > > For additional commands: <mailto:[EMAIL PROTECTED]>
> > > Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: Help giving Tomcat more memory

2002-01-24 Thread Michael Molloy

I'll give that a try. Thanks.

--Michael

On Thursday 24 January 2002 09:03 am, you wrote:
> No space and capital M works for me (i.e. -Xms256M -Xmx384M), but
> I'm not sure what is required.
>
>   Randy
>
> > -Original Message-
> > From: Michael Molloy [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 24, 2002 8:47 AM
> > To: Tomcat
> > Subject: Help giving Tomcat more memory
> >
> >
> > I'm still experiencing the memory leak with JSPs that I asked about
> > yesterday, and I'm trying to give Tomcat more memory, but
> > it's apparently not
> > working.
> >
> > I changed the following line in tomcat.bat.:startServer from
> >
> > %_STARTJAVA% %TOMCAT_OPTS% -Djava.security.policy . . .
> >
> > to
> >
> > %_STARTJAVA% -Xms 256m -Xmx 384m %TOMCAT_OPTS%
> > -Djava.security.policy . . .
> >
> > However, Tomcat ran out of memory around 78MB. What am I doing wrong?
> >
> > Thanks
> > --Michael
> >
> > --
> > To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> > For additional commands: <mailto:[EMAIL PROTECTED]>
> > Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Help giving Tomcat more memory

2002-01-24 Thread Randy Layman


No space and capital M works for me (i.e. -Xms256M -Xmx384M), but
I'm not sure what is required.

Randy


> -Original Message-
> From: Michael Molloy [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 24, 2002 8:47 AM
> To: Tomcat
> Subject: Help giving Tomcat more memory
> 
> 
> I'm still experiencing the memory leak with JSPs that I asked about 
> yesterday, and I'm trying to give Tomcat more memory, but 
> it's apparently not 
> working. 
> 
> I changed the following line in tomcat.bat.:startServer from
> 
> %_STARTJAVA% %TOMCAT_OPTS% -Djava.security.policy . . . 
> 
> to
> 
> %_STARTJAVA% -Xms 256m -Xmx 384m %TOMCAT_OPTS% 
> -Djava.security.policy . . . 
> 
> However, Tomcat ran out of memory around 78MB. What am I doing wrong? 
> 
> Thanks
> --Michael
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Help giving Tomcat more memory

2002-01-24 Thread Michael Molloy

I'm still experiencing the memory leak with JSPs that I asked about 
yesterday, and I'm trying to give Tomcat more memory, but it's apparently not 
working. 

I changed the following line in tomcat.bat.:startServer from

%_STARTJAVA% %TOMCAT_OPTS% -Djava.security.policy . . . 

to

%_STARTJAVA% -Xms 256m -Xmx 384m %TOMCAT_OPTS% -Djava.security.policy . . . 

However, Tomcat ran out of memory around 78MB. What am I doing wrong? 

Thanks
--Michael

--
To unsubscribe:   
For additional commands: 
Troubles with the list: