9 Replies Latest reply on Mar 15, 2012 3:40 PM by onzyone

    64 bit JVM on 64 Bit Redhat 5

    Dallas Hartle Newbie

      so we have been running JBOSS on a windows Server for some time now, but we are finding some memory related issues are killing out JBOSS instances. I have just installed a RHEL 5 server in ESX 4.0 to test and see if a 64bit Linux architecture would be more effective for our JBOSS applications. we are running JBOSS 4.3.

       

      so now in my RHEL box, I cannot start the 64 bit JVM, any Ideas to what I am missing? Red Hat is telling me that the 64 bit JVM is not supported? Also, I am able to start the 32 bit JVM...and it is running my app currently, however, I am not sure that this will give me any advantages over my 32 bit Windows Architeture.

        • 1. Re: 64 bit JVM on 64 Bit Redhat 5
          Peter Johnson Master

          From my experience, you can usually specify larger heap size with Linux than with Windows on the 32-bit JVM. Often, Windows tops out at around 1.6GB while Linux will go up to 2.6GB.

           

          Are you sure that your RHEL is 64-bit? If it isn't you will not be able to run any 64-bit apps.What error do you get when you try to run the 64-bit JVM? (By the way, the 64-bit JVM works fine on my 64-bit Ubuntu system and I have also run 64-bit JVMs on 64-bit RHEL systems.)

          • 2. Re: 64 bit JVM on 64 Bit Redhat 5
            Dallas Hartle Newbie

            Thank you for your response...your answer is exactly the results that I would like to attain.. if I could get 64 bit JVM working. yes it is the 64 bit version of RHEL

             

            uname -a yields:

            Linux templinux.company.com 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

             

            the error I get is :

            [root@templinux bin]# java -server -d64 -version
            Running a 64-bit JVM is not supported on this platform.

            • 3. Re: 64 bit JVM on 64 Bit Redhat 5
              Peter Johnson Master

              The -d64 option I think is allowed only on Solaris machines. I have  never used it on either Windows or Linux. Try running without it. If that does not work, post the result from the following:

               

              java -version

               

              and this:

               

              java -server -version

              • 4. Re: 64 bit JVM on 64 Bit Redhat 5
                Dallas Hartle Newbie

                ok so we can get it to run, but how can we verify that our JVM is running in 64 Bit mode? We hava a monitoring tool that we are trying to run on it after it starts, and IT will only start in 32 bit mode...has us thinking that the JVM is running in 32 bit mode.

                 

                results:

                [root@templinux bin]# java -version
                java version "1.6.0_20"
                Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
                Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
                [root@templinux bin]# java -server -version
                java version "1.6.0_20"
                Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
                Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)

                • 5. Re: 64 bit JVM on 64 Bit Redhat 5
                  Peter Johnson Master

                  Looks like you are running the 32-bit version of the JVM. Here is what I see on my Windows box:

                   

                  >java -version
                  java version "1.6.0_20"
                  Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
                  Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

                   

                  Also, another tell-tale sign is that there is no 'client' JVM shipped with the 64-bit JDK.

                  • 6. Re: 64 bit JVM on 64 Bit Redhat 5
                    Peter Johnson Master

                    I guess the next question is: how did you go about installing the JDK?

                    • 7. Re: 64 bit JVM on 64 Bit Redhat 5
                      Dallas Hartle Newbie

                      I downloaded this file from Java:

                      jdk-6u20-nb-6_8-linux-ml.sh

                      and ran it to install the JDK

                      • 8. Re: 64 bit JVM on 64 Bit Redhat 5
                        Peter Johnson Master

                        I did a double-take on that file name before I realized that what you downloaded is the JDK + NetBeans bundle. I suspect that is 32-bit only (I think that NetBeans uses some shared objects that are 32-bit only). What you really want is to select the JDK only (it is the first one on the downloads page), and the choose "Linux x64" and then pick the file jdk-6u20-linux-x64-rpm.bin. Once you download it, "chmod a+x" it and then run as root - it will install the JDK at /usr/java/jdk1.6.0_20.

                         

                        I haven't tried installing the JDK + NetBean package so I don't know where it places the JDK. You might want to check /usr/java to make sure it is not there. If it is, do what I did: I renamed the 32-bit JDK to /usr/java/32bit/jdk1.6.0_20-x86. (You do not have to reinstall it, just moving it is sufficient.)

                        • 9. Re: 64 bit JVM on 64 Bit Redhat 5
                          onzyone Newbie

                          another cool tool to see if you are runing 32 or 64 is the following:

                           

                          jinfo [ option ] pid
                          jinfo
                          [ option ] executable core
                          jinfo
                          [ option ] [server-id@]remote-hostname-or-IP

                           

                          So ... something run a java program, find it's pid

                           

                          jinfo -sysprops 1234 | grep sun.arch.data.model
                          Attaching to process ID 1234, please wait...

                          Debugger attached successfully.

                          Server compiler detected.

                          JVM version is 11.3-b02

                          sun.arch.data.model = 32

                           

                          I have tested this on v1.5 and v1.6