JVM Memory


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers JVM Memory
# 1  
Old 08-21-2015
JVM Memory

Hi all,

I am starting a JVM in unix and when I use ps command on the pid of process starting JVM the output is something like this :-

Code:
java -Xms32M -Xmx64M -Xmx128M

I need to know what would be the value of Xmx in this case.
And how to check that this value be picked while starting JVM for both Linux and Solaris.

Thanks in advance
# 2  
Old 08-21-2015
The last option would probably override it.

Why do you need the two redundant options, however?
# 3  
Old 08-21-2015
The standard behavior is to have the latest option overriding the previous ones. On most JVMs, you can verify the selected option with using -XshowSettings:vm, e.g.:
Code:
$ /opt/jdk1.8.0_05/bin/java -XshowSettings:vm -Xms32M -Xmx64M -Xmx128M -version
VM settings:
    Min. Heap Size: 32.00M
    Max. Heap Size: 128.00M
    Ergonomics Machine Class: server
    Using VM: Java HotSpot(TM) 64-Bit Server VM

java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
$
$ /usr/lib/jvm/java-7-openjdk-amd64/bin/java -XshowSettings:vm -Xms32M -Xmx128M -Xmx64M -version
VM settings:
    Min. Heap Size: 32.00M
    Max. Heap Size: 64.00M
    Ergonomics Machine Class: server
    Using VM: OpenJDK 64-Bit Server VM

java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

This User Gave Thanks to jlliagre For This Post:
# 4  
Old 08-23-2015
I am getting this error:-

Code:
Unrecognized option: -XshowSettings:vm
Could not create the Java virtual machine.

I am using java 1.6 and this option is available in java 1.7

Last edited by Raj999; 08-24-2015 at 01:04 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

JVM processes are not getting memory allocation as soon as started

Hi, i have this scenario, when i start about 20 java processes simultaneously in unix and run ps -eaf command i can see that processes are running but memory is not getting allocated to them immediately and it stays ideal for at least 10-15 min. Meanwhile i run free command to check the RAM,... (5 Replies)
Discussion started by: Vishal Gangrade
5 Replies

2. AIX

JVM Process Name

Hi - In AIX, how do I find the Java Virtual Machine Process Name running on a particular machine? I tried ps -ef | grep java but it does not return a process name. Please help. (4 Replies)
Discussion started by: ocbit
4 Replies

3. UNIX for Dummies Questions & Answers

Default JVM Memory

Hi , Whenever I am starting JVM it is getting started with Xms as 256MB, which is 1/64 of the Memory available and by default this should happen. But I want to change and start the every JVM with 128MB. Is there any way to do or I have to manually specify Xms tag while starting JVM. Thanks (1 Reply)
Discussion started by: Raj999
1 Replies

4. UNIX for Advanced & Expert Users

JVM Memory used on AIX

Hello, i need just a Unix command line (AIX 6) that gives me the memory/CPU used by a WebSphere JVM from it's PID such as ps -ef | grep 'jvm name'. I know jstat -gc PID but it didn't work Could you help me please Thanks Christian (1 Reply)
Discussion started by: steiner
1 Replies

5. Shell Programming and Scripting

To find JVM memory usage in shell console

i need to find memory usage by JVM in shell prompt, i tried with pidVal=$( ps -ef | grep "/opt/bea2/jrockit/bin/java -jrockit" | grep -v grep | awk -F' ' '{print $2}' | tr "\n" "," | cut -d ',' -f1 ) top -b -n 1 | grep $pidVal this will just give cpu usage and ram... How do i find... (4 Replies)
Discussion started by: vivek d r
4 Replies

6. Solaris

jvm memory settings

When i changed jvm memory settings from 3048 to 3548, appsserver could not start. if no change , it was normal. How do we change .otherwise i had a out of swap space error appeared after 3hrs period when do the monitoring of java application. (1 Reply)
Discussion started by: vijill
1 Replies

7. HP-UX

How to increase JVM memory in HP UX

Hi, Im using HP UX and tried to increase the JVM memory from 1GB to 2GB for the weblogic domain. but it did not work and started throwing errors. I would like to know if there is any OS level parameter that need to be checked and modified before making changes to JVM memory. (3 Replies)
Discussion started by: rsivasan
3 Replies

8. Web Development

need help about jvm

hi all i want to install apache and tomcat in unix solaris 10 so i need to konw about heap and jvm memory architecture in jdk version 4 and 5 and 6 i want one help me i searched alot and i can't find something helo me (1 Reply)
Discussion started by: maxim42
1 Replies

9. AIX

JVM Setting

What should be the idle JVM setting for the LPAR having 16 GB of memory? Currently the JVM setting is set to -Xms1024M -Xmx10240M (1 Reply)
Discussion started by: aajmani
1 Replies

10. UNIX for Dummies Questions & Answers

Instaling JVM

Hi Everyone I`ve just started with unix can some please help me execute this command via webmin on avirtual server or how do you execute such .bin file this is the error ./j2sdk-1_3_1_15-linux-i586.bin: not found > ls -l total 69124 -rw------- 1 root wheel 8380 May 15 18:01... (2 Replies)
Discussion started by: J.Carlos MC05
2 Replies
Login or Register to Ask a Question