Using rails-perftest with Rails 4.1 and Ruby 2.1 - performance-testing

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.

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.

How to reduce the capacity of RedHawk Python library

There are many RedHawk Python 2.7 libraries, and the capacity including Linux is getting bigger. Can RedHawk remove unnecessary Python 2.7 library module to reduce the capacity? Please let me know if there is a module available for deletion. Or, I am currently creating an image by compressing the whole system with gzip, but is there a more efficient compression method?
What is it you are trying to accomplish? If file size is that important it sounds like you are working on an embedded platform with limited disk space. Check out the features and work here on openembedded-hawk. It's been a while since I've updated it but you can have the entire REDHAWK framework built, with or without python, a REDHAWK Application, and the entire linux based OS all under 100 MiB. (Slightly more if you include python)

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

Why does a Node.js heapdump shows compiled code?

Hi first time at investigating memory leak in a Node.js application. By reading thru a heapdump snapshot in Chrome Profiler, I see that there is an entry for (compiled code), see attached. I thought Javascript is not compiled, unlike Java. Can anyone shed some lights?
Further, unlike JProfiler and with the way the code was written (without a formal constructor), it is very hard to find the leak, and so far the info the snapshot provides is not quite useful, I have searched for sometime and so far not too much useful info on reading these snapshots, any suggestions?
Thanks!
(compiled code) indeed refers to the code generated by V8's JIT compiler. All JavaScript VMs employed by browsers today are using tiered adaptive JIT compilation - it wouldn't be possible to achieve good performance otherwise. In fact V8 never had an interpreter at all.
That refers to host objects that are implemented in C++, such as the DOM, or the JS built-in functions.

JDK 1.6.0_45 and G1 gc

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.

Resources