Skip to content

Commit a2297c1

Browse files
benchmark/nixlbench: POSIX backend – LINUXAIO API
This patch adds support for a POSIX LINUXAIO API using the Linux AIO plugin. Signed-off-by: Anton Nayshtut <[email protected]>
1 parent 61c4760 commit a2297c1

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

benchmark/kvbench/commands/args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def nixl_bench_args(func):
170170
func = click.option(
171171
"--posix_api_type",
172172
type=str,
173-
help="API type for POSIX operations [AIO, URING] (only used with POSIX backend",
173+
help="API type for POSIX operations [AIO, URING, LINUXAIO] (only used with POSIX backend",
174174
)(func)
175175
func = click.option(
176176
"--enable_vmm",

benchmark/nixlbench/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ sudo systemctl start etcd && sudo systemctl enable etcd
465465

466466
**POSIX Backend:**
467467
```
468-
--posix_api_type TYPE # API type for POSIX operations [AIO, URING] (default: AIO)
468+
--posix_api_type TYPE # API type for POSIX operations [AIO, URING, LINUXAIO] (default: AIO)
469469
```
470470

471471
**GPUNETIO Backend:**

benchmark/nixlbench/src/utils/utils.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@ DEFINE_string(etcd_endpoints,
102102
"ETCD server endpoints for communication (optional for storage backends)");
103103

104104
// POSIX options - only used when backend is POSIX
105-
DEFINE_string (posix_api_type,
106-
XFERBENCH_POSIX_API_AIO,
107-
"API type for POSIX operations [AIO, URING] (only used with POSIX backend)");
105+
DEFINE_string(
106+
posix_api_type,
107+
XFERBENCH_POSIX_API_AIO,
108+
"API type for POSIX operations [AIO, URING, LINUXAIO] (only used with POSIX backend)");
108109

109110
// DOCA GPUNetIO options - only used when backend is DOCA GPUNetIO
110111
DEFINE_string(gpunetio_device_list, "0", "Comma-separated GPU CUDA device id to use for \
@@ -211,9 +212,10 @@ xferBenchConfig::loadFromFlags() {
211212

212213
// Validate POSIX API type
213214
if (posix_api_type != XFERBENCH_POSIX_API_AIO &&
214-
posix_api_type != XFERBENCH_POSIX_API_URING) {
215+
posix_api_type != XFERBENCH_POSIX_API_URING &&
216+
posix_api_type != XFERBENCH_POSIX_API_LINUXAIO) {
215217
std::cerr << "Invalid POSIX API type: " << posix_api_type
216-
<< ". Must be one of [AIO, URING]" << std::endl;
218+
<< ". Must be one of [AIO, URING, LINUXAIO]" << std::endl;
217219
return -1;
218220
}
219221
}
@@ -412,7 +414,7 @@ xferBenchConfig::printConfig() {
412414

413415
// Print POSIX options if backend is POSIX
414416
if (backend == XFERBENCH_BACKEND_POSIX) {
415-
printOption ("POSIX API type (--posix_api_type=[AIO,URING])", posix_api_type);
417+
printOption("POSIX API type (--posix_api_type=[AIO,URING,LINUXAIO])", posix_api_type);
416418
}
417419

418420
// Print OBJ options if backend is OBJ

benchmark/nixlbench/src/utils/utils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
// POSIX API types
8080
#define XFERBENCH_POSIX_API_AIO "AIO"
8181
#define XFERBENCH_POSIX_API_URING "URING"
82+
#define XFERBENCH_POSIX_API_LINUXAIO "LINUXAIO"
8283

8384
// OBJ S3 scheme types
8485
#define XFERBENCH_OBJ_SCHEME_HTTP "http"

benchmark/nixlbench/src/worker/nixl/nixl_worker.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,15 @@ xferBenchNixlWorker::xferBenchNixlWorker(int *argc, char ***argv, std::vector<st
162162
if (xferBenchConfig::posix_api_type == XFERBENCH_POSIX_API_AIO) {
163163
backend_params["use_aio"] = "true";
164164
backend_params["use_uring"] = "false";
165+
backend_params["use_linux_aio"] = "false";
165166
} else if (xferBenchConfig::posix_api_type == XFERBENCH_POSIX_API_URING) {
166167
backend_params["use_aio"] = "false";
167168
backend_params["use_uring"] = "true";
169+
backend_params["use_linux_aio"] = "false";
170+
} else if (xferBenchConfig::posix_api_type == XFERBENCH_POSIX_API_LINUXAIO) {
171+
backend_params["use_aio"] = "false";
172+
backend_params["use_uring"] = "false";
173+
backend_params["use_linux_aio"] = "true";
168174
}
169175
std::cout << "POSIX backend with API type: " << xferBenchConfig::posix_api_type
170176
<< std::endl;

0 commit comments

Comments
 (0)