JDK 1.6.0_45 and G1 gc - garbage-collection

According to this page (http://www.oracle.com/technetwork/java/javase/tech/g1-intro-jsp-135488.html) the Garbage-First (G1) garbage collector is fully supported in Oracle JDK 7 update 4 and later releases. I was wondering if anybody knows what the status is for JDK 6? Is this fully supported in the most recent release (1.6.0_45) or it's still considered an experimental feature?

The Java Performance book says that G1 was first available in Java 6u20. I think you can safely use G1 with Java 6u40 in production environment.
Of course, there can be small performance/usage differences in G1 between Java6u40 and Java 7u4 but there is such difference almost between every release.

Related

Behavior of multiple instance of ParallelWebAppClassLoaders in Tomcat JVM retaining objects

I am working on identifying repeated OutOfMemory issues in a Tomcat 8.5.38 server (Centos 7.6, openjdk 1.8, 4 CPU) running a Spring MVC application.
This issue is new for this app. (Edit: The issue started after Tomcat was upgraded from 8.5.35 to 8.5.38). I saved a memory heap dump by adding the “-XX:+HeapDumpOnOutOfMemoryError” JVM setting. In the heap dump I see that there are 2 instances of ParallelWebAppClassLoader. This app uses a large HashMap (about 200 Mb) of lookup values as a cache. Each class loader has a separate reference to this HashMap. I am trying to find why there are 2 ParallelWebAppClassLoader instances in this JVM? The server.xml does not specify the use of ParallelWebAppClassLoader.
Also is it correct to expect the ParallelWebAppClassLoader to maintain a copy of the HashMap?
If it is 2 copies of the same object, how can this duplicate space be optimized, if ParallelWebAppClassLoader is used?
The issue was because of the upgrade of Tomcat from 8.5.35 to 8.5.35. After this upgrade the JVM has two class loaders, and thus occupies twice the memory. A quick fix can be by increasing the RAM or rolling back the Tomcat version to 8.5.35.
If there is a setting to control the number of class loaders, please post an answer. I will upvote that.

Aspose cells memory leak issue with version 17.2

My goal to copy the excel data to SQL table by processing each cell (Need to have exactly same as excel data in SQL table).
Currently we are using Aspose Cells version 8.2.0.0. During performance testing memory leaks are reported.
So we are thinking to use 17.2.0.0 version Aspose Cells as it also supports explicit Dispose API on WorkBook Object.
To analyze memory leak issue, I explicitly called GC.Collect() after the processing is done by using both version Dlls. Live object count and memory is more or less same in both versions even after GC.Collect(). Please see the memory analysis as in attached.
My questions are : Why still memory leak is there in new version of Aspose Cells as well?
Do we need to take any actions not to have leak in either of the versions?
Please guide me.
We have been improving and doing enhancements since many versions so we think, newest version should perform better.
We recommend you to perform the testing on most recent version which is at the moment 18.2.
Please note, here 18 means 2018 and 2 means February. Hence, the next official version will be 18.3 where 3 would mean March.
Note: I am working as Developer Evangelist at Aspose

Nashorn memory leak Much memory is consumed by jdk.nashorn.internal.scripts.JO4P0

We are using Nashorn to use javascript from java (JDK 1.8 U66),after some profiling we are seeing a larger data is getting occupied by jdk.nashorn.internal.scripts.JO4P0
Object. Would like to know if any one have any idea?
jdk.nashorn.internal.scripts.JO4PO and other similar instances are used to represent scripts objects from your scripts. But, you need to provide more info for further investigation. I suggest you please write to nashorn-dev openjdk alias with profiler output + more info. about your application (like to project, if open source, would be useful

What does the number following 'linux-2.6.38.' in the file names like linux-2.6.38.1.tar.xz and linux-2.6.38.2.tar.xz mean?

I wanted to download Linux kernel 2.6.38 source files from https://www.kernel.org/pub/linux/kernel/v2.6/
but the webpage listed linux-2.6.38.1.tar.xz, linux-2.6.38.2.tar.xz etc, as well as linux-2.6.38.tar.xz.
What's the relationship between them? Which file should I choose?
These number represents the kernel version/releases, and give us information about its stability. From here :
The first number denotes the kernel version. It is changed least
frequently, and only when truly major changes in the concept and the
code of the kernel occur. In fact, it has been changed only twice in
the history of the kernel: in 1994 with version 1.0 and in 1996 with
version 2.0.
The second number denotes the major revision of the kernel version. It
was formerly the case that even numbers indicated a stable release,
that is, one that was deemed fit for production use (i.e., use in a
non-experimental environment), such as 1.2, 2.4 or 2.6. Likewise, odd
numbers, such as 1.1 or 2.5, have historically represented development
releases. They were for testing new features and device drivers until
they became sufficiently stable to be included in a stable release.
However, this has changed starting with the Linux 2.6.x series, and
new feature development now takes place in the same revision number.
The third number indicates the minor revision of the kernel. It is
only changed when new features or new drivers are added.
The fourth number represents corrections, such as security patches and
bug (i.e., error) fixes.

Using rails-perftest with Rails 4.1 and Ruby 2.1

In Railscasts 411 Performance Testing http://railscasts.com/episodes/411-performance-testing Ryan has us patch the garbage collector in our version Ruby. He's using Ruby 1.9.3. Is this still required for Ruby 2.1.1, with its new garbage collector? if so, follow the same instructions? Without it, the memory perftest generates no data.

Resources