Skip to content

Capture data for huge page bloat monitoring#204

Open
aneeshdurg wants to merge 25 commits intomainfrom
aneesh/sosp2
Open

Capture data for huge page bloat monitoring#204
aneeshdurg wants to merge 25 commits intomainfrom
aneesh/sosp2

Conversation

@aneeshdurg
Copy link
Copy Markdown
Contributor

This PR adds the necessary infrastructure to monitor the memory subsystem to determine if bloat is occurring when using huge pages.

@aneeshdurg aneeshdurg requested a review from a team as a code owner March 31, 2026 17:53
@aneeshdurg
Copy link
Copy Markdown
Contributor Author

@arthurp this PR also requires nc to be installed in the docker container. So far I've been working around that by running:

apt update && apt install netcat-openbsd

on container startup. I could add this to the setup script for benchmarking, but how can I just add nc to the container image itself?

@arthurp
Copy link
Copy Markdown
Contributor

arthurp commented Mar 31, 2026

how can I just add nc to the container image itself?

Let's just add it to the container. You can add it to the Dockerfile. We need to update the image version and the images we use for the builds anyway, so as soon as you add it, I can update the image in dockerhub and the version used by the build.

Copy link
Copy Markdown
Contributor

@arthurp arthurp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all written against the old data capture framework. The update in #206 changes things. I think the best approach is to remove the BinarySerde derives and the actual capture code (replacing it with TODOs so it's easy to find and fix), leaving the new OQueues. Then, you or I can add the actual data capture back in after merging #206. In fact, with the socket code removed and the data capture removed, this PR might end up effectively empty. In that case, we can just redo the capture after #206 lands.

Comment thread kernel/src/syscall/mod.rs
Comment on lines +406 to +410
static SOCKET_OQUEUE: Once<Arc<MPMCOQueue<SocketOQueueMessage>>> = Once::new();

pub fn get_socket_oqueue() -> Arc<MPMCOQueue<SocketOQueueMessage>> {
SOCKET_OQUEUE.wait().clone()
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be pretty straightforward to pull the socket OQueues into a separate PR. Doing so is worth it I think.

Comment thread kernel/src/lib.rs
Comment on lines +272 to +276
println!("huge_mapping_enabled={}", huge_mapping_enabled);
println!(
"huge_mapping_preserve_on_dontneed={}",
huge_mapping_preserve_on_dontneed
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these are debug prints. But I could be convinced otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants