Skip to content

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

@Montana

Description

@Montana

Feature or enhancement request details

Hey all,

Currently, Apple Container does not expose detailed per-container filesystem performance statistics such as IOPS, latency, throughput, fsync frequency, dirty-page writeback, queue depth, or even which host storage backend is being used (APFS, native, ext4, virtio, etc.). The absence of this information makes it difficult to diagnose performance regressions or tune storage behavior for database workloads, build systems, or ML ingestion pipelines.

A useful feature would be a container stats --io mode—similar in spirit to docker stats, that reports per-container read and write operations per second, read and write throughput, average latency and fsync latency, as well as dirty-page and queue-depth metrics. This would allow container users to understand and debug the underlying I/O characteristics of their workloads without resorting to external instrumentation or guesswork.

Example UI:

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

The benefits of this feature include helping diagnose fsync bottlenecks, providing valuable insight for database workloads such as Postgres, Mongo, and MySQL, supporting performance analysis in Docker CI build environments, enabling users to distinguish true disk behavior from virtualization overhead, and generally making it easier to identify, monitor, and track filesystem performance regressions over time.

Optionally you could expose Prometheus metrics:

container_io_read_bytes_total
container_io_write_bytes_total
container_io_latency_seconds

Michael

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions