Solved

Using 4GB RAM on windows 2000 using java

Posted on 2003-10-24
7
774 Views
Last Modified: 2011-10-03
Hi,

We use a third party application that parses weblogs and generates statistics.

The application gives OutOfMemory exception when the weblogs are hugs.

I am wondering if doing "editbin.exe /LARGEADDRESSAWARE java.exe" is going to help.

I have tried almost all combinations of -Xms, -Xmx, -NewSize, MaxNewSize.

I have 4GB of physical RAM and I have /3GB in boot.ini in Windows 2000 Advanced Server.

Thanks,
Anurag.
0
Comment
Question by:danurag
7 Comments
 

Expert Comment

by:pete_playa
ID: 9617713
Ok Anurag,

Heres the thing, if you have already tried the basics, its time to swallow the bitter pill.

i had the same problem. what u need to do is buy/evaluate a copy of optimize it or jprobe, attach ur applicatiom or servlet to it and watch it eat up ur memory, determine the highest memory consumption objects and see if u can reduce them.

look out for strings, char first. then look out for persistent objects that do not release memory after log off.

need more tips let me know.... u know been there, dont that!!

:)

P
0
 

Author Comment

by:danurag
ID: 9617748
As I mentioned its a third party application so I can't do much about it. I just would like to know if executing  "editbin.exe /LARGEADDRESSAWARE java.exe" would force jvm to use 4GB RAM.
0
 
LVL 26

Expert Comment

by:dpearson
ID: 9618547
Certainly /LARGEADDRESSAWARE should help ensure the jvm can go beyond 2GB.

That being said, the 4GB on the machine is not the key factor.  The JVM will be allocating from virtual memory, so you'll also need to make sure you have sufficient swap space (disk space) for it to allocate really large chunks of memory.  For starters, its needs to be running NTFS.

However using more than 2GB in parsing a weblog sounds like there's a memory leak (yes Java can easily have memory leaks) in which case the solution involves getting the 3rd party to fix the application.  I know that's not the answer you wanted to hear...

Doug
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:danurag
ID: 9628285
Swap space is in GBs and I have physical RAM which is not used.
0
 
LVL 26

Accepted Solution

by:
dpearson earned 205 total points
ID: 9628919
The decision about how much RAM currently in use by your JVM process is made by the operating system based on many factors and you will always have free physical RAM even if the JVM is using more than 4GB of virtual space.  There's no way that I'm aware of to guarantee a given amount of physical RAM be used by a particular process.

As I said before, sounds like a bug in the 3rd party app which may mean there's nothing you can do to work around it.
0
 
LVL 92

Expert Comment

by:objects
ID: 10224770
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept dpearson's comment as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

objects
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now