From 5508c223a6bb2d5cb58cc20bedf4dc0cb689e5ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E8=87=B4=E9=82=A6=20=28XIE=20Zhibang=29?= Date: Fri, 17 Jun 2022 18:35:59 +0800 Subject: [PATCH] virtual-host: More aggressive writeback of dirty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "This enables more aggressive writeback of dirty memory pages, which benefits the host performance." Signed-off-by: 谢致邦 (XIE Zhibang) --- profiles/virtual-host/tuned.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/profiles/virtual-host/tuned.conf b/profiles/virtual-host/tuned.conf index 5301d9ff..ab451f9a 100644 --- a/profiles/virtual-host/tuned.conf +++ b/profiles/virtual-host/tuned.conf @@ -7,6 +7,15 @@ summary=Optimize for running KVM guests include=throughput-performance [sysctl] +# If a workload mostly uses anonymous memory and it hits this limit, the entire +# working set is buffered for I/O, and any more write buffering would require +# swapping, so it's time to throttle writes until I/O can catch up. Workloads +# that mostly use file mappings may be able to use even higher values. +# +# The generator of dirty data starts writeback at this percentage (system default +# is 20%) +vm.dirty_ratio = 10 + # Start background writeback (via writeback threads) at this percentage (system # default is 10%) vm.dirty_background_ratio = 5