`
youaremoon
  • 浏览: 31563 次
  • 性别: Icon_minigender_1
  • 来自: 重庆
社区版块
存档分类
最新评论

netty5学习笔记-内存池6-可调优参数

阅读更多

如果你看了前面的几篇内存池的介绍,你可能会觉得并没有什么卵用。 这里就搞点有用的 -- netty内存池可调优参数

 

参数名 说明 默认值
io.netty.allocator.pageSize page的大小 8192
io.netty.allocator.maxOrder 一个chunk的大小=pageSize << maxOrder 11
io.netty.allocator.numHeapArenas heap arena的个数 min(cpu核数,maxMemory/chunkSize/6),一般来说会=cpu核数
io.netty.allocator.numDirectArenas direct arena的个数 min(cpu核数,directMemory/chunkSize/6),一般来说会=cpu核数
io.netty.allocator.tinyCacheSize PoolThreadCache中tiny cache每个MemoryRegionCache中的Entry个数 512
io.netty.allocator.smallCacheSize PoolThreadCache中small cache每个MemoryRegionCache中的Entry个数 256
io.netty.allocator.normalCacheSize PoolThreadCache中normal cache每个MemoryRegionCache中的Entry个数 64
io.netty.allocator.maxCachedBufferCapacity PoolThreadCache中normal cache数组长度 32 * 1024
io.netty.allocator.cacheTrimInterval PoolThreadCache中的cache收缩阈值,每隔该值次数,会进行一次收缩 8192
io.netty.allocator.type allocator类型,如果不使用内存池,则设置为unpooled pooled
io.netty.noUnsafe 是否关闭direct buffer false
io.netty.leakDetectionLevel 内存泄露检测级别 SIMPLE

看了这些,你会发现这个说明让你觉得原来我还可以这么调优,但是调了有什么用依然不清楚。其实这是故意的,老老实实去看完前面几篇文章自然就明白了,哈哈。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics