Skip to content

Dockerfile: Switch to 84codes crystal compiler container image - #5473

Merged
Fijxu merged 1 commit into
masterfrom
fijxu/84codes-builder
May 30, 2026
Merged

Dockerfile: Switch to 84codes crystal compiler container image#5473
Fijxu merged 1 commit into
masterfrom
fijxu/84codes-builder

Conversation

@Fijxu

@Fijxu Fijxu commented Sep 14, 2025

Copy link
Copy Markdown
Member

Closes #5456

The 84codes Crystal container image builds libgc (bdwgc) with --enable-large-config: https://github.com/84codes/crystal-packages/blob/b321bb4358b0140a63573d9d05ccf2f06c5ae040/alpine/Dockerfile#L13-L22

I tested it locally and I'm now going to test it on my fork of Invidious https://git.nadeko.net/Fijxu/invidious/commit/b38791e7ca6b7549e3a894f26f43cb77660c798e

@Fijxu
Fijxu requested a review from syeopite September 14, 2025 02:38
@Fijxu
Fijxu requested a review from unixfox as a code owner September 14, 2025 02:38
@Fijxu Fijxu added the docker Pull requests that update docker code label Sep 14, 2025
@unixfox

unixfox commented Sep 14, 2025

Copy link
Copy Markdown
Member

Ah so this image fixes the memory leak?

@Fijxu

Fijxu commented Sep 14, 2025

Copy link
Copy Markdown
Member Author

Ah so this image fixes the memory leak?

No, this is unrelated to the memory leak. It just improves GC performance and for now, my Invidious processes seem to use less memory.

2fd67c34-000f-40ed-9d5b-04f1def58b93

At 00:00 is when I changed my instance to the 84codes container image to build Invidious.

@Fijxu

Fijxu commented Sep 15, 2025

Copy link
Copy Markdown
Member Author

After approximately 1 day and 12 hours I can confirm that the 84codes container image which uses --enable-large-config for bdwgc has a more stable memory usage when combining it with #5441. There is no memory limits (mem_limit) on my docker-compose file and I have around 8GB of memory free that Invidious could use, but the memory usage is stable ;):

image

@unixfox

unixfox commented Dec 18, 2025

Copy link
Copy Markdown
Member

#5441 got merged instead of this one.

@unixfox unixfox closed this Dec 18, 2025
@Fijxu

Fijxu commented Dec 18, 2025

Copy link
Copy Markdown
Member Author

#5441 is for memory leak

This one is for bdwgc compiled with --enable-large-config and not related to the memory leak. Is for better memory management in the GC

@unixfox unixfox reopened this Dec 18, 2025
@unixfox

unixfox commented Dec 18, 2025

Copy link
Copy Markdown
Member

@Fijxu ok. I saw that they provide ARM64: https://hub.docker.com/r/84codes/crystal/tags. Could we unify our Dockerfile for both x86 and ARM64?

@Fijxu

Fijxu commented May 30, 2026

Copy link
Copy Markdown
Member Author

@unixfox Since now we just use a single Docker file, we can just replace the current crystallang OCI by the 84codes OCI and it should all work fine.

@unixfox

unixfox commented May 30, 2026

Copy link
Copy Markdown
Member

@unixfox Since now we just use a single Docker file, we can just replace the current crystallang OCI by the 84codes OCI and it should all work fine.

Sure go ahead :)

@Fijxu
Fijxu force-pushed the fijxu/84codes-builder branch from 860fef6 to 63cb6db Compare May 30, 2026 20:57
@Fijxu
Fijxu merged commit 0e0ee40 into master May 30, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Pull requests that update docker code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Recompile Crystal's garbage collector (bdwgc) with --enable-large-config

2 participants