geforkt von Mirrors/Paper
4cdbb0c86c
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 044d4ee9 SPIGOT-7283, SPIGOT-7318: Add AsyncStructureGenerateEvent and BlockState cloning 57b73d57 PR-913: Deprecate Projectile#doesBounce() and #setBounce() 43373c44 PR-904: Update FeatureFlag for 1.20.2 a7bbbf0c PR-911: Expand DataPack API with 1.20.2 pack version methods 0341e3a0 SPIGOT-7489: Add TeleportDuration to Display Entity bcd8d2aa PR-912: Update Minecraft Wiki URLs CraftBukkit Changes: 99aafc222 Increase outdated build delay dab849f08 SPIGOT-7283, SPIGOT-7318: Add AsyncStructureGenerateEvent and BlockState cloning 041b29ae3 Upgrade specialsource-maven-plugin 851a32cff PR-1263: Remove unused implementation of AbstractProjectile#doesBounce() and #setBounce() 251af0da3 PR-1261: Expand DataPack API with 1.20.2 pack version methods 46e4ba627 Upgrade specialsource-maven-plugin df3738a24 SPIGOT-7489: Add TeleportDuration to Display Entity 8d0fea457 PR-1262: Update Minecraft Wiki URLs e62905aab SPIGOT-7490: Fix entity equipment updates Spigot Changes: a0f3d486 Rebuild patches
31 Zeilen
1.5 KiB
Diff
31 Zeilen
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Mon, 4 May 2020 01:08:56 -0400
|
|
Subject: [PATCH] Set cap on JDK per-thread native byte buffer cache
|
|
|
|
See: https://www.evanjones.ca/java-bytebuffer-leak.html
|
|
|
|
This is potentially a source of lots of native memory usage.
|
|
|
|
We are clearly seeing native usage upwards to 1-4GB which doesn't make sense.
|
|
|
|
Region File usage fixed in previous patch should of tecnically only been somewhat
|
|
temporary until GC finally gets it some time later, but between all the various
|
|
plugins doing IO on various threads, this hidden detail of the JDK could be
|
|
keeping long lived large direct buffers in cache.
|
|
|
|
Set system properly at server startup if not set already to help protect from this.
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
index 491abe3a2768ec4e8c43d3117177c472c205e7bf..84c9998a01000d5b7d70e5724dd03be1536ba297 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
@@ -26,6 +26,7 @@ public class Main {
|
|
}
|
|
// Paper end
|
|
// Todo: Installation script
|
|
+ if (System.getProperty("jdk.nio.maxCachedBufferSize") == null) System.setProperty("jdk.nio.maxCachedBufferSize", "262144"); // Paper - cap per-thread NIO cache size
|
|
OptionParser parser = new OptionParser() {
|
|
{
|
|
acceptsAll(Main.asList("?", "help"), "Show the help");
|