Commit db026688 authored by Marcin Spiewak's avatar Marcin Spiewak Committed by Tomasz Zawadzki
Browse files

bdevperf/bdevperf.py: extend RPC timeout if needed



This patch is created to automatically extend
RPC timeout, which by default is set to 60 sec.,
if someone starts a test with longer duration.
E.g. the call like this:
bdevperf.py perform_tests -q 16 -o 4096 -w write -t 70
would normally result in RPC timeout during waiting for
the response, because the scheduled test will take ~70 seconds,
while the RPC timeout is 60. With this change, RPC timeout
will be set to 75 sec (5 sec longer than expected test), to
allow ample time for the test to complete.

Also, if the user explicitly specifies RPC timeout that is
shorter than the test duration, it will also be extended to
allow time for the test to complete.
I.e., for the call:
bdevperf.py -t 10 perform_tests -q 16 -o 4096 -w write -t 30
the RPC timeout will be automatically extended to 35 sec,
even though the user specified 10 sec (which is insufficient
in this case)

Change-Id: I094f2d2e27b1d363f81977394d6c2fe8f39773eb
Signed-off-by: default avatarMarcin Spiewak <marcin.spiewak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23776


Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 2d64c287
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -97,6 +97,8 @@ if __name__ == "__main__":
            call_rpc_func(args)

    args = parser.parse_args()
    if args.time_in_sec is not None:
        args.timeout = max(float(args.time_in_sec + 5), args.timeout)
    args.client = rpc.client.JSONRPCClient(args.server_addr, args.port, args.timeout, log_level=getattr(logging, args.verbose.upper()))
    if hasattr(args, 'func'):
        call_rpc_func(args)