I have installed RHEL 6.5 and am facing a performance issue with java.
# time java -version
java version "1.6.0_34"
OpenJDK Runtime Environment (IcedTea6 1.13.6) (rhel-1.13.6.1.el6_6-x86_64)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
real 0m45.243s
user 0m0.149s
sys 0m0.086s
Try to install version java version "1.8.0_31" and see if the numbers does improve.
rpm -ivh jdk-8u31-linux-x64.rpm
Also check the configuration page from RHEL. https://access.redhat.com/documentation/en-US/JBoss_Communications_Platform/5.0/html/Platform_Installation_Guide/chap-Installing_and_Configuring_Java.html
I found out that it was McAfee's nails process which was slowing down not only java but many other system processes. Stopping resolved the issue.
Related
On of our (remote) developers needs to install FDT (an Eclipse based IDE) to compile some legacy ActionScript code. I've got FDT working on my Ubuntu 18.04 laptop just fine, but the dev is having trouble getting it to work on his Mac. When he has Java version 7, 8 or 9 installed he gets a message saying
we need legacy java you can download it here...
and if he uses Java version 6, it says it needs version 7 or more.
So I checked which version I have on my Ubuntu 18.04 laptop so he can get the same one, and to my surprise it says:
$ java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
As far as I know Java is WAY ahead of version 1.8. So I logged into our production server (Ubuntu 16.04) and there we've got something similar:
$ java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-0ubuntu0.16.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
I checked out the OpenJDK website and there it says OpenJDK is now at version 11.
What version of Java my laptop is actually running so our dev can get the same version?
You are using Java 8.
The Mac problem is a historic one because the legacy question is for a 32-bit JVM for some programs and you need a 64-bit for Java 8.
Install the Java 6 the programs want and then install A newer java from oracle and he should be good to go.
I have a written a java program that uses multi-threads and prints the run-time when the processing is done.
I've created the jar file so I can test it on the university's server. Both the program in eclipse and the jar file runs perfectly on my machine (8 GB RAM and only 4 CPUs Ubuntu). But when I try to execute the jar on the server it's 2x slower! knowing that the virtual machine on the server has 8GB in RAM and 6 CPUs (Debian).
Why the jar file is slower on the virtual machine? I figured it's probably because of the JDK version on the Debian machine, so I updated JDK and JRE.
(Used Java version in Debian)
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-1~deb9u1-b11)
OpenJDK Server VM (build 25.171-b11, mixed mode)
(Java version on my "supposed-to-be-slower" Ubuntu)
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
As of Java 7 there is almost no difference between OpenJDK and Oracle HotSpot, see the Moving to OpenJDK as the official Java SE 7 Reference Implementation article.
If you want to compare execution on both Linux machines you can try profiling with Flame Graphs:
Flame graphs are a visualization of profiled software, allowing the most frequent code-paths to be identified quickly and accurately.
A good example how to use them is available on Netflix tech blog, especially the "The Problem with Profilers" section.
When I install myeclipse, it shows "needs java SE6 Environment",
How do I resolve this problem?
I have already installed jdk1.7 in my OS X Yosemite.
/Users/**** $ java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
This is a problem with the online installer, which is a 32-bit application while Java 7 on OS X is 64-bit only.
You have two solutions : you can just download the offline installer, which should work fine, according to this support thread.
If this doesn't work, you'll have to install Java 6, which you can find here.
This was a problem with earlier installers. All current installers will not have this problem. Please download the latest release.
I am using rjb to connect java classes in my rails application...
But I am getting this error can't create Java VM
My ruby -v gave me
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
and java --version
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
I went through this post Error “can't create Java VM” trying to use Ruby Java Bridge (RJB) gem but the problem is I can not install 32 bit java as it is needed by some other application
I would download the jdk from oracle (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html), the version you need. Then for your application set JAVA_HOME to that install directory. You can have multiple different jvms installed on a system.
The reason that I need the HotSpot VM be in debug mode, is that I want some JVM options, like -XX:+PrintCFGFile, be supported.
My current JVM version is like
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (suse-3.1-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
Do I have to install some tool/patch to achieve that?
Thanks!
After searching a while, the problem looks more clear now.
The reason that I can't use the option -XX:PrintCFGToFile is because the JVM I used is the product version, not debug version.
I found such a website which provides the debug version of JVM. Below is the link:
http://download.java.net/jdk6/6u25/promoted/b03/index.html
I have tested the version jdk-6u25-ea-bin-b03-windows-i586-debug-27_feb_2011.jar It works well, the option I mentioned above can be used, and an output.cfg file would be produced after execution of a Java program.
After installation, there would be such a series of folders \jdk1.6.0_25\fastdebug>. And I get the following version info:
java version "1.6.0_25-ea-fastdebug"
Java(TM) SE Runtime Environment (build 1.6.0_25-ea-fastdebug-b03)
Java HotSpot(TM) Client VM (build 20.0-b10-fastdebug, mixed mode)
From the jdb manual:
"A VM that is to be debugged with jdb must be started with the following options: -agentlib:jdwp=transport=dt_shmem,server=y,suspend=n"
This loads in-process debugging libraries and specifies the kind of connection to be made."