05.03.2021 04:30, John Snow wrote:
On 3/4/21 5:17 AM, Vladimir Sementsov-Ogievskiy wrote:
It probably may improve reliability of results when testing in cached
mode.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>
---
  scripts/simplebench/bench_block_job.py | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/scripts/simplebench/bench_block_job.py 
b/scripts/simplebench/bench_block_job.py
index 4f03c12169..fa45ad2655 100755
--- a/scripts/simplebench/bench_block_job.py
+++ b/scripts/simplebench/bench_block_job.py
@@ -53,6 +53,8 @@ def bench_block_job(cmd, cmd_args, qemu_args):
          return {'error': 'qemu failed: ' + str(vm.get_log())}
      try:
+        subprocess.run('sync; echo 3 > /proc/sys/vm/drop_caches', shell=True,
+                       check=True)
          res = vm.qmp(cmd, **cmd_args)
          if res != {'return': {}}:
              vm.shutdown()


Worth adding a conditional to allow "hot" or "cold" runs? nah?


You mean, make this addition optional? Make sense


--
Best regards,
Vladimir

Reply via email to