此内容没有您所选择的语言版本。

8.3.2. Memory Tuning with virsh


8.3.2.1. memtune

The optional <memtune> element in the guest XML configuration allows administrators to configure guest virtual machine memory settings manually. If <memtune> is omitted, default memory settings apply.
Display or set memory parameters in the <memtune> element in a virtual machine with the virsh memtune command, replacing values according to your environment:
virsh # memtune virtual_machine --parameter size
Copy to Clipboard Toggle word wrap
Available parameters include:
hard-limit
The maximum memory the virtual machine can use, in kibibytes (blocks of 1024 bytes).

Warning

Setting this limit too low can result in the virtual machine being killed by the kernel.
soft-limit
The memory limit to enforce during memory contention, in kibibytes (blocks of 1024 bytes).
swap-hard-limit
The maximum memory plus swap the virtual machine can use, in kibibytes (blocks of 1024 bytes). The swap-hard-limit value must be more than the hard-limit value.
min-guarantee
The guaranteed minimum memory allocation for the virtual machine, in kibibytes (blocks of 1024 bytes).

Note

See # virsh help memtune for more information on using the virsh # memtune command.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat