Analysing allocator CPU & memory issues

未关闭
#1,140 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
c
领域
performance

调研方向

从生产环境的 CPU 和内存图表开始,并比较同一工作负载在 mimalloc 和 glibc 下的表现,因为没有提供最小可复现示例或源代码位置。在问题发生期间收集 allocator 内部的测量数据,并记录应用程序条件;完成的标准是找出 spike 的证据,或将其缩小为一个可复现的 allocator 问题。

由索引模型根据 Issue 内容生成。

描述

I have a problem with mimalloc and I'm a bit unsure how to approach it. My application consumes a lot of memory using glibc allocator, so I switched to mimalloc. It works wonders, except when it doesn't. Sporadically I can see following pattern in my application:

Image

I know for a fact that there is no user code in the application that can spike into 100% CPU and 5x memory usage. I am pretty sure it's an allocator (and this graph looks very different on glibc allocator). This only happens in production environment on real data, and I haven't been able to create a MRE to showcase the isssue.

Is there any way I can tell why/how this is happening, if I am unable to shrink the issue to the MRE? Maybe I can create a worker to log some of the internal mimalloc structs, so when this happens we have some numbers to work from? At this point I'm a bit lost because I haven't had such problems before and I am not sure how to approach it.

主要语言
C
星标
13.6k
派生
1.2k
平均合并
18 小时 12 分钟
30 天内合并 PR
20

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/mimalloc 的其他 Issue

查看 microsoft/mimalloc 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。