I'm working on an application using the sync API. In my tests I see best read throughput with 2 nbd connections which is unexpected.
The best way to investigate this is a benchmark using various combinations of request size and number of connections. I found that tests/synch-parallel already does mostly what I need. This series fixes this test and enhances it to make request size and number of connections configurable. Additional features I plan to add: - Configurable run time - for benchmarking, running 10 seconds is too fast. When running on a laptop, the first benchmark is usually faster since the CPU take time to heat and when it heats (I see 96c in my laptop) it slows down. We need to run 30 or 60 seconds for more consistent results. For CI, 10 seconds is way too slow, running for 0.1 seconds is enough to ensure the program still runs. - Configurable I/O type - (read, write, read-write). Testing manually show higher throughput for read-only test (3.9g/s) compared with 1.1g/s read and 1.1g/s write when reading and writing. Issues: - The test scripts is much slower now (120 seconds instead of 10). We need to to separate the benchmark, running many combinations (synch-parallel-bench.sh) and the test, running one combination (sync-parallel.sh). - tests/aio-parallel test seems to have the same issues and needs similar changes. Nir Soffer (6): tests/synch-parallel: Show thread run time tests/synch-parallel: Fix request loop time limit tests/synch-parallel: Remove unneeded memcpy tests/synch-parallel: Show throughput in MiB/s tests/synch-parallel: Test multiple request sizes tests/synch-parallel: Test multiple number of connections tests/synch-parallel.c | 121 +++++++++++++++++++++++++++++----------- tests/synch-parallel.sh | 17 ++++-- 2 files changed, 100 insertions(+), 38 deletions(-) -- 2.31.1 _______________________________________________ Libguestfs mailing list [email protected] https://listman.redhat.com/mailman/listinfo/libguestfs
