jQuery in Action, 3rd edition
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
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="mailto:jess@see-consulting.com" rel="nofollow">jess@see-consulting.com</a>
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

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: 9189

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.

[How To Ask Questions On JavaRanch]
I agree. Here's the link: http://aspose.com/file-tools
subject: Memory settings
It's not a secret anymore!