Re: JVM memory size changing dramatically

2004-07-30 Thread Robert Bateman
Another good place is the Java Performance Tuning web site.  They have a LOT 
of really good articles and spend a LOT of time on GC.  The IBM developer web 
site also has some good articles on memory and GC.

Bob

On Thursday 29 July 2004 12:09 pm, Shapira, Yoav wrote:
 Hi,

 | The options for what?
 
 These:
 
 -
 My JAVA_OPTS as follows
 
 
 JAVA_OPTS=-server -Xms256m -Xmx768m -XX:NewSize=64m -XX:MaxNewSize=64m
 -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=5
 -XX:TargetSurvivorRatio=75 -XX:PermSize=32m -XX:MaxPermSize=32m

 -Xss128k

 -XX:+DisableExplicitGC
 -

 Here: http://java.sun.com/docs/hotspot/VMOptions.html.  There are also
 related documents linked from that page that illustrate some examples on
 when to use which options.  It boils down to a lot of trials and
 experimentation.

 Yoav Shapira


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



Re: JVM memory size changing dramatically

2004-07-29 Thread Endre Stølsvik
On Wed, 28 Jul 2004, Dennis Dai wrote:

| Can't remember where I read it but it's something like this on
| NT/2k/XP/2k3 family:
|
| Windows is using the physical memory as cache to cache the real app
| image in the swap file. So if your app has been idle for a while, it's
| very likely to be swap out of the physical memory. This is regardless of
| how much physical memory you have.
|
| Interesting approach but sometimes annoying.

Yes, this is called something progressive or aggressive swapping or
something: it swaps away idle physical memory even if it isn't short in
it, just to have max amount of physical memory ready at any time.

On windows, you'll often notice that it's a real drag to get your windows
desktop going in the morning (given that it is on 24/7, of course), like
every app is taking a long time to get its window up and such. This is
caused by this aggressive swapping scheme.

Regarding the initial question, have you turned on every column there is
on the task manager? There are lots other than the inital few ones. It
might be that you're looking at something like the memory actually mapped
physically-column, while the image size is the same.

When you get your 500 visitors, it won't go down to 5 MB - since
everything is active then. But do some testing.. (!) - your app might
crash for other reasons than memory.

Also, you apparently say that 256 MB should be the -inital- memory
allocated (-Xms256), it is actually a bit weird that it shows steadily 80,
when you've asked java to pre-allocate 256 MB. You could log, now and
then, the values reported by the all the Runtim.*Memory() methods (there
are one extra on 1.4 than 1.3) - they give you a clues to how much mem the
JVM has allocated for java.

As a side note, I'll heavily recommend swapping the bad task manager for
the MUCH better and information-rich process explorer from sysinternals:
  http://www.sysinternals.com/ntw2k/freeware/procexp.shtml
(One thing that is just amazing with this, is the feature of scanning
through the processes to find which process have opened/locked a file - MS
themselves haven't come up with this obvious feature yet (lsof on
unix).. )

Have fun!

One question from me: where do you get all those other options from? Where
do I get a listing of those extra-options, documentation?

-- 
Mvh,
Endre Stølsvik   M[+47 93054050] F[+47 51625182]
Developer @ CoreTrek AS -  http://www.coretrek.com/
CoreTrek corporate portal / EIP -  http://www.corelets.com/




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



RE: JVM memory size changing dramatically

2004-07-29 Thread Shapira, Yoav
Hi,
Good post ;)

One question from me: where do you get all those other options from?
Where
do I get a listing of those extra-options, documentation?

The options for what?

Yoav

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



RE: JVM memory size changing dramatically

2004-07-29 Thread Endre Stølsvik
On Thu, 29 Jul 2004, Shapira, Yoav wrote:

| One question from me: where do you get all those other options from?
| Where do I get a listing of those extra-options, documentation?
|
| The options for what?

These:

-
My JAVA_OPTS as follows


JAVA_OPTS=-server -Xms256m -Xmx768m -XX:NewSize=64m -XX:MaxNewSize=64m
-XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=5
-XX:TargetSurvivorRatio=75 -XX:PermSize=32m -XX:MaxPermSize=32m -Xss128k
-XX:+DisableExplicitGC
-

Endre


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



RE: JVM memory size changing dramatically

2004-07-29 Thread Shapira, Yoav
Hi,

| The options for what?

These:

