Skip to content

Add opt-in read-ahead control for LinuxContainer root filesystems - #1026

Draft
MarlonJD wants to merge 1 commit into
apple:mainfrom
MarlonJD:linuxcontainer-rootfs-read-ahead
Draft

MarlonJD wants to merge 1 commit into
apple:mainfrom
MarlonJD:linuxcontainer-rootfs-read-ahead

Conversation

@MarlonJD

Copy link
Copy Markdown

Summary

Expose LinuxContainer.Configuration.rootfsReadAheadKiB for block-backed roots. When set, the library applies the value to the guest root block device before mounting it. Zero disables read-ahead. Omitting the setting uses the kernel default.

In five paired runs with two ARM64 PostgreSQL 16.14 instances, 128 KiB reduced cold root-device reads from 118.35 to 73.74 MiB and reads when reusing the data volumes from 66.75 to 53.26 MiB. Median buffered sequential throughput fell from 7,094 to 5,894 MiB/s. Median time to database readiness was 1.17 s at the default and 1.23 s at 128 KiB.

Verification

  • make containerization, make check, and all 914 unit tests passed.
  • The rootfs read-ahead integration test and the writable-layer lower-read test passed in real VZ guests with Kata 6.18.56 and vminit 0.57.0.

See the API proposal in apple/container#1698.

Apply an explicit read-ahead setting to the guest root block device before mounting it. Check default and configured queues in a real VZ guest.

Refs apple/container#1698.

This branch has not been deployed

No deployments
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.

1 participant