Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
kingcrimsontianyu committed Nov 4, 2024
1 parent 51290b7 commit 9dd1662
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions run_benchmark_2/run_fio.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,18 @@ def __init__(self, config: dict):
self.fileSizeIncrementPerThread: FileSize = FileSize(
int(self.fileSize.toB() / self.numThreads))

self._drop_cache()

def _drop_cache(self):
subprocess.run(["sync"])

fullCmd = "sudo /sbin/sysctl vm.drop_caches=3"
cmdList = fullCmd.split()
subprocess.run(cmdList)

def _showInfo(self):
print("--> fio version")
fullCmd = "fio --version"
fullCmd = f"{self.fioBin} --version"
cmdList = fullCmd.split()
subprocess.run(cmdList)

Expand Down Expand Up @@ -173,7 +182,16 @@ def testAll(configBase):
engineList = ["psync", "sync", "io_uring", "libaio", "posixaio", "mmap"]
for engine in engineList:
config["engine"] = engine
config["iodepth"] = 1
az = Analyzer(config)
az.run()

def testAsync(configBase):
config = copy.deepcopy(configBase)

engineList = ["io_uring", "libaio", "posixaio"]
for engine in engineList:
config["engine"] = engine
config["iodepth"] = 4
az = Analyzer(config)
az.run()

Expand Down Expand Up @@ -205,8 +223,9 @@ def testCufile(configBase):
configBase = {
"fio_bin": "/mnt/fio/install/bin/fio",
"benchname": "seq_read_and_write",
# "directory": "/mnt/profile",
"directory": ".",
"filesize": FileSize("1 GiB"),
"filesize": FileSize("4 GiB"),
"blocksize": FileSize("4 MiB"),
"num_threads": 4,
"iodepth": 1,
Expand All @@ -215,7 +234,6 @@ def testCufile(configBase):

testAll(configBase)

testCufile(configBase)


testAsync(configBase)

testCufile(configBase)

0 comments on commit 9dd1662

Please sign in to comment.