Skip to content

Commit 2b84d82

Browse files
authored
Merge pull request #50765 from brunobat/UnpooledByteBufAllocator-docs
UnpooledByteBufAllocator doc improvements
2 parents f54fe5f + d55fd4f commit 2b84d82

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/src/main/asciidoc/telemetry-micrometer.adoc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,28 @@ Chunks are the primary unit of memory allocation in Netty's arenas.
642642

643643
|===
644644

645+
==== Unpooled
646+
647+
This uses a utility class providing static methods to create new buffers directly and bypassing the pooling mechanism. The user must also release the allocated buffers.
648+
649+
[NOTE]
650+
====
651+
It has been https://github.com/quarkusio/quarkus/issues/50538[reported] that some libraries using the `UnpooledByteBufAllocator` might not release some heap buffers. This will not decrement the reported allocation even if memory is no longer reserved. This might lead to astronomical values in reported memory.
652+
====
653+
654+
==== Debugging
655+
656+
If high allocation values are reported, there are 2 ways to determine whether it’s a real memory leak:
657+
658+
* By enabling https://netty.io/wiki/reference-counted-objects.html#leak-detection-levels[leak detection], as documented by Netty. Example:
659+
660+
[source,bash]
661+
----
662+
java -Dio.netty.leakDetection.level=advanced ...
663+
----
664+
665+
* Inspect a memory dump from the application.
666+
645667
[[quarkus-extensions-using-micrometer]]
646668
=== List of Quarkus core extensions automatically instrumented with Micrometer
647669

0 commit comments

Comments
 (0)