Skip to content

docs: add lesson on emulator Quick Boot SSD thrash and the fix - #36

Merged
timbortnik merged 1 commit into
mainfrom
docs/emulator-ssd-writes
Jun 29, 2026
Merged

docs: add lesson on emulator Quick Boot SSD thrash and the fix#36
timbortnik merged 1 commit into
mainfrom
docs/emulator-ssd-writes

Conversation

@timbortnik

@timbortnik timbortnik commented Jun 28, 2026

Copy link
Copy Markdown
Owner

The Android emulator's default Quick Boot memory-maps guest RAM to ram.img, so the kernel continuously flushes dirty RAM pages to the SSD (~1.4 GB/s observed), independent of guest disk I/O. Documents the root cause, why it's not an app/ext4 bug, how to diagnose it (host vs guest /proc/diskstats; per-process tools undercount mmap writeback), and the fix: QuickbootFileBacked = off in ~/.android/advancedFeatures.ini.

Summary by CodeRabbit

  • Documentation
    • Added a new lesson warning that Android Emulator Quick Boot can generate heavy host disk writes and quickly wear SSDs.
    • Clarified that the issue comes from host-side emulator snapshot writeback, not from the app or filesystem.
    • Added a verified workaround to disable file-backed Quick Boot on development machines.
    • Included guidance for spotting the issue and avoiding confusion between host and guest disk activity.

The Android emulator's default Quick Boot memory-maps guest RAM to ram.img, so
the kernel continuously flushes dirty RAM pages to the SSD (~1.4 GB/s observed),
independent of guest disk I/O. Documents the root cause, why it's not an app/ext4
bug, how to diagnose it (host vs guest /proc/diskstats; per-process tools
undercount mmap writeback), and the fix: QuickbootFileBacked = off in
~/.android/advancedFeatures.ini.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f48a2ccd-c493-472b-97a6-1f87d8b788e7

📥 Commits

Reviewing files that changed from the base of the PR and between 0a88ac1 and 5cd9663.

📒 Files selected for processing (1)
  • docs/LESSONS_LEARNED.md

📝 Walkthrough

Walkthrough

A new lesson is added to docs/LESSONS_LEARNED.md documenting that the Android emulator's Quick Boot (file-backed RAM) feature can cause sustained high SSD write activity on the host due to RAM-snapshot writeback, with a mitigation via QuickbootFileBacked = off in ~/.android/advancedFeatures.ini.

Changes

Emulator Quick Boot SSD Wear Lesson

Layer / File(s) Summary
New lesson: Emulator Quick Boot SSD wear
docs/LESSONS_LEARNED.md
Documents the root cause (mmap guest RAM with shared file-backed writeback to ram.img), mitigation (QuickbootFileBacked = off), and host vs. guest diskstats/vmstat guidance to correctly identify the write source.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the change: a docs update about Android emulator Quick Boot causing SSD writes and the mitigation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/emulator-ssd-writes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@timbortnik
timbortnik merged commit 4db6dc1 into main Jun 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant