_2025-03-18_17:03:07_ | 2025-03-18 17:03:07 | Kernel Samepage Merging — The Linux Kernel documentation | 原文链接失效了?试试备份 | TAGs:操作系统 linux 内存 ksm | Summary: The Linux Kernel's KSM (Kernel Shared Memory) feature is a memory-saving mechanism that merges identical pages in the system or application memory. It was introduced in version 2.6.32 and can be enabled by setting CONFIG_KSM=y. The KSM daemon, ksmd, periodically scans user memory for identical pages and merges them, reducing the overall memory usage. The merging process involves copying the content of the identical pages into a single write-protected page, which is then shared among the processes. | |
_2025-04-17_15:18:01_ | 2025-04-17 15:18:01 | 一篇搞懂KSM机制剖析 — Linux内核中的内存去耦合 - 知乎 | 原文链接失效了?试试备份 | TAGs:操作系统 linux 内存 ksm | Summary: This article explains the concept and implementation of KSM (Kernel Samepage Merging) in the Linux kernel, a feature that allows a system manager (hypervisor) to merge identical memory pages and increase the number of parallel virtual machines. The article also discusses the background of KSM, its benefits, and ways to manage it. The article also mentions the history of server virtualization and the advantages of memory sharing in this context. The article concludes by discussing the importance of KSM in reducing memory usage and increasing the capacity of a server to host multiple applications or virtual machines. The article also recommends some resources for further learning.本文介绍了 Linux 内核中 KSM (Kernel Samepage Merging) 的概念和实现,该功能允许系统管理器 (hypervisor) 合并相同的内存页面并增加并行虚拟机的数量。本文还讨论了 KSM 的背景、优势以及管理它的方法。本文还提到了服务器虚拟化的历史以及在此上下文中内存共享的优势。本文最后讨论了 KSM 在减少内存使用和增加服务器托管多个应用程序或虚拟机的能力方面的重要性。本文还推荐了一些资源以供进一步学习。 | |
|
_2025-03-18_16:48:13_ | 2025-03-18 16:48:13 | Using Kernel Samepage Merging with KVM – The Linux Cluster | 原文链接失效了?试试备份 | TAGs:虚拟化&容器 kvm 内存 ksm | Summary: The Linux Cluster Blog post discusses using Kernel Samepage Merging (KSM) with KVM for more efficient use of memory in Linux Cluster and Enterprise Linux systems. KSM is a Linux kernel feature that combines identical memory pages from multiple processes into one copy-on-write memory region. To verify KSM support, users can check the kernel configuration file and the number of kernel pages. Additionally, KVM guests need to request identical pages merging using the new madvise interface for KSM to take effect.Linux 集群博客文章讨论了将内核同页合并 (KSM) 与 KVM 结合使用,以便在 Linux 集群和企业 Linux 系统中更高效地使用内存。KSM 是一项 Linux 内核功能,它将来自多个进程的相同内存页合并到一个写入时复制内存区域。要验证 KSM 是否支持,用户可以检查内核配置文件和内核页数。此外,KVM 客户机需要使用新的 madvise 接口请求合并相同的页面,KSM 才能生效。 | |