qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 8/8] simplebench/bench_block_job: drop caches before test


From: John Snow
Subject: Re: [PATCH v2 8/8] simplebench/bench_block_job: drop caches before test run
Date: Thu, 4 Mar 2021 20:30:58 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

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 <vsementsov@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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]