• Post Reply Bookmark Topic Watch Topic
  • New Topic

-Xmx1024m -XX:MaxPermSize=640m -Dcom.sun.aas.instanceName=server  RSS feed

 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I have 2 gb of RAM installed and am moving to 4 gb. and suspect I have a memory problem because EJBs won't deploy on GlassFish, should I also increase the

-Xmx1024m -XX:MaxPermSize=640m -Dcom.sun.aas.instanceName=server


to something else?

I am told that I have a problem with the ANT_OPS environment variable and that I need to tweak it, it presently states:

-Xmx1024m -XX:MaxPermSize=640m -Dcom.sun.aas.instanceName=server

The application that I am running requires 4 gb of RAM but I only have 2 gb of RAM on the machine and hope to go to 4 gb.

Also, the server logs show that when I register the EJBs and they error out, that I am only utilizing 1.5 Gb of RAM.

Any ideas?

Thank you,
Michele
 
Alex Hurtt
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you on a 64-bit OS with 64-bit hardware?

I ask because on the chance you are running on 32-bit Windows you will be limited to a max heap size of around 1.8Gig because the OS won't allow more memory than that per process even though the total physical memory addressable by the OS is closer to 4G.
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no I am on a 32 bit machine server windows 2008 sp2
 
Alex Hurtt
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please see my first original reply to your original message which I was editing probably as you were typing up your last response to my question. Check with the documentation for your specific version of Windows to see if this is a problem for you or not. If you want to run a JVM using > 1.8G of memory as max heap size you may have to move to 64-bit. If this isn't possible you might have to use multiple JVM processes to effectively utilize all your available memory. I say this mainly because you talk of moving to 4Gig of memory but I want to be sure you understand that there's the possibility that a single 32-bit JVM will not be able to effectively utilize all this memory due to OS limitations on process memory.
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi thanks for responding. I talked to the system administrator and my boss.

My boss thinks that adding 2 more gb of RAM might help on a 32 bit machine, however, the system administrator thinks we ought to just start over with a brand new 4 gb 64 bit machine.

What's your opinion?

Also the server logs show that I am reaching the glass ceiling with the RAM. It is maxing out at 1.5 megs.

Thanks,
Michele
 
Alex Hurtt
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adding 2 more GB of RAM on a 32 bit system could help your JVM IF you had say...specified a 1.5Gig max heap size but the JVM were never able to get that much allocated to it because other processes running on the system require > the left over 512MB of RAM and eat into the memory you want to use for your JVM. If your JVM is already bumping up against the 'glass ceiling' as you say and there is still some free unutilized system RAM then no...adding another 2 Gigs won't really help you much as that would mean the system already had more RAM than it needed. And it sounds like this is what's happening to you if the JVM is able to get a full 1.5 Gig allocated to it already. You aren't going to get much more than that under Win 32-bit for a single JVM process.
In general adding more RAM to a system never really hurts performance (unless its slower RAM than your existing RAM in which case it will usually slow down to the slower RAM speed or your system will become unstable if incompatible RAM modules are installed) but it doesn't ALWAYS help either. I would tend to side with your sys admin and go 64-bit though...32 bit is on its way out. Move to 64 bit now and memory will never be an issue again...well at least probably not before you retire. And if I were going to start over with a brand new 64 bit box I'd just throw 8 Gig in there minimum...RAM is cheap.
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok thanks so much! I really appreciate it! I guess when it said the specs for the software was 4GB. RAM, I should have known that we were talking about 64 bit machine with 4 GB RAM installed.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!