Andrew Porter
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
In any case, I can probably live with 24 render distance for now. Beats the stuttery mess that I'm getting here.
20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
;-;
20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
Unfortunately no, but pretty soon here, I'll be out of time as I'm really supposed to be enjoying myself right now, not in a debugging session.
20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
(Direct buffer usage I have, thankfully, seen gets deallocated every now and then)
20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
And just the fact that it never seems to go down.
20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
Albeit, the basis being the alarming (but still relatively slow) direct buffer allocation rate.
20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
I mean it just seems to me like some sort of memory leak considering that I slowly approach an OutOfMemoryError as described above. I don't have proof of any objects on the heap being implicitly locked away again causing such leaks.
20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
(Is there any particular reason DH needs to allocate 1GiB every time?)
20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
Also my game recently crashed from the same
LodNodeBufferBuilder was unable to upload buffer: Unable to allocate 1048576 bytes
error even after increasing heap size to 16GiB.20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
integrated server still also is quite uncomfortably high; for entities to not be a comedically stuttery mess like this is a Game & Watch, I find that having 45ms as an upperbound for the integrated server suffices.
20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
All that DH should be doing is rendering approximations of chunks, not even whole chunks, and even mostly just surface information, but I still take a hit for some reason, and it still mostly seems related to direct buffer usage.
20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
Ok so this issue seems to kinda mostly disappear for the most part when it comes to stutters if I set the render distance low enough, but for comparison, I get virtually no dropped frames with DH disabled, 24 render distance, 24 shadow distance, and 20 simulation distance.
20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
Lastly, JVM info, just in case:
Java: JDK-21.0.2 HotSpot JVM
javaw.exe
(running natively on Windows x64)
JVM arguments: -Xverify:none -da -dsa -XX:ReservedCodeCacheSize=512m -XX:+UseCompressedOops -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -Xnoclassgc -XX:InitiatingHeapOccupancyPercent=90 -XX:NewRatio=1 -XX:SurvivorRatio=2 -XX:+UseZGC -XX:+ZGenerational
Modrinth App JVM arguments: heap memory set to 8192MB
20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
DH config (for a config matching the one above that fails, just enable distant chunk generation): (DistantHorizons.toml attached)
20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
Associated full stack traces: (attached; find
[21:55:04]
for relevant entries)20 replies
DHDistant Horizons
•Created by Andrew Porter on 6/1/2024 in #help-me
Memory Leak with my Modded Setup? OutOfMemoryError by leaving idle with chunk gen enabled
The particular kinds of errors:
[21:55:04] [DH-Buffer Uploader Thread[0]/ERROR]: LodNodeBufferBuilder was unable to upload buffer: Unable to allocate 1048576 bytes
F3 info (distant chunk generation disabled):
With DH enabled while in motion (creative max speed): the integrated server spikes as high as 100ms; allocation rate is about 4-5GB/s on the heap; Direct Buffers: 100s of MB/sec, quickly reaching over 1GiB; off-heap allocates at >=1MB/500ms
With DH enabled while standing still: integrated server hovers around 28ms; allocation rate is 400 - 1000MB/s on the heap; Direct Buffers: stable, fluctuates by hundreds of kilobytes, trending upwards; off-heap allocates at <=1MB/500ms
Observation: the direct buffers don't always seem to get cleared all that often until it reaches a certain threshold near 1.3GiB, and seems to not be directed by the heap and its choice of GC, but idk.
No DH while in motion (creative max speed): integrated server in [32ms, 36ms] on average with spikes to ~40-43ms; allocation rate is ~1.5-2GB/s on the heap, some stutters; Direct Buffers; stable, fluctuates by hundreds of kibibytes trending upwards; off-heap: stable, fluctuates by hundreds of kilobytes, trending upwards
No DH while standing still: integrated server in [28ms, 30ms] on average with spikes to 30-31ms; allocation rate is 400-800MB/s on the heap; Direct Buffers: stable, fluctuates by hundreds of kibibytes trending upwards; off-heap: stable, fluctuates by hundreds of kilobytes, trending upwards20 replies