Skip to content

Even JRuby 9.2.8.0/ 9.2.11.1 terribly slow #5857

@rovf

Description

@rovf

Environment

Provide at least:
JRuby 9.2.8.0, Java 1.8, Windows 10

When stepping up from JRuby 1.7.27 to 9.2.8, I hoped to see some performance increasements, but on contrary, 9.2.8 turned out to be slower than 1.7.27:

One CPU-bound application, which runs constantly in about 31 minutes under 1.7, takes 36 minutes with 9.2. I am aware that I have to take into account a longer warm-up time with JRuby 9.x, but I don't think that this will have a noticeable influence, if the total running time is more than half an hour.

In a different application, which is using the caller method frequently in its logging package, I had expected JRuby 9.2 to be much faster, because it is said that this has improved the speed of this method. What I see instead, is:

  • Running in JRuby 1.7.27 WITHOUT using caller(): 90 Seconds
  • Running in JRuby 1.7.27 WITH using caller in many places, but otherwise processing the same data: 29 minutes (this shows that caller is really a bottleneck)
  • Running in JRuby 9.2.8 WITHOUT caller: 2 minutes
  • Running in JRuby 9.2.8 WITH logging (i.e. caller): 31 minutes

I also considered the heap size (-J-Xmx4g), but monitoring the applications shows that both actually use less than 70% of the heap.

I also tried to enable frozen string literals (because we have many string literals) and "invoke dynamic", but both did not have any noticeable effect.

Any idea why the new JRuby is so much slower than the old one?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions