diff options
author | Simon Rettberg | 2023-06-05 16:42:41 +0200 |
---|---|---|
committer | Simon Rettberg | 2023-06-05 16:42:41 +0200 |
commit | 5ea88c06dce17352d166f7a637dccbaf88586b03 (patch) | |
tree | e30f62936880f39cab0eb9dde80b9ef21e04d759 /modules-available/vmstore | |
parent | [vmstore] Add usage hint when directly navigating to benchmark subpage (diff) | |
download | slx-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.php | 12 |
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); |