summaryrefslogtreecommitdiffstats
path: root/modules-available/vmstore
diff options
context:
space:
mode:
authorSimon Rettberg2023-06-05 16:42:41 +0200
committerSimon Rettberg2023-06-05 16:42:41 +0200
commit5ea88c06dce17352d166f7a637dccbaf88586b03 (patch)
treee30f62936880f39cab0eb9dde80b9ef21e04d759 /modules-available/vmstore
parent[vmstore] Add usage hint when directly navigating to benchmark subpage (diff)
downloadslx-admin-5ea88c06dce17352d166f7a637dccbaf88586b03.tar.gz
slx-admin-5ea88c06dce17352d166f7a637dccbaf88586b03.tar.xz
slx-admin-5ea88c06dce17352d166f7a637dccbaf88586b03.zip
[vmstore] Continuously drop caches while benchmarking
Diffstat (limited to 'modules-available/vmstore')
-rw-r--r--modules-available/vmstore/inc/vmstorebenchmark.inc.php12
1 files changed, 9 insertions, 3 deletions
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 = <<<COMMAND
(
-exec &> /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);