Solved

Using 4GB RAM on windows 2000 using java

Posted on 2003-10-24
7
773 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

760 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

21 Experts available now in Live!

Get 1:1 Help Now