-
My JAVA_OPTS as follows


JAVA_OPTS=-server -Xms256m -Xmx768m -XX:NewSize=64m -XX:MaxNewSize=64m
-XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=5
-XX:TargetSurvivorRatio=75 -XX:PermSize=32m -XX:MaxPermSize=32m
-Xss128k
-XX:+DisableExplicitGC
-

Here: http://java.sun.com/docs/hotspot/VMOptions.html.  There are also
related documents linked from that page that illustrate some examples on
when to use which options.  It boils down to a lot of trials and
experimentation.

Yoav Shapira

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



RE: JVM memory size changing dramatically

2004-07-28 Thread Shapira, Yoav
Hi,
Windows needs additional space for other things (including possibly idle
thread cleanup) and swaps your process into a paging area temporarily.
It's fairly standard practice, and as you noted results in no errors, so
don't worry about it.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Futchi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 12:11 PM
To: Tomcat Users List
Subject: JVM memory size changing dramatically

Hi all,
I am running tomcat 5 on Win2003 server, my single app. has
several threads running in the background (threads loading and writing
data, detecting URL connections).

Tomcat starting-up with 80 up 90 MB memory size as Win2003 shows in the
Tasks Manager, it keeps running stable and getting up and down between
80 and 93 MB memory size. After several hours, memory size gets down to
5 MB very fast, and then start goes up to 90 MB also fast.   This
change
happening in about 2-3 minutes only, then it becomes stable again
jumping between 80-93 MB memory size.

While this happening Tomcat is up and running, also my App. is up and
running. I do not have any memory error messages.


I doubt it is the GC, Anybody can explain that?!!!


My JAVA_OPTS as follows


JAVA_OPTS=-server -Xms256m -Xmx768m -XX:NewSize=64m -XX:MaxNewSize=64m
-XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=5
-XX:TargetSurvivorRatio=75 -XX:PermSize=32m -XX:MaxPermSize=32m
-Xss128k
-XX:+DisableExplicitGC



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



RE: JVM memory size changing dramatically

2004-07-28 Thread Safadi, Mazin



But windows has enough space, 2GB memory, Dual processors, this app. is
running but still Tomcat does not receive hits, what will happen if the
server has up to 500 visitors concurrently, 
How windows will handle this?
How to make sure that JVM will not goes down?






 



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 28, 2004 17:19
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: JVM memory size changing dramatically

Hi,
Windows needs additional space for other things (including possibly idle
thread cleanup) and swaps your process into a paging area temporarily.
It's fairly standard practice, and as you noted results in no errors, so
don't worry about it.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Futchi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 12:11 PM
To: Tomcat Users List
Subject: JVM memory size changing dramatically

Hi all,
I am running tomcat 5 on Win2003 server, my single app. has
several threads running in the background (threads loading and writing
data, detecting URL connections).

Tomcat starting-up with 80 up 90 MB memory size as Win2003 shows in the
Tasks Manager, it keeps running stable and getting up and down between
80 and 93 MB memory size. After several hours, memory size gets down to
5 MB very fast, and then start goes up to 90 MB also fast.   This
change
happening in about 2-3 minutes only, then it becomes stable again
jumping between 80-93 MB memory size.

While this happening Tomcat is up and running, also my App. is up and
running. I do not have any memory error messages.


I doubt it is the GC, Anybody can explain that?!!!


My JAVA_OPTS as follows


JAVA_OPTS=-server -Xms256m -Xmx768m -XX:NewSize=64m -XX:MaxNewSize=64m
-XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=5
-XX:TargetSurvivorRatio=75 -XX:PermSize=32m -XX:MaxPermSize=32m
-Xss128k
-XX:+DisableExplicitGC



-
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: JVM memory size changing dramatically

2004-07-28 Thread Dale, Matt

Only you can answer these questions by testing your application with something like 
Jmeter. Devise tests that replicate user behaviour and increase the load until it 
breaks. Then you will be able to see what it can handle and how windows copes with the 
load.

Ta
Matt

