Skip to content

[flow] Run the test suite on the Linux arm64 binary - #9521

Closed
panagosg7 wants to merge 2 commits into
mainfrom
export-D128499061
Closed

panagosg7 wants to merge 2 commits into
mainfrom
export-D128499061

Conversation

@panagosg7

Copy link
Copy Markdown
Contributor

Summary:
The Linux arm64 release binary is built in CI but never run, while the x86-64, macOS and Windows binaries all run the test suite. Add a runtests_linux_arm64 job, mirroring runtests_linux, on the arm64 runner that builds it.

Changelog: [internal]

Differential Revision: D128499061

Summary:

Release binaries are built with Cargo, which uses the system allocator: glibc malloc on Linux. glibc keeps most of the memory a recheck frees instead of returning it to the OS, so a long-running server's resident memory ratchets up with every large recheck. On a large codebase it settled at about twice what the same code uses with jemalloc, and `malloc_trim(0)` gave the difference back, so the growth is retained free memory, not live data.

Install jemalloc as the global allocator in Cargo builds on Linux, with background threads so that memory freed by a recheck goes back to the OS while the server is idle. Buck builds pick their allocator themselves and are unchanged. jemalloc fixes its page size when it is built, so the arm64 release build uses 64 KiB pages, which also work on kernels with 4 or 16 KiB pages.

macOS keeps the system allocator, which already returns memory after a recheck. With jemalloc (which has no background threads on macOS) the server settled about 1 GiB higher and peaked about 4 GiB lower, which is not a clear win.

Changelog: [fix] Linux release builds use jemalloc, which keeps the memory of long-running servers from growing after large rechecks.

Reviewed By: SamChou19815

Differential Revision: D128303865
Summary:
The Linux arm64 release binary is built in CI but never run, while the x86-64, macOS and Windows binaries all run the test suite. Add a `runtests_linux_arm64` job, mirroring `runtests_linux`, on the arm64 runner that builds it.

Changelog: [internal]

Differential Revision: D128499061
@meta-cla meta-cla Bot added the CLA Signed label Oct 30, 2026
@meta-codesync

meta-codesync Bot commented Oct 30, 2026

Copy link
Copy Markdown

@panagosg7 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D128499061.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant