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: Fri, 5 Mar 2021 11:54:44 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

On 3/5/21 11:50 AM, Vladimir Sementsov-Ogievskiy wrote:
05.03.2021 19:30, John Snow wrote:
On 3/5/21 4:11 AM, Vladimir Sementsov-Ogievskiy wrote:
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 <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?


You mean, make this addition optional? Make sense



I was thinking (along the lines of allowing both old and new behavior, in case anyone except you used these scripts) of this sort of thing:

def bench_block_job(cmd, cmd_args, qemu_args, drop_cache=True): ...

I don't insist on it; I was just earnestly wondering if it had any utility. If it doesn't, don't respin on my account.


Ok, thanks a lot for reviewing! Still, I think, I'll resend


Thanks for sharing your benchmarking scripts :)

--js




reply via email to

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