From 428a4391412a3276f73833dfd72234f8bf4073d9 Mon Sep 17 00:00:00 2001 From: mithral Date: Thu, 27 Aug 2026 01:10:30 -0400 Subject: [PATCH] perf(server): 1.0.2 ship ALL optimization configs tuned for YOUR VPS only - Ship all needed configs as Packwiz overrides so they persist on VPS (not overwritten on restart unless data/config wiped) - Add server_pack/config/lithium.properties (empty = all Lithium 0.15.4 mixins ON, optimal) - Add ferritecore.mixin.properties (safe memory ON, risky threading detector OFF) - Add c2me.toml (default auto-tune expression for YOUR cpus/mem, from local) - Add packetfixer.properties (explicit sane limits, allSizesUnlimited=false, not unlimited) - Add spark/config.json (backgroundProfiler true) - Already shipped: chunksmith 45ms, alternate-current, modernfix-mixins, c2me-notes - MRPACK now 16 overrides/config (was 11), validated 144 mods, AUDIT PASS, drift LOCAL=PACKWIZ in-sync - Tuned for single-owner VPS only, idc about others per request - Packwiz is source of truth; configs won't be overwritten on server run (they are read, not regenerated if present) --- optimization-manifest.json | 10 +- server_pack/config/c2me.toml | 198 ++++++++++++++++++ .../config/ferritecore.mixin.properties | 15 ++ server_pack/config/lithium.properties | 4 + server_pack/config/packetfixer.properties | 15 ++ server_pack/config/spark/config.json | 4 + server_pack/index.toml | 20 ++ server_pack/pack.toml | 4 +- 8 files changed, 263 insertions(+), 7 deletions(-) create mode 100644 server_pack/config/c2me.toml create mode 100644 server_pack/config/ferritecore.mixin.properties create mode 100644 server_pack/config/lithium.properties create mode 100644 server_pack/config/packetfixer.properties create mode 100644 server_pack/config/spark/config.json diff --git a/optimization-manifest.json b/optimization-manifest.json index 6fd6bf0..1184c33 100644 --- a/optimization-manifest.json +++ b/optimization-manifest.json @@ -7,13 +7,13 @@ "fabric_api_version_id": "Nlt8gI9z", "pack": { "name": "F##KRPG - Server", - "version": "1.0.1", + "version": "1.0.2", "pack_format": "packwiz:1.1.0", "packwiz_version": "unknown (binary /usr/bin/packwiz 2026-08-19)", "packwiz_revision": "14b5dc3", - "index_hash": "adccf3bb09cf02c5da9f414777ae8c3a80125aa863f318ff729b787b5137b4f2", + "index_hash": "197e07b81a8da5878770d43e825affe72fd37fa92c642e7d362732cfeeeddfbe", "index_hash_format": "sha256", - "generated_at": "2026-08-27T04:59:05Z", + "generated_at": "2026-08-27T05:10:10Z", "git_revision": "14b5dc363c6cfd0967e09c2e60e77a1dcbe81685", "git_short": "14b5dc3" }, @@ -402,6 +402,6 @@ "last_benchmark": null, "notes": "Run fish tools/benchmark.fish after local test; baseline.json will populate here" }, - "last_audit": "2026-08-27T04:59:05Z", - "notes": "Source of truth is Packwiz project (server_pack/). Installed mods on servers are NOT source of truth. Continents version mismatch flagged for fix in 1.0.1." + "last_audit": "2026-08-27T05:10:10Z", + "notes": "1.0.2: Ship ALL optimization configs as Packwiz overrides (lithium, ferritecore, c2me.toml, packetfixer, spark) tuned for YOUR VPS only; they persist in data/config and are not overwritten on restart unless data/config wiped." } diff --git a/server_pack/config/c2me.toml b/server_pack/config/c2me.toml new file mode 100644 index 0000000..1a47538 --- /dev/null +++ b/server_pack/config/c2me.toml @@ -0,0 +1,198 @@ +version = 3 +# (Default: +# max( +# 1, +# min( +# if( is_windows, +# (cpus / 1.6), +# (cpus / 1.3) +# ) - if(is_client, 1, 0), +# ( ( mem_gb - (if(is_client, 1.0, 0.5)) ) / 0.6 ) +# ) +# ) +# ) +# The expression for the default value of global executor parallelism. +# This is used when the parallelism isn't overridden. +# Available variables: is_windows, is_j9vm, is_client, cpus, mem_gb +# +defaultGlobalExecutorParallelismExpression = "default" +# (Default: 4) Sets the thread priority for worker threads +# +# References: +# - https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Thread.html#setPriority(int) +# +threadPoolPriority = "default" +# (Default: 9) Configures the parallelism of global executor +globalExecutorParallelism = "default" + +[fixes] + # (Default: true) + # Whether to disable the shutdown hook of log4j2 on dedicated servers. + # Enabling this also makes the JVM exit when the dedicated server is considered fully shut down. + # This option have no effect on client-side. + # We has historically been doing this, and this config option allows you to disable this behavior. + # + disableLoggingShutdownHook = "default" + # (Default: true) Enforces safe world random access. + # This feature detects unsafe off-thread world random access, helping to find the causes + # of mysterious "Accessing LegacyRandomSource from multiple threads" crash. + # The default behavior is to fail hard when such bad things happens. + # Disabling this option will replace this behavior with a warning. + # + # It is generally not recommended to disable this settings unless you know what you are doing + # + # + enforceSafeWorldRandomAccess = "default" + +[noTickViewDistance] + # (Default: 27) No-tick view distance max concurrent chunk loads + # Lower this for a better latency and higher this for a faster loading + maxConcurrentChunkLoads = "default" + # (Default: true) Enable server-side support for extended render distance protocol (c2me:ext_render_distance_v1) + # This allows requesting render distances higher than 127 chunks from the server + # + # Requires Fabric API (currently available) + # + enableExtRenderDistanceProtocol = "default" + # (Default: false) Whether to ensure correct chunks within normal render distance + # This will send chunks twice increasing network load + ensureChunkCorrectness = "default" + # (Default: 200) Applies a multiplier *in percentage* to the target chunk sending rate from vanilla + # Setting this to 0 disables rate limiting + # + # Defaults to 200, which is 200% + # + chunkSendingSpeedMultiplierPercentage = "default" + +[ioSystem] + # (Default: 8192) Soft limit for io worker nbt cache + chunkDataCacheSoftLimit = "default" + # (Default: 32678) Hard limit for io worker nbt cache + chunkDataCacheLimit = "default" + # (Default: true) Whether to use the optimized implementation of IO system + replaceImpl = "default" + +[vanillaWorldGenOptimizations] + # (Default: true) Whether to use density function compiler to accelerate world generation + # + # Density function: https://minecraft.wiki/w/Density_function + # + # This functionality compiles density functions from world generation + # datapacks (including vanilla generation) to JVM bytecode to increase + # performance by allowing JVM JIT to better optimize the code + # + # Currently, all functions provided by vanilla are implemented. + # Chunk upgrades from pre-1.18 versions are not implemented and will + # fall back to the unoptimized version of density functions. + # + useDensityFunctionCompiler = "default" + # (Default: true) Enables the built-in integrations with other worldgen mods in density function compiler. + # + # Depends on vanillaWorldGenOptimizations.useDensityFunctionCompiler + # + enableBuiltinDFCIntegrations = "default" + # (Default: true) Whether to enable aquifer optimizations to accelerate overworld worldgen + # (may cause incompatibility with other mods) + optimizeAquifer = "default" + # (Default: true) Whether to enable End Biome Cache to accelerate The End worldgen + # This is no longer included in lithium-fabric + # (may cause incompatibility with other mods) + # + useEndBiomeCache = "default" + # (Default: true) Whether to enable StructureWeightSampler optimizations to accelerate world generation + # + optimizeStructureWeightSampler = "default" + +[generalOptimizations] + # (Default: 100000) The task interval of mid-tick chunk tasks in nanoseconds (-1 to disable) + # Mid-tick chunk tasks is to execute chunk tasks during server tick loop + # to speed up chunk loading and generation + # This helps chunks loading and generating under high MSPT but may raise + # MSPT when chunks are loading or generating + # + # It is generally not recommended to adjust this value unless you know + # what you are doing + # + # Incompatible with Dimensional Threading (dimthread) + # + midTickChunkTasksInterval = "default" + + [generalOptimizations.autoSave] + # (Default: ENHANCED) Defines how auto save should be handled + # VANILLA: Use vanilla auto-save behavior (auto-save performed every tick during ticking) + # ENHANCED: Use C2ME enhanced auto-save (auto-save performed when the server have spare time after ticking) + # PERIODIC: Use pre-1.18 vanilla auto-save behavior (auto-save performed every 6000 ticks during ticking) + # + # Please preserve quotes so this config don't break + # + mode = "default" + +[chunkSystem] + # (Default: true) Whether to enable async serialization + # + asyncSerialization = "default" + # (Default: false) Whether to recover from errors when loading chunks + # This will cause errored chunk to be regenerated entirely, which may cause data loss + # Only applies when async chunk loading is enabled + # + recoverFromErrors = "default" + # (Default: true) Whether to allow POIs (Point of Interest) to be unloaded + # Unloaded POIs are reloaded on-demand or when the corresponding chunks are loaded again, + # which should not cause any behavior change + # + # Note: + # Vanilla never unloads POIs when chunks unload, causing small memory leaks + # These leaks adds up and eventually cause issues after generating millions of chunks + # in a single world instance + # + allowPOIUnloading = "default" + # (Default: true) This option workarounds MC-276863, a bug that makes mushrooms appear in non-postprocessed chunks + # This bug is amplified with notickvd as it exposes non-postprocessed chunks to players + # + # This should not affect other worldgen behavior and game mechanics in general + # + suppressGhostMushrooms = "default" + # (Default: true) Whether to synchronize the management of player tickets + # + # In vanilla Minecraft, player tickets are not always removed immediately when players leave an area. + # The delay in removal increases with the chunk system’s throughput, but due to vanilla’s typically + # slow chunk loading, tickets are almost always removed immediately. However, some contraptions rely + # on this immediate removal behavior and tend to be broken with the increased chunk throughput. + # Enabling this option synchronizes player ticket handling, making it more predictable and + # thus improving compatibility with these contraptions. + # + syncPlayerTickets = "default" + # (Default: true) Whether to turn fluid postprocessing into scheduled tick + # + # Fluid post-processing is very expensive when loading in new chunks, and this can affect + # MSPT significantly. This option delays fluid post-processing to scheduled tick to hopefully + # mitigate this issue. + # + fluidPostProcessingToScheduledTick = "default" + # (Default: true) Whether to filter fluid post-processing on worldgen threads + # + # The worldgen processes creates a lot of unnecessary fluid post-processing tasks, + # which can overload the server thread and cause stutters. + # This applies a rough filter to filter out fluids that are definitely not going to flow + # + filterFluidPostProcessing = "default" + # (Default: false) Whether to use legacy scheduling for neighbor chunks + # + # Enabling this restores the behavior of always loading in neighbor chunks when a chunk is loaded. + # + # This is currently deprecated and will be removed in the future. + # + useLegacyScheduling = "default" + # (Default: false) Whether to enable low memory mode + # + # This option will attempt to aggressively unload unused chunks. + # Only applies when useLegacyScheduling is disabled. + # + lowMemoryMode = "default" + # (Default: false) Whether to delay full chunk events to after full chunk future have been completed + # This restores the buggy behavior in NeoForge that the ecosystem have been relying on + # + # Enabling this will almost certainly break vanilla behavior, disabled by default on fabric + # Do not change this unless you know what you are doing + # + delayFullChunkEvents = "default" diff --git a/server_pack/config/ferritecore.mixin.properties b/server_pack/config/ferritecore.mixin.properties new file mode 100644 index 0000000..f333ec4 --- /dev/null +++ b/server_pack/config/ferritecore.mixin.properties @@ -0,0 +1,15 @@ +# FerriteCore 7.0.3 — FKRPG server memory (Fabric 1.21.1), tuned for YOUR VPS only +# Safe memory optimizations ON, risky OFF +# Keep replaceNeighborLookup true (big RAM save with Tectonic), keep experimental threading detector OFF +replaceNeighborLookup = true +replacePropertyMap = true +cacheMultipartPredicates = true +modelResourceLocations = true +multipartDeduplication = true +blockstateCacheDeduplication = true +bakedQuadDeduplication = true +modelSides = true +dataComponentPatch = true +useSmallThreadingDetector = false +compactFastMap = false +populateNeighborTable = false diff --git a/server_pack/config/lithium.properties b/server_pack/config/lithium.properties new file mode 100644 index 0000000..d707e5c --- /dev/null +++ b/server_pack/config/lithium.properties @@ -0,0 +1,4 @@ +# Lithium 0.15.4 — FKRPG tuned for single-owner VPS (1.21.1 Fabric) +# https://github.com/CaffeineMC/lithium-fabric/wiki/Configuration-File +# Keep defaults optimal — all mixins enabled. Only disable if proven incompat with SpellEngine/Origins. +# Empty file = all optimizations ON (server thread perf, low MSPT). Do not add =false lines unless testing. diff --git a/server_pack/config/packetfixer.properties b/server_pack/config/packetfixer.properties new file mode 100644 index 0000000..0ca90f7 --- /dev/null +++ b/server_pack/config/packetfixer.properties @@ -0,0 +1,15 @@ +# PacketFixer 3.3.1 — FKRPG tuned for YOUR VPS only (explicit sane values, no unlimited) +# Do NOT use unlimited packet sizes as perf strategy — explicit limits prevent OOM/crash +# Tuned for 1.21.1 Fabric with Krypton + ModernFix netty +#Thu Aug 27 01:03:48 EDT 2026 (tuned 2026-08-27) +allSizesUnlimited=false +chunkPacketData=2097152 +decoderSize=8388608 +forceUnlimitedNbtEnabled=false +nbtMaxSize=2097152 +packetSize=1048576 +stringSize=32767 +timeout=120 +varInt=5 +varInt21=3 +varLong=10 diff --git a/server_pack/config/spark/config.json b/server_pack/config/spark/config.json new file mode 100644 index 0000000..480c9e6 --- /dev/null +++ b/server_pack/config/spark/config.json @@ -0,0 +1,4 @@ +{ + "_header": "spark configuration file - https://spark.lucko.me/docs/Configuration", + "backgroundProfiler": true +} \ No newline at end of file diff --git a/server_pack/index.toml b/server_pack/index.toml index 5cbb9c6..b282fa4 100644 --- a/server_pack/index.toml +++ b/server_pack/index.toml @@ -8,6 +8,10 @@ hash = "02369f087a400c2bddfc6ef941642c2c665196931d276b6d300eab9cd7c24e58" file = "config/c2me-notes.txt" hash = "c0ea51762b40e71ec2940e48a6b6d48316bd3197f112e9af929ada44bf51245a" +[[files]] +file = "config/c2me.toml" +hash = "39c156fb02607f7b57047e4301916f0958a4e4442f62f69088ce5d3b5c26b48f" + [[files]] file = "config/chunksmith/config.json" hash = "2090bf70f26b035d4485dcf5898a67dded727b0344d6ae881a29816f2dea0395" @@ -16,6 +20,14 @@ hash = "2090bf70f26b035d4485dcf5898a67dded727b0344d6ae881a29816f2dea0395" file = "config/ctov.json" hash = "84e97a7cd95a32586f639c799ffd92c845f814717d241868bc46092f163513bc" +[[files]] +file = "config/ferritecore.mixin.properties" +hash = "a6b37e9e19b425a20a5c09c34113d955b50f99c28bc3427c9c69fc4c666eafee" + +[[files]] +file = "config/lithium.properties" +hash = "0d103b7dcaf6f1ffd3459fcdc2208e2d6900f97be42927f9bc046221af7f8ef2" + [[files]] file = "config/lithostitched.json" hash = "ff8e1f4466df85c1158a8864b26bf465503ccf689c4c5d49eb2d6348eb83576c" @@ -24,6 +36,10 @@ hash = "ff8e1f4466df85c1158a8864b26bf465503ccf689c4c5d49eb2d6348eb83576c" file = "config/modernfix-mixins.properties" hash = "a2e16781240c722aa76eec17675b34b174f19c4298f79bb239f49e716d74cbab" +[[files]] +file = "config/packetfixer.properties" +hash = "4bedddb3ea1d045fb9f2e833a543645b9b9be8795ccd4ad2834fcdf57550d0da" + [[files]] file = "config/sereneseasons/fertility.toml" hash = "722f7545a5a592f0aed25ae8dd0a4f53f7abaf0bb53da96417d87e9096e75631" @@ -32,6 +48,10 @@ hash = "722f7545a5a592f0aed25ae8dd0a4f53f7abaf0bb53da96417d87e9096e75631" file = "config/sereneseasons/seasons.toml" hash = "6a4eaef1ed68066a6ba9f2512cf87e868ca2d396db94b13bf76d5020bf58e12b" +[[files]] +file = "config/spark/config.json" +hash = "992ba9f3a4a7ce3de112eb95575328956fdc3ce6781c455ebce7b23db7e7da42" + [[files]] file = "config/tectonic.json" hash = "5c15a484ed96479d3b1b78ebad6c3cdf80f0410647dc725e142b70c7a1878e93" diff --git a/server_pack/pack.toml b/server_pack/pack.toml index 4751ce5..a4f84b3 100644 --- a/server_pack/pack.toml +++ b/server_pack/pack.toml @@ -1,12 +1,12 @@ name = "F##KRPG - Server" author = "mithral" -version = "1.0.1" +version = "1.0.2" pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "adccf3bb09cf02c5da9f414777ae8c3a80125aa863f318ff729b787b5137b4f2" +hash = "197e07b81a8da5878770d43e825affe72fd37fa92c642e7d362732cfeeeddfbe" [versions] fabric = "0.19.3"