Chinaunix首页 | 论坛 | 博客
  • 博客访问: 774743
  • 博文数量: 274
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 862
  • 用 户 组: 普通用户
  • 注册时间: 2015-10-24 15:31
个人简介

不合格的程序猿

文章分类

全部博文(274)

文章存档

2019年(3)

2018年(1)

2017年(4)

2016年(160)

2015年(106)

我的朋友

分类: C/C++

2019-07-03 08:53:37

配制方法:
    export MALLOC_CONF="retain:true,dirty_decay_ms:25000,muzzy_decay_ms:30000"
    通过环境变量动态生效,配置完环境变量后,重启或启动应用程序。
释义:
     opt.retain (bool) r-

If true, retain unused virtual memory for later reuse rather than discarding it by calling munmap(2) or equivalent (see for related details). It also makes jemalloc use mmap(2) in a more greedy way, mapping larger chunks in one go. This option is disabled by default unless discarding virtual memory is known to trigger platform-specific performance problems, e.g. for [64-bit] Linux, which has a quirk in its virtual memory allocation algorithm that causes semi-permanent VM map holes under normal jemalloc operation. Although munmap(2) causes issues on 32-bit Linux as well, retaining virtual memory for 32-bit Linux is disabled by default due to the practical possibility of address space exhaustion.
opt.dirty_decay_ms (ssize_t) r-

Approximate time in milliseconds from the creation of a set of unused dirty pages until an equivalent set of unused dirty pages is purged (i.e. converted to muzzy via e.g. madvise(...MADV_FREE) if supported by the operating system, or converted to clean otherwise) and/or reused. Dirty pages are defined as previously having been potentially written to by the application, and therefore consuming physical memory, yet having no current use. The pages are incrementally purged according to a sigmoidal decay curve that starts and ends with zero purge rate. A decay time of 0 causes all unused dirty pages to be purged immediately upon creation. A decay time of -1 disables purging. The default decay time is 10 seconds. See and for related dynamic control options. See for a description of muzzy pages.for a description of muzzy pages. Note that when the feature is enabled, the arenas reserved for oversize requests may have its own default decay settings.
opt.muzzy_decay_ms (ssize_t) r-
Approximate time in milliseconds from the creation of a set of unused muzzy pages until an equivalent set of unused muzzy pages is purged (i.e. converted to clean) and/or reused. Muzzy pages are defined as previously having been unused dirty pages that were subsequently purged in a manner that left them subject to the reclamation whims of the operating system (e.g. madvise(...MADV_FREE)), and therefore in an indeterminate state. The pages are incrementally purged according to a sigmoidal decay curve that starts and ends with zero purge rate. A decay time of 0 causes all unused muzzy pages to be purged immediately upon creation. A decay time of -1 disables purging. The default decay time is 10 seconds. See and for related dynamic control options.


jemalloc详细配置项说明:
        
阅读(3168) | 评论(0) | 转发(0) |
0

上一篇:解析top、dstat、iostat等输出信息

下一篇:没有了

给主人留下些什么吧!~~