Skip to content

JRuby with Java 8 4 to 10 times slower than Java 7 #1858

@ninkibah

Description

@ninkibah

We are attempting to migrate our Rails 3.2 app to Java 8. It runs fine with JRuby 1.7.9 under Java 6 and Java 7 (Java 7 is a bit faster). However, under Java 8, my tests took 42 minutes elapsed time instead of about 7 minutes. Nobody else seems to have seen this. My colleague has the same issue, and it also happens on a Centos machine we use for testing.

I don't believe it is a problem of memory, as we are giving JAVA 500MB more memory to play with than Java 7.

When we look at execution times of request handling, ActiveRecord (using jdbc-postgres) seems fast but rendering templates takes a very long time. So I suspect String building may be the cause of it.

Versions:
JRuby 1.7.9 or 1.7.13
Java 1.8.0_11 64-Bit Server build 25.11-b03.
Ubuntu 12.04 (Don't know the version of Centos on test machine)
JAVA_OPTS="-Xms512m -Xmx2096m -Djava.net.preferIPv4Stack=true"

Any tips on hunting down the performance problem would be appreciated.

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