Solved

Java VM parameters on Solaris

Posted on 2010-11-16
11
700 Views
Last Modified: 2013-12-27
I would like to set permanent parameters for Java VM on Solaris, so I will don't need to set them for each NetBeans project. I have also Oracle 11g installed on this server and total RAM 24GB.
Please advice:
how to distribute RAM between Java and Oracle for the best productivity and
how to set  these -Xms and -Xmx parameters for Java.
Thank you
0
Comment
Question by:gbcbr
  • 5
  • 3
  • 2
11 Comments
 
LVL 16

Expert Comment

by:Joseph Gan
ID: 34148811
To set java parameters:

# which java
this will show the path for current java, eg. /usr/bin/java, normally this is a symbolic link.

To cleanup old java, just remove this link.

Then, create a symbolic link to your new java command where ever is:

# ln -s {new java path} /usr/bin/java (example only, depend on "which java" command output).
0
 

Author Comment

by:gbcbr
ID: 34148879
you copy answer from @arnold@ to my previous question by mistake?
0
 
LVL 16

Expert Comment

by:Joseph Gan
ID: 34149265
That was my answer even though I did not ge any pionts.
0
 

Author Comment

by:gbcbr
ID: 34149310
I'm very sorry, I'll give you points on this question.
But please answer on this question, not for previous.
Sorry again.
0
 
LVL 16

Expert Comment

by:Joseph Gan
ID: 34149427
Don't know can set RAM to Java. One way can allocate RAM to Oracle is to set them in/etc/system file as recommemded by Oracle doc.
eg.
set shmsys:shminfo_shmmax=#######
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:gbcbr
ID: 34182604
Maybe experts for Solaris can help?
0
 
LVL 9

Expert Comment

by:fcontrepois
ID: 34222163
Oracle and java handle the memory on their own.

Oracle 11 just requires an amount of memory and it will manage all the others settings.

A dev database with less than 100'000 rows per table can be handled in a 2-4 GB ram

Java requires a little more tuning, depending on the application it need to manage and the version. Generally starting setting -Xmx will be enough

If you start the java app from command line just add -Xmx1g
Es. java -Xmx1g main
For application servers and other complex java app there should be a file to set the java executable parameters

To have more info answer the following questions:
do you have a single oracle instance or multiple ?
what are you trying to run on java?
0
 

Author Comment

by:gbcbr
ID: 34222687
I have single instance, but the question is that when I try to set -Xmx and -Xms on Solaris version of Netbeans it doesn't accept any arrangements, and I have to leave it empty.
I want to set for Java 30% - 8g, but I can't, something block this arrangement.
0
 
LVL 9

Accepted Solution

by:
fcontrepois earned 500 total points
ID: 34223588
http://performance.netbeans.org/howto/jvmswitches/

Looks like you can Use ./netbeans -J-Xmx256m
0
 

Author Closing Comment

by:gbcbr
ID: 34224451
thank you for the good link
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

759 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

20 Experts available now in Live!

Get 1:1 Help Now