From 498a38cf74de86fccecf4fe715983d2036c3024e Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sat, 18 Oct 2025 16:40:54 -0400 Subject: [PATCH] Re-enable adaptive allocator Recent Netty versions have improved the adaptive allocator, and we shouldn't be seeing the OOM issues others were noticing before. Let's re-enable it. As for the buffer resizing issue, the upstream issue netty/netty#14912 is long fixed. I think we *should* pre-allocate the buffers beforehand much more aggressively, but that has to be future work. --- proxy/src/main/java/com/velocitypowered/proxy/Velocity.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/Velocity.java b/proxy/src/main/java/com/velocitypowered/proxy/Velocity.java index a6fc850b..0ec8622d 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/Velocity.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/Velocity.java @@ -47,11 +47,6 @@ public class Velocity { System.setProperty("io.netty.native.workdir", System.getProperty("velocity.natives-tmpdir")); } - // Restore allocator used before Netty 4.2 due to oom issues with the adaptive allocator - if (System.getProperty("io.netty.allocator.type") == null) { - System.setProperty("io.netty.allocator.type", "pooled"); - } - // Disable the resource leak detector by default as it reduces performance. Allow the user to // override this if desired. if (!VelocityProperties.hasProperty("io.netty.leakDetection.level")) {