Ray's Knowledge Base
Unlock

Run doca_bench decompress on a host as a steady engine load

RecipeVerified 1 Oct 2026Holds anywhere
Recipe. When to use it, the steps, and what showed that they work.

When to use#

You want a second client on a BlueField or ConnectX compress engine, for example to cause contention for another program, with NVIDIA's own doca_bench and no code of your own.

Steps#

  1. Make one raw-deflate input file (no zlib or gzip header). Python's zlib with wbits=-15 writes one:

    python3 -c '
    import os, sys, zlib
    c = zlib.compressobj(6, zlib.DEFLATED, -15)
    d = os.urandom(1 << 19) + bytes(1 << 19)
    open(sys.argv[1], "wb").write(c.compress(d) + c.flush())
    ' in.deflate
    echo "$PWD/in.deflate" > in.list
    
  2. Use the file-set data provider with a list file. The file provider cuts the input into equal jobs: it needs --uniform-job-size and fails without it ("Uniform data size must not be 0 when using file data provider"), and a slice of a deflate stream is not valid deflate input.

  3. Name the algorithm with an attribute. Without it the step fails with "Unable to create DOCA Compress instance. No algorithm selected."

  4. Give an output buffer as large as the uncompressed job, pin the worker with --core-list, and bound the run with --run-limit-seconds:

    /opt/mellanox/doca/tools/doca_bench --device c3:00.0 --core-list 60 \
        --pipeline-steps doca_compress::decompress \
        --data-provider file-set --data-provider-input-file in.list \
        --attribute doca_compress.algorithm=deflate \
        --job-output-buffer-size 1048576 --run-limit-seconds 3600
    
  5. Use the DOCA install that has the compress library. A DOCA tree that lacks it fails with "doca_compress library is not installed", because doca_bench opens the library at run time.

Evidence#

Built for the dpucrumbs hidden-cause cells on an x86 host with a BlueField-3 (system DOCA 3.2). The file provider and a missing algorithm attribute failed with the messages above. A staged DOCA 3.0 tree with only common, argp and rdma libraries failed with "doca_compress library is not installed". The steps above ran 201,182 jobs in 5 s (40,210 ops/s). Run beside an HDF5 reader on the same engine, it slowed the reader's chunk time from 630 to 3757 us.

Also found by searching

  • Uniform data size must not be 0 when using file data provider
  • Unable to create DOCA Compress instance. No algorithm selected.
  • doca_compress library is not installed
  • how do I run doca_bench decompress in a loop as a load generator