nench icon indicating copy to clipboard operation
nench copied to clipboard

Getting rid of the static ioping binary

Open n-st opened this issue 5 years ago • 1 comments

The static binary was originally added for three reasons:

  • Less effort and system clutter:
    Among nench's software requirements, ioping is arguably the most uncommon and least likely to be present by default.
    Providing the static binary avoids additional installations, at least on binary-compatible systems (Linux amd64 in this case).

  • Consistent output format:
    ioping's output format changed between version 0.9 and 1.0, but 1.0 still reports the old version:

    % apt-cache policy ioping
    ioping:
      Installed: 1.0-2
      Candidate: 1.0-2
      Version table:
     *** 1.0-2 500
            500 http://httpredir.debian.org/debian stretch/main amd64 Packages
            100 /var/lib/dpkg/status
    % ioping -v
    ioping 0.9
    

    The same happens with the static binary, but there I can be certain which version it is (and parse the output appropriately).

  • Consistent test scope:
    ioping 1.0 added a second summary line (marked with > below) that reports iops and throughput for the full deadline period (-w) requested on the commandline, rather than the old summary that excludes data from some of the probes (such as the "warmup" at the beginning):

    % ioping -DRL -w 5 . # ioping 0.9
    
    --- . ( ) ioping statistics ---
    301 requests completed in 5.11 s, 58 iops, 14.7 MiB/s
    min/avg/max/mdev = 778 us / 17.0 ms / 236.0 ms / 31.4 ms
    
    % ioping -DRL -w 5 . # ioping 1.0
    
    --- . ( ) ioping statistics ---
    1.65 k requests completed in 4.99 s, 413.5 MiB read, 331 iops, 82.9 MiB/s
    > generated 1.66 k requests in 5.00 s, 413.8 MiB, 330 iops, 82.7 MiB/s
    min/avg/max/mdev = 2.75 ms / 3.01 ms / 66.0 ms / 2.10 ms
    

Long story short, the static binary could be made superfluous by switching to the "opportunistic" summary line (which is present in both old and new versions) and selecting it by its content rather than its position in the output.

It would also be possible to use the -B option (which I wasn't aware of when I created nench, but which is present even in older versions) and parse the "raw" output it produces. It may be possible to re-use the Bps_to_MiBps formatter that's already used for the dd and curl output.

The primary disadvantages would be potentially breaking comparability between old and new nench results, and requiring the installation of ioping just for the test.
Perhaps offer the static binary for manual installation (then documented in the README) and use only the system-installed version if the user doesn't request otherwise?

n-st avatar Mar 01 '19 11:03 n-st

+1, to enable this to work on ARM platforms (like ampere altra)

gtxaspec avatar Jul 07 '21 03:07 gtxaspec