File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDK 6 automatically detect AMD-64 bit

 
Pat Farrell
Rancher
Posts: 4660
5
Linux Mac OS X VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may not be officially an advanced question, but this seemed like a decent place.

After years of writing Java applications. I'm putting a Tomcat/JSP application on a quad processor AMD64 system with 12GB of ram, a terabyte of RAID disks, seven NICs, etc. So the server is advanced.

Does the Sun JVM automatically detect the CPU's 64 bit-ness and do the right thing?

Are there switches I need to use to tell Tomcat that it can use 5GB of Ram?

Thanks
Pat
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JVM won't detect 64-bitness, but you can (and should) install a 64-bit JVM. If you go to the JDK 6 download page, you'll see that three of the versions you can grab are AMD64 JVMs for Solaris, Linux, and Windows. Such a JVM will know all about 8-byte pointers and other such goodness.

Since I'm not lucky enough to have the use of such a beast meself, I'm not 100% sure of this, but I believe that telling Java (Tomcat) how much heap to use just uses the normal Java command-line switches (-XmxNNNNm, etc) ; their acceptable range of arguments is just bigger.
[ November 13, 2007: Message edited by: Ernest Friedman-Hill ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pat Farrell:
Are there switches I need to use to tell Tomcat that it can use 5GB of Ram?


Depending on your OS and (if Windows) the way you've installed and are running Tomcat the method for changing your heap setting differ.
How are you starting Tomcat?
[ November 13, 2007: Message edited by: Ben Souther ]
 
Pat Farrell
Rancher
Posts: 4660
5
Linux Mac OS X VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, not Windoze.
Some Debian, some Ubuntu

mostly via Apache

Sometimes inside Netbeans 5.5
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On your *nix boxen, you can set the heap size in tomcat/bin/catalina.sh.
Look for the JAVA_OPTS description in the header.

Here's mine:




You can verify that the setting 'took' by viewing the ServerStatus page in the tomcat manager/html application






I've never used the embedded version that ships with Netbeans so I don't know how to set this there. Someone else might.
[ November 13, 2007: Message edited by: Ben Souther ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic