Skip to content

Slim simulators use ~4x memory on a macOS 27.2.1 / Xcode 27.2 host (per-process dirty __DATA_CONST, cryptexd-mounted runtime) #73

Open

Description

@aliosmanozturk1

Summary

On the iOS 27.2 runtime, a fully slim iPhone 17 measures about 2.3 GB with simslim measure, against the 0.85 to 1.1 GB fully slim baseline that docs/category-memory.md records for iOS 26.5. The profile itself applies cleanly (verify passes, 173/173 labels disabled), so this looks like iOS 27 bringing new or heavier services that the profile does not cover yet, rather than a slimming failure. Sharing the numbers in case they help with an iOS 27 pass over the categories.

I have not measured iOS 26.5 on the same machine, so part of the gap could be the host or the device type.

Environment

  • simslim 0.14.0 (Homebrew)
  • macOS 27.2.1, Xcode 27.2 (27B52)
  • Runtime: iOS 27.2 (24B8117)
  • Device: freshly created iPhone 17, simslim on <udid> before its first boot, default full profile
  • Host: Mac mini M5 Pro, 24 GB

Measurements

Same simulator, idle, no app installed:

simslim measure Processes Host RAM delta (vm_stat active+wired+compressed)
Stock, first boot 14.4 GB 314
Fully slim, first boot +20 s 2.64 GB 84 1.86 GB
Fully slim, second boot +20 s 2.32 GB 74 1.67 GB
Fully slim, second boot +80 s 2.32 GB 74 1.56 GB

simslim verify and status after slimming:

173/173 managed launchd labels disabled (slim)
matches the profile: all expected disable overrides are applied.

So the slim profile still cuts memory roughly 6x on iOS 27.2; only the floor is higher than documented.

Largest processes in a fully slim boot (phys_footprint)

Process MB
SpringBoard 160
Spotlight 120
sharingd 102
assistantd 81
WidgetRenderer_Default 80
routined 69
InputUI 69
AccessibilityUIServer 68
NPKCompanionAgent 65
nanotimekitcompaniond 63
usernotificationsd 60
profiled 59

I know several of these are intentional (sharingd always-on, assistantd kept for the Spotlight leak, routined / nanotimekitcompaniond / profiled in the forbidden list, SpringBoard and Spotlight not launchd labels). The ones I could not place are NPKCompanionAgent and WidgetRenderer_Default (launched as UIKitApplication:com.apple.chrono.WidgetRenderer-Default even though the four widgets labels are disabled).

Processes present only on the first boot, gone after a reboot: CMFSyncAgent, IntelligencePlatformComputeService, MTLCompilerService (x2), cksharingmanagementd, com.apple.MobileInstallationHelperService, installd, logd_helper, nanomapscd, nanotimekitcompaniond.

Questions

  1. Is a higher fully slim floor expected on iOS 27, or has iOS 27 not been profiled yet?
  2. Would NPKCompanionAgent or the chrono WidgetRenderer be safe to manage, or are they in the same "breaks boot" class?

Happy to run more measurements on iOS 27.2 if useful.

