aspose file tools*
The moose likes Performance and the fly likes Memory settings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Memory settings" Watch "Memory settings" New topic

Memory settings

Jes Sie
Ranch Hand

Joined: Jul 24, 2001
Posts: 188

I've got this machine here running JBoss that has got about 3 GB RAM. Now, the memory doesn't seem to used agressively.

Currently, what I've got is -Xms512m -Xmx1024m

Pls let me now the exact settings so that I could increase it further, please.

PS: I was told the max the JVM could take is 2 GB.

Thank you.<br /> <br />- Jess Sie<br /> <a href="" rel="nofollow"></a>
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24166

There two flags each give a number in megabytes. You can increase them to use more memory. The mx is the total Java heap size, which can go up to about 1850MB on many platforms, while ms is the initial heap size. They can both be the same number or you can use a range as you are here.

[Jess in Action][AskingGoodQuestions]
Joe Ess

Joined: Oct 29, 2001
Posts: 8703

You are complaining because the JVM isn't using enough memory? I think that's a first. Most people complain that it uses too much.
The JVM is tuned to make the best use of the memory allocated and request more when necessary. You can crank up the values of -Xms and -Xmx, but if your application doesn't need that memory you are wasting valuable resources.
Depending on your JVM version, you may be able to use a -server switch on the command line to tell it to tune for long-running server applications or use -client to tune for short-run GUI intensive programs. This selection is made automatically in JDK 1.5.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
jQuery in Action, 2nd edition
subject: Memory settings
Similar Threads
"Lost" 3 GB of space on my C drive (win xp)
SDK 32 or 64 bits ?
CMS collector tuning
Internal error occurs during building workspace ?
Tomcat capacity planning