Repository navigation
Conversation
…d AT-SPI Measured on 1 GB iPhone 6 (948 MiB MemTotal): - THP madvise + defer+madvise caused 98,743 direct compaction stalls (87% failure rate); set THP enabled and defrag to never. - /tmp defaulted to 50% of RAM, letting stale temp files push zram past 200 MiB of physical RAM; cap tmp.mount to 15% of RAM. - pacman-key left a 6 MiB gpg-agent daemon running permanently after first-boot keyring setup; stop it via ExecStartPost. - Export NO_AT_BRIDGE=1 (suppresses 19 MiB at-spi accessibility stack) and MALLOC_ARENA_MAX=2 MALLOC_TRIM_THRESHOLD_=65536 (curbs 2 MiB glibc arena fragmentation across threaded daemons) in the login session and user manager. Assisted-by: LLM
Assisted-by: LLM
tcballard
force-pushed
the
perf-memory-hygiene
branch
from
December 2, 2026 06:14
9fcc77a to
bcd2b50
Compare
Contributor
|
Thanks @tcballard. We've written down a bar for performance and memory changes (CONTRIBUTING, #245): fix the cause rather than switching things off, device measurements, every trade-off named, one change per PR. Measured against it, please split this one:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Low-RAM memory hygiene measured on a 1 GB iPhone 6 (
948 MiBMemTotal), safe across 1–4 GB boards:never/never): Even withmadvise+defer+madvise,MADV_HUGEPAGErequests from browsers and Qt triggered98,743direct compaction stalls (87%failure rate) on a 1 GB device./tmptmp.mounttosize=15%: Prevents temporary files from consuming up to 50% of RAM (306 MiBof stale/tmpfiles pushed zram to206 MiBphysical RAM on 1 GB). On 4 GB iPads this still allows~600 MiB.gpg-agentafteromarchy-pacman-init.service:pacman-keyleft a6 MiBgpg-agent --homedir /etc/pacman.d/gnupgrunning permanently after first-boot keyring setup; stop it viaExecStartPost.NO_AT_BRIDGE=1andMALLOC_ARENA_MAX=2 MALLOC_TRIM_THRESHOLD_=65536inlogin-session(andsystemd --user): suppresses the~19 MiBAT-SPI accessibility bus and curbs multi-arena2 MiBglibc heap chunk retention across threaded daemons (qs,labwc, portals,wireplumber).Testing
tests/test_memory_hygiene.py(4/4pass);test_gpu_video_session.py(11/11) andtest_package_staging.py(7/7) pass.