Activity

  1. aliosmanozturk1 commented on Nov 16, 2026

    @aliosmanozturk1
    Author

    Update: the iOS 27.2 runtime is not the cause. It follows the host.

    I ran the same test (iPhone 17, full slim profile, no app, measured 60 s after boot) on two Macs at the same time:

    Host macOS Xcode / CoreSimulator Runtime simslim measure (sum)
    MacBook Air M5 27.0 27.1 / 1174.9.2 iOS 27.0 (24A434) 620 MB
    Mac mini M5 Pro 27.2.1 27.2 / 1174.21 iOS 27.0 (24A434) 2759 MB
    Mac mini M5 Pro 27.2.1 27.2 / 1174.21 iOS 27.2 (24B8117) 2697 MB

    Same runtime, same ~84 processes, 4x the memory. Every process is about 45 to 90 MB larger on the mini (SpringBoard 49 vs 170 MB, sharingd 12 vs 103, assistantd 15 vs 84). A macOS process like /bin/sleep measures the same on both, so it is not a footprint accounting change.

    footprint on the simulator's sharingd shows where the extra goes:

    Category (dirty) Air Mini
    __DATA_CONST 848 KB 88 MB
    everything else ~12 MB ~13 MB

    So on the mini each process ends up with its own dirty copy of the dyld shared cache's __DATA_CONST instead of sharing it.

    The visible difference between the two hosts is where the runtime is mounted. In the simulator's launchd environment:

    • Air: DYLD_SHARED_CACHE_DIR=/Library/Developer/CoreSimulator/Volumes/iOS_24A434/...
    • Mini: DYLD_SHARED_CACHE_DIR=/private/var/run/com.apple.security.cryptexd/mnt/com.apple.iPhoneOS.SimulatorRuntime-v24.1.434.0.<id>/...

    My guess is that runtimes mounted through cryptexd on the newer macOS / CoreSimulator do not get their shared cache into the shared region, so __DATA_CONST is fixed up per process. I could not tell whether macOS 27.2 or Xcode 27.2 (CoreSimulator 1174.21) brings the cryptexd mount.

    Both hosts have the same SIP configuration (Debugging Restrictions disabled, research guests allowed), so that is not the difference.

    This is outside what slimming controls, but it makes every daemon that stays up about 50 MB more expensive on these hosts, so it eats most of the savings. Do you know a way to get the old mount behaviour back, or a setting that keeps the simulator shared cache in the shared region? Happy to test anything on the 27.2 host.

  2. changed the title [-]iOS 27.2: fully slim iPhone 17 measures ~2.3 GB (vs ~1 GB documented for iOS 26.5)[/-] [+]Slim simulators use ~4x memory on a macOS 27.2.1 / Xcode 27.2 host (per-process dirty __DATA_CONST, cryptexd-mounted runtime)[/+] on Nov 16, 2026
  3. Interlap01 commented on Nov 16, 2026

    @Interlap01
    Contributor

    Please check this issue: #46. It looks like the same problem you’re having.

  4. aliosmanozturk1 commented on Nov 16, 2026

    @aliosmanozturk1
    Author

    Thanks, I checked #46. The symptom matches (every process ~50 to 90 MB heavier), but the cause looks different here.

    xcrun simctl runtime dyld_shared_cache update --all on the 27.2 host finishes instantly and the log says:

    update_dyld_sim_shared_cache: warning: This tool is obsolete. Simulator runtimes now have a prebuilt dyld cache
    

    The prebuilt cache is present inside the runtime on both hosts:

    • Mini (macOS 27.2.1): /private/var/run/com.apple.security.cryptexd/mnt/com.apple.iPhoneOS.SimulatorRuntime-v24.2.8117.0.<id>/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 27.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/Caches/com.apple.dyld/dyld_sim_shared_cache_arm64
    • Air (macOS 27.0): /Library/Developer/CoreSimulator/Volumes/iOS_24A434/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 27.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Caches/com.apple.dyld/dyld_sim_shared_cache_arm64

    And the extra memory sits in a different category than in #46:

    #46 this host
    shared cache missing present (prebuilt)
    where the extra dirty memory is mapped file (loose dylibs) __DATA_CONST (88 MB in sharingd vs 848 KB on the Air)
    dyld_shared_cache update fixed it no-op, "obsolete"

    So the cache is found and used, but its __DATA_CONST ends up private and dirty in every process instead of shared. The only difference I can see between the hosts is the cryptexd mount of the runtime on the newer host.

  5. Interlap01 commented on Nov 16, 2026

    @Interlap01
    Contributor

    I am not sure this is the cryptexd mount. I just checked on my 27.0 env, where iOS 27.0 is cryptexd-mounted too, and the cache is used correctly (sharingd __DATA_CONST 848 KB, fully slim 744 MB). I am installing a 27.2 env now to check it.

  6. Elyter commented on Nov 23, 2026

    @Elyter

    Adding to your 27.0 check, this one also rules out Xcode/CoreSimulator 27.2: same Xcode, CoreSimulator, runtime and cryptexd mount as the 27.2.1 mini, but on macOS 27.0.1, and memory is normal.

    Host macOS Xcode / CoreSimulator Runtime simslim measure (slim)
    MacBook Air M1, 8 GB 27.0.1 27.2 / 1174.21 iOS 27.2 (24B8117) 342 MB (54 processes)

    iPhone 17, default full profile (simslim on, v0.15.0), no app, measured 60 s after the slim boot. Stock on the same device was 1.08 GB / 157 processes.

    The runtime is cryptexd-mounted here too:

    DYLD_SHARED_CACHE_DIR=/private/var/run/com.apple.security.cryptexd/mnt/com.apple.iPhoneOS.SimulatorRuntime-v24.2.8117.0.leWJuF/...
    

    but __DATA_CONST stays shared: footprint on sharingd shows 884 KB dirty __DATA_CONST, 13 MB total. SpringBoard 30 MB, sharingd 13 MB, assistantd 2 MB.

    So the cryptexd mount and CoreSimulator 1174.21 alone don't trigger it. It looks like the macOS 27.2.x host is what changes. One caveat: this is an M1, not an M5, so I can't fully rule out a hardware difference. Happy to run anything else on this host.

  7. kdbhalala commented on Nov 27, 2026

    @kdbhalala
    Contributor

    Another data point: same symptom on macOS 27.2.1 with a newer Xcode, runtime and CoreSimulator, and with SIP fully enabled.

    Host macOS Xcode / CoreSimulator Runtime simslim measure (slim)
    Mac16,12 (MacBook Air M4), 16 GB 27.2.1 (26B131) 27.3 (27C5035i) / 1215.2 iOS 27.3 (24C5049d) 2.56 GB (77 processes)

    iPhone 18 Pro, default full profile (simslim on, v0.15.0, 173/173 labels disabled), no app installed.

    footprint per process (dirty):

    Process __DATA_CONST phys_footprint
    SpringBoard 117 MB 192 MB
    sharingd 89 MB 104 MB
    assistantd 70 MB 90 MB
    backboardd 19 MB 39 MB

    The runtime is cryptexd-mounted:

    /private/var/run/com.apple.security.cryptexd/mnt/com.apple.iPhoneOS.SimulatorRuntime-v24.3.5049.4.VCEigT/...
    

    What this adds:

    • Xcode 27.3 / CoreSimulator 1215.2 and the iOS 27.3 runtime do not fix it.
    • SIP is fully enabled here (csrutil status: enabled), so the SIP settings in the first report are not the trigger.
    • This supports the macOS 27.2.x host as the cause.

    Happy to run more tests on this host.

  8. kdbhalala commented on Nov 27, 2026

    @kdbhalala
    Contributor

    Opened #78: simslim measure now detects this. It reads the dirty __DATA_CONST of the simulator's sharingd and, above 16 MB, prints a warning linking this issue. --json gets "sharedCacheUnshared": true. Detection only; it does not lower memory.

    One more data point from the same host: vmmap -summary on the simulator's sharingd shows __DATA_CONST as resident 4.4M, dirty 429K, swapped/compressed 88.2M. The pages are mapped SM=COW from the runtime's dylibs, written once, then compressed. So phys_footprint counts them at full size, and the real RAM cost is lower than measure shows, but still private per process.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions