From 5ea88c06dce17352d166f7a637dccbaf88586b03 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 5 Jun 2023 16:42:41 +0200 Subject: [vmstore] Continuously drop caches while benchmarking --- modules-available/vmstore/inc/vmstorebenchmark.inc.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'modules-available/vmstore') diff --git a/modules-available/vmstore/inc/vmstorebenchmark.inc.php b/modules-available/vmstore/inc/vmstorebenchmark.inc.php index 3a696d04..b13f4e37 100644 --- a/modules-available/vmstore/inc/vmstorebenchmark.inc.php +++ b/modules-available/vmstore/inc/vmstorebenchmark.inc.php @@ -53,9 +53,15 @@ class VmStoreBenchmark // do this the easy, synchronous way, we never could run more than four tests at the same time. $command = << /dev/null < /dev/null -setsid -image_speedcheck --start $start --console $modeOption --file "$image" > "/tmp/speedcheck-$id" + exec &> /dev/null < /dev/null + setsid + while true; do + echo 3 > /proc/sys/vm/drop_caches + sleep 1 + done & + flush=\$! + image_speedcheck --start $start --console $modeOption --file "$image" > "/tmp/speedcheck-$id" + kill \$flush ) & COMMAND; $task = RebootControl::runScript($clients, $command); -- cgit v1.2.3-55-g7522