Repository navigation
Fleet memory benchmark: savings range 2.6x-3.9x, no single ratio fits every device #52
Akhrameev
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I put together a
simslim benchmarkcommand to measure stock vs. slim memory footprint across a smallfleet of simulators, since the README's "~4x" figure wasn't something I could reproduce or attribute to a
specific measurement. Opened it as #44; @Interlap01 decided
a benchmark subcommand doesn't belong in the CLI, which is a fair call, but suggested sharing the
measurements here instead. So here they are, plus the two things I got wrong before the numbers were
trustworthy.
Method
For each device: boot stock, wait for the footprint to settle, record it. Slim it, wait again, record
that. Repeat for N runs, average.
"Settle" turned out to be the whole problem. My first version sampled the moment
bootstatus -breportedbooted. That's fine for slim, which has little left to start, but stock still has ~180 daemons coming up in
the background at that instant, so sampling both states at the same "booted" instant systematically
understates stock more than slim. First real run gave ~2.5x fleet-wide. Once I added a settle-poll (wait
until the footprint stops moving before trusting the sample), the same fleet measured 2.76x-3.5x per
device.
@Interlap01 caught that my settle window was still too loose: on a fresh iPhone 17 Pro / iOS 27.0 sim they
measured 1.83 GB at boot, 2.92 GB at 60s, and still climbing ~40 MB/30s at the 4-minute mark, a slow enough
creep that my 60-second/2% threshold could mark it settled while it was still rising. I widened the window
to 120 seconds at a 1% threshold, added a 10-minute cap with a flag for any sample that hits the cap
without genuinely flattening, and built a regression test directly from their reported curve. Rerunning
the fleet with that fix:
That iOS 27.0 slim number (0.71 GB) lands close to @Interlap01's own reproducible 0.74 GB, which is a
reasonable sign the settle logic itself is solid on both ends.
One thing I haven't fully resolved
My iOS 27.0 stock reading (2.04 GB) is noticeably lower than the ~3.3 GB @Interlap01 measured on a fresh
sim. Before trusting it, I checked whether it was an artifact of that specific device having been slimmed
and un-slimmed ~15 times across this benchmark's iterations, far more than any of the other fleet devices.
simslim statusshowed 0/170 labels currently disabled, so nothing was actively overridden, but agenuinely fresh, never-touched device of the same model/iOS version settled at ~3.0 GB / 315 processes
against the cycled device's ~2.0-2.14 GB / 231-235 processes, an ~80-process gap.
A process-level diff made this less clean-cut than "repeated cycling permanently breaks restoration":
of the roughly 0.33 GB attributable to processes present on only one device, 44 existed only on the fresh
one and 22 only on the cycled one, not one-directional, and mostly on-demand widget/intent extensions. That
looks more like normal per-boot nondeterminism than a systematic bug, but I didn't get to run enough
fresh-device trials to be confident either way.
Update: re-ran the same iOS 27.0 device plus the other three fleet devices, one run each. Same device
landed at 1.99 GB stock / 0.67 GB slim this time, close to the earlier 2.04 GB / 0.71 GB, and it reproduced
the same kind of transient spike-and-drop mid-run, a second independent case of that noise shape, more
evidence for per-boot variance than a real bug. The other three devices (iOS 18.6, 26.2, 26.4) settled at
2.79x-3.86x, similar shape overall; the iOS 26.4 device hit the 10-minute settle cap still climbing, flagged
automatically, so treat that one as a lower bound.
Charts of the raw settle curves:
and
Full back-and-forth with the measurement fixes and test cases is in #44 if useful.
All reactions