Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set JEMALLOC_SYS_WITH_LG_PAGE=16 at build #263

Merged

Conversation

schredder
Copy link

Support large page sizes becoming more common on arm64 systems. This is compatible with systems that use smaller page sizes.

Related issue: #261

Support large page sizes becoming more common on arm64 systems. This is compatible with systems that use smaller page sizes
@QuantumEntangledAndy
Copy link
Owner

What arch's have you tested this with? Any idea if it can cause issues with the non arm64 builds?

@schredder
Copy link
Author

What arch's have you tested this with? Any idea if it can cause issues with the non arm64 builds?

I haven't tested it on other arch's yet, though as far as I have read (this is also @jasoncodes impression on my issue), using a larger page size won't be a problem for kernels configured for smaller page sizes.

My custom build based on v0.6.3rc1 runs on my pi5, but it kept throwing 401's at Scrypted when it was trying to start an rtsp stream, so I switched back to v0.6.1 last night. I'll have to keep playing with it, maybe set v0.6.3rc1 up on a different amd64 host and see if I can repro that error. (unless that's something you happen to be aware of?)

@jasoncodes
Copy link

jasoncodes commented Jun 6, 2024

FYI I pulled the arm64 build artifact for this PR and can confirm that the new build works on my machine when I mount the binary into the latest available container image.


Since all other supported architectures (i386, amd64, and armv7) use 4k pages, it may make sense to only set this on arm64 but I don’t think it matters much. As mentioned above, it’ll will work fine with a jemalloc page size larger than the kernel page size. Maybe it’ll use a little bit more memory or run slightly slower? The difference may not even be noticeable but it’d take benchmarking to confirm.

Note that JEMALLOC_SYS_WITH_LG_PAGE=16 looks to be 64k pages (2**16) not 16k pages (2**14). We only need 16k for Apple Silicon and Raspberry Pi 5 but, as above, 64k should be totally fine (and is future-proof as arm64 can be 64k too).

@QuantumEntangledAndy QuantumEntangledAndy merged commit 3f7a231 into QuantumEntangledAndy:master Jun 11, 2024
@QuantumEntangledAndy
Copy link
Owner

Ok then let's merge it

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.

3 participants