-Original Message-
From: Safadi, Mazin [mailto:[EMAIL PROTECTED]
Sent: 28 July 2004 17:40
To: 'Tomcat Users List'
Subject: RE: JVM memory size changing dramatically





But windows has enough space, 2GB memory, Dual processors, this app. is
running but still Tomcat does not receive hits, what will happen if the
server has up to 500 visitors concurrently, 
How windows will handle this?
How to make sure that JVM will not goes down?






 



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 28, 2004 17:19
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: JVM memory size changing dramatically

Hi,
Windows needs additional space for other things (including possibly idle
thread cleanup) and swaps your process into a paging area temporarily.
It's fairly standard practice, and as you noted results in no errors, so
don't worry about it.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Futchi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 12:11 PM
To: Tomcat Users List
Subject: JVM memory size changing dramatically

Hi all,
I am running tomcat 5 on Win2003 server, my single app. has
several threads running in the background (threads loading and writing
data, detecting URL connections).

Tomcat starting-up with 80 up 90 MB memory size as Win2003 shows in the
Tasks Manager, it keeps running stable and getting up and down between
80 and 93 MB memory size. After several hours, memory size gets down to
5 MB very fast, and then start goes up to 90 MB also fast.   This
change
happening in about 2-3 minutes only, then it becomes stable again
jumping between 80-93 MB memory size.

While this happening Tomcat is up and running, also my App. is up and
running. I do not have any memory error messages.


I doubt it is the GC, Anybody can explain that?!!!


My JAVA_OPTS as follows


JAVA_OPTS=-server -Xms256m -Xmx768m -XX:NewSize=64m -XX:MaxNewSize=64m
-XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=5
-XX:TargetSurvivorRatio=75 -XX:PermSize=32m -XX:MaxPermSize=32m
-Xss128k
-XX:+DisableExplicitGC



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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.


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

Re: JVM memory size changing dramatically

2004-07-28 Thread Peter Lin
as others have stated, the only way to know is to stress test your
app. even without running a test, I can tell you IIS5 running on a
dual CPU box cannot handle 500 concurrent requests for dynamic pages.

500 concurrent requests for static files isn't a problem.

Depending on the kind of application, the maximum concurrent requests
maybe as low as a dozen or as high as 50-60. Does your app make
database queries? How long do the queries take?  How many CPU's does
the database server have? Which version of Sql Server do you run? Is
the database hosted on a separate box? What kind of router are you
using between the webserver and database? Is there a dedicated
ethernet port and router between the two tiers?

These are all important questions to ask and answer. Once you answer
most of these questions, you'll be able to confidently say what your
webapp can handle. good luck

peter




On Wed, 28 Jul 2004 16:43:29 +0100, Dale, Matt [EMAIL PROTECTED] wrote:
 
 Only you can answer these questions by testing your application with something like 
 Jmeter. Devise tests that replicate user behaviour and increase the load until it 
 breaks. Then you will be able to see what it can handle and how windows copes with 
 the load.
 
 Ta
 Matt
 
 
 
 -Original Message-
 From: Safadi, Mazin [mailto:[EMAIL PROTECTED]
 Sent: 28 July 2004 17:40
 To: 'Tomcat Users List'
 Subject: RE: JVM memory size changing dramatically
 
 But windows has enough space, 2GB memory, Dual processors, this app. is
 running but still Tomcat does not receive hits, what will happen if the
 server has up to 500 visitors concurrently,
 How windows will handle this?
 How to make sure that JVM will not goes down?
 
 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 28, 2004 17:19
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: RE: JVM memory size changing dramatically
 
 Hi,
 Windows needs additional space for other things (including possibly idle
 thread cleanup) and swaps your process into a paging area temporarily.
 It's fairly standard practice, and as you noted results in no errors, so
 don't worry about it.
 
 Yoav Shapira
 Millennium Research Informatics
 
 -Original Message-
 From: Futchi [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 28, 2004 12:11 PM
 To: Tomcat Users List
 Subject: JVM memory size changing dramatically
 
 Hi all,
 I am running tomcat 5 on Win2003 server, my single app. has
 several threads running in the background (threads loading and writing
 data, detecting URL connections).
 
 Tomcat starting-up with 80 up 90 MB memory size as Win2003 shows in the
 Tasks Manager, it keeps running stable and getting up and down between
 80 and 93 MB memory size. After several hours, memory size gets down to
 5 MB very fast, and then start goes up to 90 MB also fast.   This
 change
 happening in about 2-3 minutes only, then it becomes stable again
 jumping between 80-93 MB memory size.
 
 While this happening Tomcat is up and running, also my App. is up and
 running. I do not have any memory error messages.
 
 
 I doubt it is the GC, Anybody can explain that?!!!
 
 
 My JAVA_OPTS as follows
 
 
 JAVA_OPTS=-server -Xms256m -Xmx768m -XX:NewSize=64m -XX:MaxNewSize=64m
 -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=5
 -XX:TargetSurvivorRatio=75 -XX:PermSize=32m -XX:MaxPermSize=32m
 -Xss128k
 -XX:+DisableExplicitGC
 
 
 
 -
 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]
 
 
 


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



Re: JVM memory size changing dramatically

2004-07-28 Thread Reynir Þór Hübner
Hi,
The only good way of knowing what your setup is capable of, is testing.
if you do not reach the 500 concurrent visitors mark in simulation 
testings (using JMeter or some ohter stress tool) you will probably not 
be able to serve 500 real concurrent users.

Be sure to run the test over night, or at least for more than 5 or 10 
minutes, as your application might be leaking some memory over time.

Regarding the strange memory behaviour shown in TaskManager, when it 
goes up and then down, taskmanager is not showing correct information 
all the time. Try running tomcat in a command promt window, then watch 
how taskmanager reports memory statistics when you minimize the window.

if memory goes steadilly up, you should check if you are reloading jsp 
pages, or using developement settings for the jsp sservlet. Behaviour 
like you described could happen if you have context-reloading set to 
true, then if something changes in either web.xml or WEB-INF/lib or 
/WEB-INF/classes directory the classloader for that context is reloaded. 
 This can take up some memory, that usually is returned in GC.
hope it helps
-reynir

Safadi, Mazin wrote:

But windows has enough space, 2GB memory, Dual processors, this app. is
running but still Tomcat does not receive hits, what will happen if the
server has up to 500 visitors concurrently, 
How windows will handle this?
How to make sure that JVM will not goes down?



 


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 28, 2004 17:19
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: JVM memory size changing dramatically

Hi,
Windows needs additional space for other things (including possibly idle
thread cleanup) and swaps your process into a paging area temporarily.
It's fairly standard practice, and as you noted results in no errors, so
don't worry about it.
Yoav Shapira
Millennium Research Informatics

-Original Message-
From: Futchi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 12:11 PM
To: Tomcat Users List
Subject: JVM memory size changing dramatically
Hi all,
  I am running tomcat 5 on Win2003 server, my single app. has
several threads running in the background (threads loading and writing
data, detecting URL connections).
Tomcat starting-up with 80 up 90 MB memory size as Win2003 shows in the
Tasks Manager, it keeps running stable and getting up and down between
80 and 93 MB memory size. After several hours, memory size gets down to
5 MB very fast, and then start goes up to 90 MB also fast.   This
change
happening in about 2-3 minutes only, then it becomes stable again
jumping between 80-93 MB memory size.
While this happening Tomcat is up and running, also my App. is up and
running. I do not have any memory error messages.
I doubt it is the GC, Anybody can explain that?!!!
My JAVA_OPTS as follows
JAVA_OPTS=-server -Xms256m -Xmx768m -XX:NewSize=64m -XX:MaxNewSize=64m
-XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=5
-XX:TargetSurvivorRatio=75 -XX:PermSize=32m -XX:MaxPermSize=32m
-Xss128k
-XX:+DisableExplicitGC


-
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]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JVM memory size changing dramatically

2004-07-28 Thread Futchi


I don't think it's related to the IIS5, my web server is Tomcat5. how
many concurrent requests related to my hardware (JVM) and tomcat
threading.

I have MySql server 4.0.16 (max_connections=300), and Tomcat5 both
running on the same machine.


-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 28, 2004 17:53
To: Tomcat Users List
Subject: Re: JVM memory size changing dramatically

as others have stated, the only way to know is to stress test your
app. even without running a test, I can tell you IIS5 running on a
dual CPU box cannot handle 500 concurrent requests for dynamic pages.

500 concurrent requests for static files isn't a problem.

Depending on the kind of application, the maximum concurrent requests
maybe as low as a dozen or as high as 50-60. Does your app make
database queries? How long do the queries take?  How many CPU's does
the database server have? Which version of Sql Server do you run? Is
the database hosted on a separate box? What kind of router are you
using between the webserver and database? Is there a dedicated
ethernet port and router between the two tiers?

These are all important questions to ask and answer. Once you answer
most of these questions, you'll be able to confidently say what your
webapp can handle. good luck

peter




On Wed, 28 Jul 2004 16:43:29 +0100, Dale, Matt [EMAIL PROTECTED]
wrote:
 
 Only you can answer these questions by testing your application with
something like Jmeter. Devise tests that replicate user behaviour and
increase the load until it breaks. Then you will be able to see what it
can handle and how windows copes with the load.
 
 Ta
 Matt
 
 
 
 -Original Message-
 From: Safadi, Mazin [mailto:[EMAIL PROTECTED]
 Sent: 28 July 2004 17:40
 To: 'Tomcat Users List'
 Subject: RE: JVM memory size changing dramatically
 
 But windows has enough space, 2GB memory, Dual processors, this app.
is
 running but still Tomcat does not receive hits, what will happen if
the
 server has up to 500 visitors concurrently,
 How windows will handle this?
 How to make sure that JVM will not goes down?
 
 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 28, 2004 17:19
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: RE: JVM memory size changing dramatically
 
 Hi,
 Windows needs additional space for other things (including possibly
idle
 thread cleanup) and swaps your process into a paging area temporarily.
 It's fairly standard practice, and as you noted results in no errors,
so
 don't worry about it.
 
 Yoav Shapira
 Millennium Research Informatics
 
 -Original Message-
 From: Futchi [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 28, 2004 12:11 PM
 To: Tomcat Users List
 Subject: JVM memory size changing dramatically
 
 Hi all,
 I am running tomcat 5 on Win2003 server, my single app.
has
 several threads running in the background (threads loading and
writing
 data, detecting URL connections).
 
 Tomcat starting-up with 80 up 90 MB memory size as Win2003 shows in
the
 Tasks Manager, it keeps running stable and getting up and down
between
 80 and 93 MB memory size. After several hours, memory size gets down
to
 5 MB very fast, and then start goes up to 90 MB also fast.   This
 change
 happening in about 2-3 minutes only, then it becomes stable again
 jumping between 80-93 MB memory size.
 
 While this happening Tomcat is up and running, also my App. is up and
 running. I do not have any memory error messages.
 
 
 I doubt it is the GC, Anybody can explain that?!!!
 
 
 My JAVA_OPTS as follows
 
 
 JAVA_OPTS=-server -Xms256m -Xmx768m -XX:NewSize=64m
-XX:MaxNewSize=64m
 -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=5
 -XX:TargetSurvivorRatio=75 -XX:PermSize=32m -XX:MaxPermSize=32m
 -Xss128k
 -XX:+DisableExplicitGC
 
 
 
 -
 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]
 
 
 


-
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: JVM memory size changing dramatically

2004-07-28 Thread Peter Lin
keep in mind that even if you set the max connections to 300, it
doesn't mean it can realiably handle 300 concurrent queries with good
performance. I would use JMeter to stress test the database with real
queries.

Once you get a picture of how the queries scale in relation to the
number of concurrent queries, you'll have a much better idea of the
scalability of the application. It's a bit erroneous to think of
scalability in terms of Tomcat5.  In my biased opinion all of the
major webservers are roughly equal today.

the difference really comes down to how you write your application.
Assuming you've take time to tune your sql queries and create the
proper indexes on the tables, your queries should take 200-400ms. On a
dual CPU box, a respectable throughput would be 10-20 queries per
second. The chances of double or tripling that throughput on the same
hardware is a matter of optimizing your database tables and
denormalizing the database schema for performance. Realistically, you
won't be able to handle 500 concurrent requests to the webserver
without some sort of in memory cache.  Without caching, no webserver
will be able to handle 500 concurrent requests. I hope that helps

peter



On Wed, 28 Jul 2004 19:31:20 +0200, Futchi [EMAIL PROTECTED] wrote:
 
 
 I don't think it's related to the IIS5, my web server is Tomcat5. how
 many concurrent requests related to my hardware (JVM) and tomcat
 threading.
 
 I have MySql server 4.0.16 (max_connections=300), and Tomcat5 both
 running on the same machine.
 
 
 
 
 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 28, 2004 17:53
 To: Tomcat Users List
 Subject: Re: JVM memory size changing dramatically
 
 as others have stated, the only way to know is to stress test your
 app. even without running a test, I can tell you IIS5 running on a
 dual CPU box cannot handle 500 concurrent requests for dynamic pages.
 
 500 concurrent requests for static files isn't a problem.
 
 Depending on the kind of application, the maximum concurrent requests
 maybe as low as a dozen or as high as 50-60. Does your app make
 database queries? How long do the queries take?  How many CPU's does
 the database server have? Which version of Sql Server do you run? Is
 the database hosted on a separate box? What kind of router are you
 using between the webserver and database? Is there a dedicated
 ethernet port and router between the two tiers?
 
 These are all important questions to ask and answer. Once you answer
 most of these questions, you'll be able to confidently say what your
 webapp can handle. good luck
 
 peter
 
 On Wed, 28 Jul 2004 16:43:29 +0100, Dale, Matt [EMAIL PROTECTED]
 wrote:
 
  Only you can answer these questions by testing your application with
 something like Jmeter. Devise tests that replicate user behaviour and
 increase the load until it breaks. Then you will be able to see what it
 can handle and how windows copes with the load.
 
  Ta
  Matt
 
 
 
  -Original Message-
  From: Safadi, Mazin [mailto:[EMAIL PROTECTED]
  Sent: 28 July 2004 17:40
  To: 'Tomcat Users List'
  Subject: RE: JVM memory size changing dramatically
 
  But windows has enough space, 2GB memory, Dual processors, this app.
 is
  running but still Tomcat does not receive hits, what will happen if
 the
  server has up to 500 visitors concurrently,
  How windows will handle this?
  How to make sure that JVM will not goes down?
 
  -Original Message-
  From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 28, 2004 17:19
  To: Tomcat Users List; [EMAIL PROTECTED]
  Subject: RE: JVM memory size changing dramatically
 
  Hi,
  Windows needs additional space for other things (including possibly
 idle
  thread cleanup) and swaps your process into a paging area temporarily.
  It's fairly standard practice, and as you noted results in no errors,
 so
  don't worry about it.
 
  Yoav Shapira
  Millennium Research Informatics
 
  -Original Message-
  From: Futchi [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 28, 2004 12:11 PM
  To: Tomcat Users List
  Subject: JVM memory size changing dramatically
  
  Hi all,
  I am running tomcat 5 on Win2003 server, my single app.
 has
  several threads running in the background (threads loading and
 writing
  data, detecting URL connections).
  
  Tomcat starting-up with 80 up 90 MB memory size as Win2003 shows in
 the
  Tasks Manager, it keeps running stable and getting up and down
 between
  80 and 93 MB memory size. After several hours, memory size gets down
 to
  5 MB very fast, and then start goes up to 90 MB also fast.   This
  change
  happening in about 2-3 minutes only, then it becomes stable again
  jumping between 80-93 MB memory size.
  
  While this happening Tomcat is up and running, also my App. is up and
  running. I do not have any memory error messages.
  
  
  I doubt it is the GC, Anybody can explain that?!!!
  
  
  My JAVA_OPTS as follows

Re: JVM memory size changing dramatically

2004-07-28 Thread Dennis Dai
Can't remember where I read it but it's something like this on 
NT/2k/XP/2k3 family:

Windows is using the physical memory as cache to cache the real app 
image in the swap file. So if your app has been idle for a while, it's 
very likely to be swap out of the physical memory. This is regardless of 
how much physical memory you have.

Interesting approach but sometimes annoying.
On 7/28/2004 9:11 AM, Futchi wrote:
Hi all,
I am running tomcat 5 on Win2003 server, my single app. has
several threads running in the background (threads loading and writing
data, detecting URL connections).
 
Tomcat starting-up with 80 up 90 MB memory size as Win2003 shows in the
Tasks Manager, it keeps running stable and getting up and down between
80 and 93 MB memory size. After several hours, memory size gets down to
5 MB very fast, and then start goes up to 90 MB also fast.   This change
happening in about 2-3 minutes only, then it becomes stable again
jumping between 80-93 MB memory size.
 
While this happening Tomcat is up and running, also my App. is up and
running. I do not have any memory error messages.
 
 
I doubt it is the GC, Anybody can explain that?!!!
 
 
My JAVA_OPTS as follows
 
 
JAVA_OPTS=-server -Xms256m -Xmx768m -XX:NewSize=64m -XX:MaxNewSize=64m
-XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=5
-XX:TargetSurvivorRatio=75 -XX:PermSize=32m -XX:MaxPermSize=32m -Xss128k
-XX:+DisableExplicitGC
 
 


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