This is proobably not the solution, but just yesterday I had a problem
on a laptop with Windows 8 where it appeared as if the JVM took no
notice of my JAVA_OPTS, the reason for which I still fail to
comprehend.
So just to make sure, you could try and feed the parameters directly
to the Java process as you are starting DHIS2, if you're using DHIS
Live you could try something like this from a Command prompt:
With your settings, I think there will be too much paging happening and the heap space is the worst place to page.
The reason for the paging is you might have nearly free 2.5GB RAM available (windows might use the remaining) and you’ve set the heap space from 3Gb to 6Gb, which will always nearly page.
So, I would say the -Xms1024m -Xmx1500m should be safest for 4Gb, given that you’d run parallel GC in some memory that will be beyond the heap.
All of this assuming that you have x64 Java as well… just having windows x64 won’t be enough.
On 23 February 2013 02:22, Saptarshi Purkayastha sunbiz@gmail.com wrote:
With your settings, I think there will be too much paging happening and the heap space is the worst place to page.
The reason for the paging is you might have nearly free 2.5GB RAM available (windows might use the remaining) and you’ve set the heap space from 3Gb to 6Gb, which will always nearly page.
So, I would say the -Xms1024m -Xmx1500m should be safest for 4Gb, given that you’d run parallel GC in some memory that will be beyond the heap.
All of this assuming that you have x64 Java as well… just having windows x64 won’t be enough.
Thanks for the quick response. I've found that the only way to be sure that the new settings show up in DHIS-2 on topcat is to create a setenv.bat file in the tomcat\bin folder. Setting it as an environment variable seems to be less reliable.
Randy
···
-----Original Message-----
From: Knut Staring [mailto:knutst@gmail.com]
Sent: Saturday, February 23, 2013 2:46 AM
To: Wilson,Randy
Cc: dhis2-users@lists.launchpad.net
Subject: Re: [Dhis2-users] Optimal settings for JAVA_OPTS on a 4 gig Windows 7 computer?
Hi Randy,
This is proobably not the solution, but just yesterday I had a problem on a laptop with Windows 8 where it appeared as if the JVM took no notice of my JAVA_OPTS, the reason for which I still fail to comprehend.
So just to make sure, you could try and feed the parameters directly to the Java process as you are starting DHIS2, if you're using DHIS Live you could try something like this from a Command prompt:
Thanks Saptarshi. These settings worked like a charm. I guess I still need to add some more memory if I want to update our big dataset frequently.
Randy
···
The reason for the paging is you might have nearly free 2.5GB RAM available (windows might use the remaining) and you’ve set the heap space from 3Gb to 6Gb, which will always nearly page.
So, I would say the -Xms1024m -Xmx1500m should be safest for 4Gb, given that you’d run parallel GC in some memory that will be beyond the heap.
All of this assuming that you have x64 Java as well… just having windows x64 won’t be enough.
Some of this is a bit more voodoo than science … but giving your jvm 6G when you only have 4G will not help the cause (I see Saptarshi has talked about paging). And if you have postgres on the same machine, she needs some too.
DHIS2 has two different stress modes - during the day when it might be fielding lots of connections and at night when its doing this mammoth datamart job. It’s hard to know how to optimize for both. In your case you are only interested in the latter. So its a question of how best to share the memory out between TC and postgres.
I’'d suggest giving 2G to tomcat heap and hopefully leaving about 1G for postgres. Along the lines of:
JAVA_OPTS=“-Xmx2G -XX:MaxPermSize=256m”
I am not sure how optimized postgres comes out of the box on windows 8, so could be some useful tweaking there too.
Bob
···
On 22 February 2013 21:53, Wilson,Randy rwilson@msh.org wrote:
Does anyone have suggestions for the optimal settings for JAVA_OPTS on a 4 gig Windows 7 64 bit OS?
My computer hangs every time I try to run the DATAMART process.
Current settings are: SET JAVA_OPTS=-Xmx6000m -Xms3000m -XX:MaxPermSize=500m -XX:PermSize=300m