Solved

Java VM parameters on Solaris

Posted on 2010-11-16
11
706 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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
 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
unable to put logic for reading multiple repo in a single file 4 72
login form jsp example 2 53
lunix and unix command 21 120
jsp insert to database example 2 64
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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.

726 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