I'm lukewarm of this series, but I've got a few comments on it as well
as some questions below.

- In nbdkit we have a function tvdiff_usec (see
  common/include/tvdiff.h).  Maybe we should use that instead of
  microtime?

- Rather than having a single test that does multiple runs (and so
  runs for a very long time), it's better to have multiple tests
  because they can run in parallel.  This is how it could be done (but
  see also my comment about benchmarks below).

  * Copy original tests/synch-parallel.sh to
    tests/synch-parallel-conn-1-request-4096.sh
    tests/synch-parallel-conn-1-request-262144.sh
    etc. (Or choose better names)

  * Each test does:
    CONNECTIONS=1 REQUEST_SIZE=4096 ./synch-parallel.sh (etc)

  * Original synch-parallel.sh is unchanged, but remove it from TESTS

  * Add the new scripts to TESTS

On Sun, Nov 14, 2021 at 09:21:39AM +0200, Nir Soffer wrote:
> 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.

I'm interested in why you're using the synchronous API.  I think it'll
inevitably be slower than using the asynch API because you can never
have multiple requests on a single TCP connection.

...
> - 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).

This is too long for tests.  I think there are really two conflicting
requirements - you want to benchmark the synchronous API, which is a
worthwhile but separate goal from testing that things are working.

Should we consider having benchmarks in a separate directory or even a
separate git repo?  (Separate repo is what I did for libguestfs).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW

_______________________________________________
Libguestfs mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to