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?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
softblessAuthor Commented:
Hi ErdyMurphy,

That is a very general answer. Can u be more specified?
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

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...
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

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  ??
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
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The above of course applies to Xmx.
Up to now I nevwer needed to chnage the rest of the values.
softblessAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.