Red Hat Enterprise Linux 6.5 以降、KSM は NUMA に対応しています。これにより、ページのコアレッシング中に NUMA の局所性を考慮できるため、ページがリモートノードに移動されることに関連するパフォーマンスの低下を防ぐことができます。Red Hat は、KSM が使用されている場合に、ノード間のメモリーマージを回避することを推奨します。KSM を使用している場合は、/sys/kernel/mm/ksm/merge_across_nodes を 0 に変更して、NUMA ノード間でページがマージされないようにします。カーネルメモリーが計算した統計情報は、ノード間での大量のマージ後にはそれぞれの間で相反する場合があります。そのため、KSM デーモンが大量のメモリーをマージすると、numad が混乱する可能性があります。システムに未使用のメモリーが大量にあると、KSM デーモンをオフにして無効にすることでパフォーマンスが高まる場合があります。NUMA の詳細は、『Red Hat Enterprise Linux パフォーマンスチューニングガイド』 を参照してください。
Red Hat Enterprise Linux は、KSM を制御するために 2 つの異なる方法を使用します。
ksm サービスは qemu-kvm パッケージに含まれています。KSM は、Red Hat Enterprise Linux 6 ではデフォルトでオフになっています。ただし、Red Hat Enterprise Linux 6 を KVM ホスト物理マシンとして使用する場合は、ksm/ksmtuned サービスによってオンにされる可能性があります。
Configuration file for ksmtuned.
How long ksmtuned should sleep between tuning adjustments
KSM_MONITOR_INTERVAL=60
Millisecond sleep between ksm scans for 16Gb server.
Smaller servers sleep more, bigger sleep less.
KSM_SLEEP_MSEC=10
KSM_NPAGES_BOOST is added to the npages value, when free memory is less than thres.
KSM_NPAGES_BOOST=300
KSM_NPAGES_DECAY Value given is subtracted to the npages value, when free memory is greater than thres.
KSM_NPAGES_DECAY=-50
KSM_NPAGES_MIN is the lower limit for the npages value.
KSM_NPAGES_MIN=64
KSM_NAGES_MAX is the upper limit for the npages value.
KSM_NPAGES_MAX=1250
KSM_TRES_COEF - is the RAM percentage to be calculated in parameter thres.
KSM_THRES_COEF=20
KSM_THRES_CONST - If this is a low memory system, and the thres value is less than KSM_THRES_CONST, then reset thres value to KSM_THRES_CONST value.
KSM_THRES_CONST=2048
uncomment the following to enable ksmtuned debug information
LOGFILE=/var/log/ksmtuned
DEBUG=1
# Configuration file for ksmtuned.
# How long ksmtuned should sleep between tuning adjustments
# KSM_MONITOR_INTERVAL=60
# Millisecond sleep between ksm scans for 16Gb server.
# Smaller servers sleep more, bigger sleep less.
# KSM_SLEEP_MSEC=10
# KSM_NPAGES_BOOST is added to the npages value, when free memory is less than thres.
# KSM_NPAGES_BOOST=300
# KSM_NPAGES_DECAY Value given is subtracted to the npages value, when free memory is greater than thres.
# KSM_NPAGES_DECAY=-50
# KSM_NPAGES_MIN is the lower limit for the npages value.
# KSM_NPAGES_MIN=64
# KSM_NAGES_MAX is the upper limit for the npages value.
# KSM_NPAGES_MAX=1250
# KSM_TRES_COEF - is the RAM percentage to be calculated in parameter thres.
# KSM_THRES_COEF=20
# KSM_THRES_CONST - If this is a low memory system, and the thres value is less than KSM_THRES_CONST, then reset thres value to KSM_THRES_CONST value.
# KSM_THRES_CONST=2048
# uncomment the following to enable ksmtuned debug information
# LOGFILE=/var/log/ksmtuned
# DEBUG=1
Copy to ClipboardCopied!Toggle word wrapToggle overflow