Suggested JAVA_OPTS setting

Wanna ask about JAVA_OPTS setting.

Currently the setting is like this :
set JAVA_OPTS=-Xms256m -Xmx1024m -Xss96k -XX:MaxPermSize=256m -server

We have a server with 5GB RAM. Can u suggest the appropriate JAVA_OPTS setting with 5 GB RAM?


softblessAsked:
Who is Participating?
 
for_yanConnect With a Mentor Commented:
If you don't experience any particular problems right now, leave it as it is.
If you encounter some applications, servlets giving you OutOfMemory error,
then increase until these applications are satisfied
 
0
 
ErdyMurphyCommented:
you could set the max heapsize (xmx) higher
depends on what services your server provides besides JAVA
if there are running more services which are also need memory you
cant use the full 5 GB
0
 
softblessAuthor Commented:
Hi ErdyMurphy,

That is a very general answer. Can u be more specified?
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
ErdyMurphyCommented:
the problem is that it depends on the particular situation...
therefore you have to test it for you application

an example:
if you want that the maximum heap is set to 4gb then you write
-Xmx4096m

but then the operating system has to provide this amount of memory...
if your server is running more services which alos need memory
it could be that the os cant provide that much memory...

pherhaps your application dont need that much memory
and you are "steeling" other services memory

as you can see there is no specific answer...
0
 
softblessAuthor Commented:
Ok, let's say like this,

from that 5 GB, I'm gonna use 3Gb memory for that application.

What is your opinion for :
-Xms -Xmx -Xss -XX:MaxPermSize  ??
0
 
ErdyMurphyConnect With a Mentor Commented:
i only would change the Xmx to 3072m for now

and with the other paramters you could play a bit and test some other values...
because like i said it depends on the application
0
 
for_yanCommented:
The above of course applies to Xmx.
Up to now I nevwer needed to chnage the rest of the values.
0
 
softblessAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.