mongodb - Linux透明大页(THP)性能评估

标签 mongodb linux-kernel redis

您能告诉我真实的应用程序示例,这些示例显示了 Linux 的透明大页 (THP) 导致的性能下降吗? 一些主页显示数据库应用程序(Hadoop、mongoDB、redis 等)显示性能下降,但我无法确认结果。

我想评估使用 THP 或不使用 THP 时的性能。 谢谢。

最佳答案

对于 Redis,性能下降已得到充分记录和测试,建议从 Redis 的 TFM 禁用大页面:

Unfortunately when a Linux kernel has transparent huge pages enabled, Redis incurs to a big latency penalty after the fork call is used in order to persist on disk. Huge pages are the cause of the following issue: Fork is called, two processes with shared huge pages are created. In a busy instance, a few event loops runs will cause commands to target a few thousand of pages, causing the copy on write of almost the whole process memory. This will result in big latency and big memory usage.

参见:

http://antirez.com/news/84

http://redis.io/topics/latency

关于mongodb - Linux透明大页(THP)性能评估,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35102580/

相关文章:

mongodb - Mongoose 中的 updateMany() 和 bulkWrite() 有什么区别?

django - 使用 MongoEngine 查询 ReferenceFields

linux - 使用 gcc 编译 64 位 linux 内核

google-app-engine - 无法连接到 Google App Engine 上的 Redis 服务器

python - Redis 在位数组上的性能

javascript - 异步 Redis 和 Promise

javascript - MongoDB 文档已添加但未显示在网站上(无需刷新)

node.js - MongoDB 更新到 3.0 后 Heroku 应用程序崩溃

linux - 内核 3.8 或更高版本的 AODV 实现

multithreading - 为什么只有当 preempt_count == 0 时内核抢占才是安全的?