Skip to content

AoT builds: use the G1 garbage collector#203

Closed
Ostrzyciel wants to merge 2 commits intomainfrom
GH-195/g1
Closed

AoT builds: use the G1 garbage collector#203
Ostrzyciel wants to merge 2 commits intomainfrom
GH-195/g1

Conversation

@Ostrzyciel
Copy link
Copy Markdown
Member

Issue #195

Changes the GC for AoT builds from the default serial collector to G1, which is the only other available GC. G1 works largely in parallel, and while it's really designed to lower latency, in our case it also helps with throughput, because we get rid of long GC pauses.

This does increase the binary size, but we can try to squeeze something more out of it later (e.g., with PGOs – #198):

$ ls -lh
-rwxrwxr-x 1 piotr piotr  63M Aug 25 00:15 jelly-cli-o3
-rwxrwxr-x 1 piotr piotr  81M Aug 25 00:29 jelly-cli-o3-g1
-rwxrwxr-x 1 piotr piotr  31M Aug 25 00:29 jelly-cli-o3-g1.gz
-rwxrwxr-x 1 piotr piotr  25M Aug 25 00:15 jelly-cli-o3.gz

Baseline throughput:

$ time ./jelly-cli-o3 rdf transcode nanopubs.jelly > /dev/null

real    1m2,342s
user    0m54,066s
sys     0m8,228s


$ time ./jelly-cli-o3 rdf from-jelly nanopubs.jelly > /dev/null

real    3m31,301s
user    3m22,976s
sys     0m8,314s

With this change applied:

$ time ./jelly-cli-o3-g1 rdf transcode nanopubs.jelly > /dev/null

real    0m59,580s
user    0m53,008s
sys     0m7,868s


$ time ./jelly-cli-o3-g1 rdf from-jelly nanopubs.jelly > /dev/null

real    3m22,249s
user    3m15,588s
sys     0m7,893s

So, it's a bit faster.

@Ostrzyciel
Copy link
Copy Markdown
Member Author

Ah, it turns out G1 only works on Linux...

After consulting with Kacper, I think we will give up on this one. The gains are too small, and not all platforms are supported...

@Ostrzyciel Ostrzyciel closed this Aug 25, 2025
@Ostrzyciel Ostrzyciel deleted the GH-195/g1 branch August 25, 2025 07:18
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