oracle / oracle/dtrace

Bump up stdio cache sizes for major reads

Open
#117 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance
Dominant language
C
Stars
189
Forks
23
PR merge metrics
No merged PRs in 30d

Description

(Reported by Leah Neukirchen.)

We routinely read some very large things on almost every invocation (available_filter_functions, kallmodsyms, module.ranges etc). We are doing all this with the default stdio buffer size, which is 1K. We should at least be using PAGE_SIZE: using more than that is risky for /proc but for stuff read out of /lib/modules etc we should probably go all the way to 64K.

This is a bit fiddly since it means we need to manage the stdio buffer lifetimes ourselves, so it's worth trying on one big one in /proc first to see if it has any effect. But it might well be worthwhile in the upcoming performance push.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the stdio reads for available_filter_functions, kallmodsyms, and module.ranges, then inspect how their buffers are currently allocated and released. Experiment first with one large /proc read using PAGE_SIZE, and compare the resulting performance while ensuring the buffer lifetime remains valid; completion means the cache sizing improves the targeted read without unsafe /proc behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.