Re: Why so much virtual memory?

2005-03-15 Thread David Causse
Montz, James C. (James Tower) wrote:
On a related note, It would appear to me that java is not adhering to
the -Xmx option;
I have several instances that report using 3-4X RSS Memory what -Xmx is
set to.
For example,
Instance1:
CATALINA_OPTS=-sqerver -Xms64m -Xmx128m
 PS Ouput: 
	USER	%CPU%MEMVSZ RSS
	instanc10.7 8.9 509284  343636

Running on Redhat ES3 U4, Sun J2SDK 1.4.2_04
Anyone seen similar behaviour, tomcat or Java issue?, explanations?
 

Are you sure that your JVM is executed with these arguments and are not 
overidden by some shell scripts or so (ps -x will tell you)?
On HP-UX we consume 587mb of RSS with options below :
   CATALINA_OPTS=-server -Xoptgc -Xmx1024m -Xms256m -Xmn128m 
-XX:MaxPermSize=128m

On Linux (Java(TM) 2 Runtime Environment, Standard Edition (build 
Blackdown-1.4.2-rc1), with kernel 2.6)
   We consume 106m of RES but it is an unused/low-use tomcat, JVM 
options are below :
   export JAVA_OPTS=-Xmx700m -Djava.nio.use_epoll=true

It seems to be strange that you consume so much memory, is it at Tomcat 
startup, maybe your webapps are very big?
You never encountered OutOfMemory exceptions?

I had so much issues with JAVA memory management so now I'm so confuse 
with it that I gave up to understand
very well how it is working, my only fear is OutOfMemory, if my webapp 
runs fine it's OK, I don't touch it.

Good luck.
David.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Why so much virtual memory?

2005-03-14 Thread Montz, James C. (James Tower)
On a related note, It would appear to me that java is not adhering to
the -Xmx option;

I have several instances that report using 3-4X RSS Memory what -Xmx is
set to.

For example,
Instance1:
 CATALINA_OPTS=-sqerver -Xms64m -Xmx128m
  PS Ouput: 
USER%CPU%MEMVSZ RSS
instanc10.7 8.9 509284  343636

Running on Redhat ES3 U4, Sun J2SDK 1.4.2_04

Anyone seen similar behaviour, tomcat or Java issue?, explanations?

-Original Message-
From: David Causse [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 11, 2005 11:45 AM
To: Tomcat Users List
Subject: Re: Why so much virtual memory?

Mark Winslow wrote:

I start Tomcat 5.5.7 and it immediately reports about 450 megabytes of 
virtual memory usage in the linux app top.  Is this normal?  Is it just

allocating it or is it really using it?  It takes about 1 to 2 seconds 
to start and there's no way an application can write 450 megs of disk 
memory in that time period, or at least I don't think it can.

I'm asking because I'm wondering what my memory requirements are going 
to be for a collocated server I'm setting up.  The ISP charges more for

more memory.
 I'm looking at 512 megs, but can pay about 50% more and get 1024.

If Tomcat could run more efficiently without having to put things in 
virtual memory, I may want to pay the extra money.

Thanks.

  

IMHO you don't have to worry about memory.
You should not look at VIRT but only RES or %MEM (linux ps).

Memory management with is very difficult to tune well, you'll need to
test a lot of arguments.
If you don't run into OutOfMemory exception you don't have to worry,
unused memory is wasted memory.

David.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why so much virtual memory?

2005-03-14 Thread QM
On Mon, Mar 14, 2005 at 04:12:16PM -0600, Montz, James C. (James Tower) wrote:
: On a related note, It would appear to me that java is not adhering to
: the -Xmx option;
: 
: I have several instances that report using 3-4X RSS Memory what -Xmx is
: set to.

Keep in mind, -Xmx and -Xms are options for the heap.  In turn, the heap
is the raw memory space where the JVM creates objects. 

The JVM often uses more memory than the heap for its internal
housekeeping and such.  I don't recall having seen it use as much as 3-4
times the heap allocation, but I suppose it's possible.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why so much virtual memory?

2005-03-11 Thread David Causse
Mark Winslow wrote:
I start Tomcat 5.5.7 and it immediately reports about
450 megabytes of virtual memory usage in the linux app
top.  Is this normal?  Is it just allocating it or is
it really using it?  It takes about 1 to 2 seconds to
start and there's no way an application can write 450
megs of disk memory in that time period, or at least I
don't think it can.
I'm asking because I'm wondering what my memory
requirements are going to be for a collocated server
I'm setting up.  The ISP charges more for more memory.
I'm looking at 512 megs, but can pay about 50% more
and get 1024.  

If Tomcat could run more efficiently without having to
put things in virtual memory, I may want to pay the
extra money.
Thanks.
 

IMHO you don't have to worry about memory.
You should not look at VIRT but only RES or %MEM (linux ps).
Memory management with is very difficult to tune well, you'll need to 
test a lot of arguments.
If you don't run into OutOfMemory exception you don't have to worry, unused
memory is wasted memory.

David.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]