Skip to content

[Request]: Improve filesystem performance #882

Closed

Description

@vsarunas

Feature or enhancement request details

While trying to find a way to reproduce #614 noticed that filesystem performance is ~3 times slower compared to a Qemu VM.

For example create a large container:

container run --cpus 8 --memory 16G -ti ubuntu:latest /bin/bash

Can run a simple test:

apt-get update; apt-get install -y curl fio
curl -sL https://yabs.sh -i | bash -s -- -i -n -g

M1 Max:

io Disk Speed Tests (Mixed R/W 50/50) (Partition /dev/vdb):
---------------------------------
Block Size | 4k            (IOPS) | 64k           (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 112.95 MB/s  (28.2k) | 328.21 MB/s   (5.1k)
Write      | 112.88 MB/s  (28.2k) | 337.97 MB/s   (5.2k)
Total      | 225.84 MB/s  (56.4k) | 666.18 MB/s  (10.4k)
           |                      |
Block Size | 512k          (IOPS) | 1m            (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 256.00 MB/s    (500) | 432.09 MB/s    (421)
Write      | 277.89 MB/s    (542) | 482.09 MB/s    (470)
Total      | 533.89 MB/s   (1.0k) | 914.18 MB/s    (891)

YABS completed in 14 sec

Multipass VM with Ubuntu with ext4:

fio Disk Speed Tests (Mixed R/W 50/50) (Partition /dev/sda1):
---------------------------------
Block Size | 4k            (IOPS) | 64k           (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 134.06 MB/s  (33.5k) | 1.75 GB/s    (27.3k)
Write      | 133.97 MB/s  (33.4k) | 1.80 GB/s    (28.1k)
Total      | 268.04 MB/s  (67.0k) | 3.55 GB/s    (55.5k)
           |                      |
Block Size | 512k          (IOPS) | 1m            (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 4.74 GB/s     (9.2k) | 6.52 GB/s     (6.3k)
Write      | 5.14 GB/s    (10.0k) | 7.27 GB/s     (7.1k)
Total      | 9.89 GB/s    (19.3k) | 13.79 GB/s   (13.4k)

Docker:

fio Disk Speed Tests (Mixed R/W 50/50) (Partition overlay):
---------------------------------
Block Size | 4k            (IOPS) | 64k           (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 416.23 MB/s (104.0k) | 5.32 GB/s    (83.2k)
Write      | 415.96 MB/s (103.9k) | 5.48 GB/s    (85.6k)
Total      | 832.20 MB/s (208.0k) | 10.81 GB/s  (168.9k)
           |                      |
Block Size | 512k          (IOPS) | 1m            (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 11.97 GB/s   (23.3k) | 14.16 GB/s   (13.8k)
Write      | 12.99 GB/s   (25.3k) | 15.79 GB/s   (15.4k)
Total      | 24.96 GB/s   (48.7k) | 29.95 GB/s   (29.2k)

The test are shorter; but representative; longer duration for example with container it can run with close 1000MiB/s, and occasional drops to 300MiBs. Native block performance is ~3000MB/s.

Long duration test can be launched via:

fio --name=rand_rw_512k --ioengine=libaio --rw=randrw --rwmixread=50 --bs=512k --iodepth=64 --numjobs=2 --size=10G --runtime=3600 --time_based --gtod_reduce=1 --direct=1 --filename=./test.fio --group_reporting

Instruments only has shown pwritev calls for the most part from an IO thread:

Image

Code of Conduct

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

Activity

  1. added theissue type on Nov 17, 2025
  2. jglogan commented on Nov 17, 2025

    @jglogan
    Contributor

    @vsarunas Did you do just this on a fresh copy of main? As in the past hour?

  3. self-assigned this
    on Nov 17, 2025
  4. vsarunas commented on Nov 17, 2025

    @vsarunas
    Author

    Forgot to mention that this is on 0.6.0 release:

    container CLI version 0.6.0 (build: release, commit: unspeci)
    

    With main the performance drops to a constant 500MiB/s:

    fio --name=rand_rw_512k --ioengine=libaio --rw=randrw --rwmixread=50 --bs=512k --iodepth=64 --numjobs=2 --size=10G --runtime=3600 --time_based --gtod_reduce=1 --direct=1 --filename=./test.fio --group_reporting
    
  5. jglogan commented on Dec 11, 2025

    @jglogan
    Contributor

    See also the observations by @Montana in #948.

  6. vsarunas commented on Jan 13, 2026

    @vsarunas
    Author

    Hi @jglogan , @JaewonHur !

    After #1041 , speed has improved and is inline with Docker Desktop (which creates a VM using Virtualization.framework):

    fio Disk Speed Tests (Mixed R/W 50/50) (Partition /dev/vdb):
    ---------------------------------
    Block Size | 4k            (IOPS) | 64k           (IOPS)
      ------   | ---            ----  | ----           ---- 
    Read       | 467.01 MB/s (116.7k) | 4.92 GB/s    (76.8k)
    Write      | 466.71 MB/s (116.6k) | 5.06 GB/s    (79.1k)
    Total      | 933.72 MB/s (233.4k) | 9.98 GB/s   (156.0k)
               |                      |                     
    Block Size | 512k          (IOPS) | 1m            (IOPS)
      ------   | ---            ----  | ----           ---- 
    Read       | 11.42 GB/s   (22.3k) | 11.80 GB/s   (11.5k)
    Write      | 12.40 GB/s   (24.2k) | 13.16 GB/s   (12.8k)
    Total      | 23.83 GB/s   (46.5k) | 24.96 GB/s   (24.3k)
    
  7. jglogan commented on Jan 13, 2026

    @jglogan
    Contributor

    @vsarunas Thanks for the update! I'll mark it as ready to close and will close it in a week unless something comes up. Feel free to close on your own if everything looks fine to you now.

    Appreciate all the help you've provided on this and the ext4 corruption issue.

  8. vsarunas commented on Jan 14, 2026

    @vsarunas
    Author

    I'll create a new issue if I see performance issues; once there is a new release I'll switch our aarch64 CI to run under container.

    But it appears I don't have the permission to close the issue :/

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions