Workload numbers on Apple silicon (Kiri 0.2.1 vs OrbStack), and the three "target" rows

Open
#362 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Read bench/suite.sh, bench/api.sh, and bench/report.sh alongside the existing Ubuntu and Windows write-ups. The report names the Apple silicon measurements and reproduction details, but the issue leaves the output format open: it asks whether to submit a PR with scripts and a write-up or only update results.json. Confirm the preferred scope before making changes.

Written by the indexing model from the issue text.

Description

What you're trying to do

results.json for "Apple Silicon Mac, macOS 27.0.1" still has three Kiri rows
marked target (run -d 6 ms, start pre-created 4 ms, resume paused 1 ms), and
the bench/ write-ups are Ubuntu and Windows. I timed lifecycle steps and a few
real workloads on a Mac, Kiri 0.2.1 against OrbStack 2.2.5, in the same style
as bench/suite.sh (hyperfine, 30 runs for latencies, 7 for workloads, two
passes in opposite engine order, the same image bits on both engines).

Machine: Mac mini, Apple M4 Pro (14 cores), 48 GB, macOS 27.0.1, load average
4 to 5 from other software. Kiri at its VM defaults (2 vCPU, 8 GB); OrbStack
with 14 vCPU and 16 GB, carrying 16 other running containers throughout.

What you'd like Kiri to do

Medians in ms, pass 1 / pass 2:

Measure Kiri OrbStack
run --rm alpine true 47 / 48 257 / 311
run -d 23 / 24 126 / 159
start (created) 20 / 20 80 / 131
unpause 17 / 15 24 / 27
exec … true 18 / 18 36 / 36
MariaDB 11.8, empty to ready 3805 / 3489 5457 / 4921
build --no-cache, 3 small layers 335 / 264 1311 / 1557
build --no-cache, one CPU-bound step 2542 / 2319 2823 / 2754
Compose Postgres + Redis + app, up --wait from empty 1117 / 1115 3866 / 3639
Compose MariaDB + nginx, up --wait from empty 4075 / 3588 5989 / 5479

Over the API with curl (each includes one curl process; _ping was
4.9 / 6.5 ms on Kiri): create + start 21.2 / 25.1, start 10.1 / 11.0,
unpause 5.2 / 7.1. So the start and unpause targets look about met at the
engine (roughly 4 to 5 ms and under 1 ms after the curl floor), and
create + start is around 10 ms after two curl processes and a shell. An
engine-only figure needs a measurement without curl.

Kiri's median is lower in every row in both passes. The gap is smallest where
the program does the work: MariaDB init (about 1.4 times) and a single-process
compile step (about 1.1 times). Ranges, the scripts and the reproduce steps
are in the write-up.

Two side notes:

  • hyperfine 2.0 moved the statistics in its JSON to
    .results[0].summary.time_wall_clock; bench/suite.sh, bench/api.sh and
    bench/report.sh read .results[0].median, which 2.0 no longer writes.
    My scripts read both layouts. Happy to send the same small change for the
    existing three.
  • OrbStack's numbers are under load (16 other containers), so they are not its
    best case.

Would you like this as a PR (the two scripts and the write-up), or just the
numbers for results.json?

Would you like to build it?

Yes, once we've agreed on the approach

Dominant language
Rust
Stars
7.5k
Forks
329
Avg merge
7h 48m
Merged PRs (30d)
105

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libracoder/kiri

All issues in libracoder/kiri

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.