Skip to content

Conversation

@Ronitsabhaya75
Copy link
Contributor

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

Closes #950

Apple Container currently lacks detailed per-container filesystem performance metrics (IOPS, latency, fsync frequency, queue depth, storage backend type), making it difficult to diagnose I/O bottlenecks in database workloads, build systems, and ML pipelines.

The fix:

Add --io flag to container stats command that displays detailed filesystem performance metrics:

container stats --io mydb
CONTAINER   READ/s   WRITE/s   LAT(ms)   FSYNC(ms)   QD   DIRTY   BACKEND
mydb        280MB    195MB     4.8       1.4         1    2.1%    apfs

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

let estimatedReadOps = Double(totalReadBytes) / 4096.0
let estimatedWriteOps = Double(totalWriteBytes) / 4096.0

// TODO: Collect latency metrics from Containerization framework
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we want to accept this until we actually have the stats to report.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dcantah should i close the whole pr or should i fix the code particualr code ?

Copy link
Member

Choose a reason for hiding this comment

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

Well, fixing the code requires some Containerization changes to actually get these stats in some form. I think we'd want to think about what to actually expose, how expensive it is to grab them etc. I'd probably just make this PR a draft for now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, fixing the code requires some Containerization changes to actually get these stats in some form. I think we'd want to think about what to actually expose, how expensive it is to grab them etc. I'd probably just make this PR a draft for now

For sure I'll make this draft and look into containerization repo and see where can we fix this

@dcantah dcantah marked this pull request as draft December 16, 2025 21:21
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.

[Request]: Expose granular disk I/O statistics per container

3 participants