Skip to content

Repeated disk reads during retransformation contributing to iowait spikes #13280

@alexandergunnarson

Description

@alexandergunnarson

Describe the bug

I've been trying to figure out why our OTEL-instrumented JVMs keep experiencing massively high iowait, and I suspect the OTEL Java agent is a primary cause.

Below is partial output from running sudo /usr/share/bcc/tools/filetop on an EC2 instance of mine:

Image

There are other class files this happens to, but Throwable.class is the most common. I'd expect

Steps to reproduce

Start a JVM with the OTEL Java agent, with probably any real-world .jar. Observe via sudo /usr/share/bcc/tools/filetop that there are repeated reads from class files.

Expected behavior

I would expect that the class bytes are fully cached in memory upon first read. I suppose using Caffeine or similar with configurable eviction strategy is fine, but really I'd like zero unnecessary disk reads.

Actual behavior

There are repeated reads from class files, contributing to massive iowait spikes.

Javaagent or library instrumentation version

v2.9.0

Environment

JDK: 24ea (perhaps the EA is part of the problem?)
OS: Amazon Linux, within Docker

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds author feedbackWaiting for additional feedback from the authorneeds triageNew issue that requires triagestale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions