• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Memory settings

 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic