Closed luojiyin1987 closed 8 months ago
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
设置 1000ms 运行一次 GC。 2个 narenas 进行内存分配,默认值是1 , 这样可以加快内存分配速度, 可以根据需求配置为 4, 8 等,值越大分配速度越快,也更消耗内存。 后台进程进行内存回收,加快内存回收速度,会多消耗 CPU资源, 默认是关闭的。
参考资料
No response
Is there an existing feature request for this?
Description
设置 1000ms 运行一次 GC。 2个 narenas 进行内存分配,默认值是1 , 这样可以加快内存分配速度, 可以根据需求配置为 4, 8 等,值越大分配速度越快,也更消耗内存。
后台进程进行内存回收,加快内存回收速度,会多消耗 CPU资源, 默认是关闭的。
参考资料
Use Case
No response
Proposed Solution
No response