473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Need help - Tune JVM to use Max Memory on Linux

Hi,

Need help in tuning JAVA on LINUX.

From http://www.trutek.com/index.php?id=173 I understand that on Linux operating system with 4GB memory, JVM can be run with maximum memory of 3800m. But I had no luck. Could someone help me in achieving on Red Hat Linux server.

Here is the details of my Linux server.

OS: Red Hat Linux (Linux xyzsrvr 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux)
Java: java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
RAM: 4GB

I get this below error while instructing JVM to use 3800m.
$ java -Xmn3800m -Xmx3800m xxxxx (Lots of more options)
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

The "free" command yeilds below details on memory usage.
free
total used free shared buffers cached
Mem: 4149212 3374120 775092 0 244844 2755816 -/+ buffers/cache: 373460 3775752
Swap: 2097144 0 2097144

Currently I could go up to -Xms2588m -Xmx2588m

It would be great if someone help me on this.

Thank you,
Crabbie
Jun 29 '07 #1
1 7446
Motoma
3,237 Expert 2GB
Take a look at http://www.javaperformancetuning.com...pservers.shtml.
I think a good excerpt for you you have would be:
As a starting point for a server based on a single JVM, consider setting the maximum heap size to 1/4 the total physical memory on the server and setting the minimum to 1/2 of the maximum heap. Sun recommends that ms be set to somewhere between 1/10 and 1/4 of the mx setting. They do not recommend setting ms and mx to be the same. Bigger is not always better for heap size. In general increasing the size of the Java heap improves throughput to the point where the heap no longer resides in physical memory. Once the heap begins swapping to disk, Java performance drastically suffers. Therefore, the mx heap setting should be set small enough to contain the heap within physical memory. Also, large heaps can take several seconds to fill up, so garbage collection occurs less frequently which means that pause times due to GC will increase. Use verbosegc to help determine the optimum size that minimizes overall GC.
Jul 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: bouchia.nazha | last post by:
Hello I have encountered a problem using tomcat, linux and ssl. My problem seem to be a JVM memory deallocation problem on Linux. This is my configuration: OS: Redhat7.2 Tomcat: 4.0 Jdk:...
3
by: Ian | last post by:
Hi all, I have a problem. I have an application which needs to work with a lot of data, but not all at the same time. It is arranged as a set of objects, each with lots of data that is created...
5
by: mr.iali | last post by:
Hi Everyone I would like to get into software developent using a programming language like c++, java or pl/sql for oracle. I have no idea where to start from. Which language is there more...
5
by: Eddie | last post by:
I have a MySQL-server running Innodb. We have installed ~ 2GB of memory in the server. In spite of this MySQL keeps crashing due to out-of-memory errors. The server is a dual xeon i686 running...
6
by: hauger | last post by:
(DB2 V.8.1) Hi @ll, when i start my DB2 and my application connects and makes some SQL Tests my system is running out of memory (UNITED LINUX 1.0) goes slow and needs very very long time to...
3
by: Froggy / Froggy Corp. | last post by:
Thx for your quick answer too :) Richard Huxton wrote: > > On Wednesday 18 February 2004 20:18, Froggy / Froggy Corp. wrote: > > Hello, > > > > I asked one time for more "benchmark"...
4
by: WaterWalk | last post by:
Hello, I'm currently learning string manipulation. I'm curious about what is the favored way for string manipulation in C, expecially when strings contain non-ASCII characters. For example, if...
7
by: nass | last post by:
hi all, i am running slackware linux and need to use some function that will will enable me to write and read from a shared mem segment.. i am using open() , to open a file, and then use mmap to...
18
by: MajorSetback | last post by:
I am using the Redhat version of Linux and GNU C++. It is not clear to me whether this is a Linux issue or a C++ issue. I do not have this problem running the same program on Windows but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.