Reputation: 55
Please, explain what is io.netty.allocator.maxOrder in Netty!
By default it value is 11, thus I get 8192 << 11 = 16MiB per chunk For 2 cores on Java 11 I get 4 direct arenas with 6 DirectByteBuffers each (I have memory dump). So 16Mib x 4 arenas x 6bufs = 384Mib.
My application has transport server based on netty with hundreds of client connections sending lots of small messages (some Kbytes each message). But also my app uses direct memory for its own needs. So extra 384Mib costs too much for me.
Please, advise, can I reduce io.netty.allocator.maxOrder to value 8 without any regression in netty performance?
Upvotes: -3
Views: 2760
Reputation: 23567
Sure you can. Just use a profiler to understand the effect here. These numbers were used based on the jemalloc paper / blog post at the point of time when writing the implementation.
Upvotes: 0