Skip to content

[GR-74843] Add IO workload benchmark and minor optimizations.#746

Merged
graalvmbot merged 7 commits intomasterfrom
io-workload-benchmark
Apr 17, 2026
Merged

[GR-74843] Add IO workload benchmark and minor optimizations.#746
graalvmbot merged 7 commits intomasterfrom
io-workload-benchmark

Conversation

@graalvmbot
Copy link
Copy Markdown
Collaborator

No description provided.

timfel added 7 commits April 15, 2026 16:50
Cuts copies in TextIOWrapper pending-byte flushes and avoids a buffer slice copy in BufferedWriter flush when writePos is 0.

On the jsonrpc-pipe microbenchmark (jvm-ee, mx benchmark micro:jsonrpc-pipe --tracker none -- --python-vm=graalpython --python-vm-config=default --), AVG (no warmup) went from 0.188 s before these changes to 0.089 s after them.
Adds a PosixSupportLibrary readInto primitive and uses it for BufferedReader fill-buffer refills when the raw object is cached PFileIO and the refill starts at offset 0.

On the jsonrpc-pipe microbenchmark with a heavier repeated-run protocol (graalpy harness.py micro/jsonrpc-pipe.py -i 12 5000 text text mask 64), the current baseline had median AVG (no warmup) 0.551 s and mean 0.537 s across 5 runs. This change measured median 0.476 s and mean 0.503 s across 5 runs.
The direct buffered readInto refill path caused correctness regressions in\nseek/readline-sensitive code paths. In particular, it broke traceback\nsource extraction and tokenize/linecache-based reads, which reproduced as\nfailing test_traceback assertions and zipimport source-location failures.\n\nRemove the optimization and delete the now-dead PosixSupport readInto\nplumbing until there is a version that preserves buffered IO invariants.
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 17, 2026
@graalvmbot graalvmbot closed this Apr 17, 2026
@graalvmbot graalvmbot merged commit ba89beb into master Apr 17, 2026
8 checks passed
@graalvmbot graalvmbot deleted the io-workload-benchmark branch April 17, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants