AIS Loader (aisloader)

View as Markdown

AIS Loader (aisloader) is a tool to measure storage performance. It is a load generator that we constantly use to benchmark and stress-test AIStore or any S3-compatible backend.

In fact, aisloader can list, write, and read S3(**) buckets directly, which makes it quite useful, convenient, and easy to use benchmark to compare storage performance with AIStore in front of S3 and without.

(**) aisloader can be further easily extended to work directly with any Cloud storage provider including, but not limited to, AIStore-supported GCP, OCI, and Azure.

In addition, aisloader generates synthetic workloads that mimic training and inference workloads - the capability that allows to run benchmarks in isolation (which is often preferable) avoiding compute-side bottlenecks (if any) and associated complexity.

There’s a large set of command-line switches that allow to realize almost any conceivable workload, with basic permutations always including:

  • number of workers
  • read and write sizes
  • read and write ratios

Detailed protocol-level tracing statistics are also available - see HTTP tracing section below for brief introduction.


October 2025 update: aisloader retains its StatsD integration for operational and benchmarking use cases. While AIStore itself now uses Prometheus exclusively, aisloader (for now) continues to emit its runtime metrics via StatsD — allowing DevOps to collect and visualize performance data from large aisloader fleets.

To integrate aisloader with Prometheus-based observability stacks, run the official Prometheus StatsD Exporter (which would translate aisloader’s StatsD metrics into Prometheus format).


Table of Contents

Setup

You can install aisloader using the following Bash script:

1./scripts/install_from_binaries.sh --help

Alternatively, you can also build the tool directly from the source:

1## uncomment if needed:
2## git clone https://github.com/NVIDIA/aistore.git
3## cd aistore
4##
5$ make aisloader

For usage, run: aisloader, aisloader usage, or aisloader --help.

For usage examples and extended commentary, see also:

Command Line Options

This section presents two alternative, intentionally redundant views for usability: a concise alphabetical quick reference for fast lookups, and a grouped-by-category presentation with explanations and examples for deeper understanding.

For the most recently updated command-line options and examples, please run aisloader or aisloader usage.

Quick Reference (Alphabetical)

Command-line optionTypeDescriptionDefault
-arch.formatstringArchive format (.tar, .tgz, .tar.gz, .zip, .tar.lz4).tar
-arch.minsizestringMinimum size of files inside shards, can contain multiplicative suffix""
-arch.maxsizestringMaximum size of files inside shards, can contain multiplicative suffix""
-arch.num-filesintNumber of archived files per shard (PUT only; 0 = auto-computed from file sizes)0
-arch.pctintPercentage of PUTs that create shards (0-100); does NOT affect GET operations0
-arch.prefixstringOptional prefix inside archive (e.g., trunk- or a/b/c/trunk-)""
-bpropsjsonJSON string formatted as per the SetBucketProps API and containing bucket properties to apply""
-bucketstringBucket name or bucket URI. If empty, aisloader generates a new random bucket name""
-cachedboolList in-cluster objects - only those objects from a remote bucket that are present (“cached”)false
-cksum-typestringChecksum type to use for PUT object requestsxxhash
-cleanupboolWhen true, remove bucket upon benchmark termination (must be specified for AIStore buckets)n/a (required)
-cont-on-errboolGetBatch: ignore missing files and/or objects - include them under __404__/ prefix and keep goingfalse
-dry-runboolShow the entire set of parameters that aisloader will use when actually runningfalse
-durationdurationBenchmark duration (0 - run forever or until Ctrl-C). If not specified and totalputsize > 0, runs until totalputsize reached1m
-epochsintNumber of “epochs” to run whereby each epoch entails full pass through the entire listed bucket0
-etlstringBuilt-in ETL, one of: tar2tf, md5, or echo. Each object that aisloader GETs undergoes the selected transformation""
-etl-specstringCustom ETL specification (pathname). Must be compatible with Kubernetes Pod specification""
-evict-batchsizeintBatch size to list and evict the next batch of remote objects1000
-fileliststringLocal or locally accessible text file containing object names (for subsequent reading)""
-get-batchsizeintUse GetBatch API (ML endpoint) instead of GetObject0
-getloaderidboolWhen true, print stored/computed unique loaderID and exitfalse
-ipstringAIS proxy/gateway IP address or hostnamelocalhost
-jsonboolWhen true, print the output in JSONfalse
-latestboolWhen true, check in-cluster metadata and possibly GET the latest object version from the associated remote bucketfalse
-list-dirsboolList virtual subdirectories (remote buckets only)false
-loaderidstringID to identify a loader among multiple concurrent instances0
-loaderidhashlenintSize (in bits) of the generated aisloader identifier. Cannot be used together with loadernum0
-loadernumintTotal number of aisloaders running concurrently and generating combined load. If defined, must be greater than the loaderid and cannot be used together with loaderidhashlen0
-maxputsintMaximum number of objects to PUT0
-maxsizestringMaximal object size, may contain multiplicative suffix1GiB
-minsizestringMinimal object size, may contain multiplicative suffix1MiB
-mpdstream-chunk-sizeintChunk size for multipart download stream, may contain multiplicative suffix (0 = API default: 8MiB)0
-mpdstream-workersintNumber of concurrent workers for multipart download stream (0 = API default: 16)0
-multipart-chunksintNumber of chunks for multipart upload (0 = disabled, >0 = use multipart with specified chunks)0
-num-subdirsintSpread generated objects over this many virtual subdirectories (< 100k)0
-numworkersintNumber of goroutine workers operating on AIS in parallel10
-pctmpdstreamintPercentage of GET operations that use multipart download stream (0-100)0
-pctmultipartintPercentage of PUT operations that use multipart upload (0-100, only applies when multipart-chunks > 0)0
-pctputintPercentage of PUTs in the aisloader-generated workload (see also: -arch.pct)0
-pctupdateintPercentage of GET requests that are followed by a PUT “update” (i.e., creation of a new version of the object)0
-perm-shuffle-maxintMax names for shuffle-based name-getter (above this uses O(1) memory affine)100000
-portstringAIS proxy/gateway port8080
-providerstringais for AIS bucket, aws, azure, gcp, oci for Amazon, Azure, Google, and Oracle clouds respectivelyais
-putshardsintDeprecated - use -num-subdirs instead0
-quietboolWhen starting to run, do not print command line arguments, default settings, and usage examplesfalse
-randomnameboolWhen true, generate object names of 32 random characters. This option is ignored when loadernum is definedtrue
-randomproxyboolWhen true, select random gateway (“proxy”) to execute each I/O requestfalse
-readertypestringType of reader: sg (default), file, rand, tarsg
-readlenstringRead range length, can contain multiplicative suffix""
-readoffstringRead range offset, can contain multiplicative suffix""
-s3endpointstringS3 endpoint to read/write S3 bucket directly (with no AIStore)""
-s3profilestringOther than default S3 config profile referencing alternative credentials""
-s3-use-path-styleboolUse older path-style addressing (e.g., https://s3.amazonaws.com/BUCKET/KEY). Should only be used with -s3endpointfalse
-seedintRandom seed to achieve deterministic reproducible results (0 = use current time in nanoseconds)0
-skiplistboolWhen true, skip listing objects in a bucket before running 100% PUT workloadfalse
-stats-outputstringFilename to log statistics (empty string = standard output)""
-statsdipstringDeprecated - StatsD IP address or hostnamelocalhost
-statsdportintDeprecated - StatsD UDP port8125
-statsdprobeboolDeprecated - Test-probe StatsD server prior to benchmarksfalse
-statsintervalintInterval in seconds to print performance counters (0 = disabled)10
-stoppableboolWhen true, allow termination via Ctrl-Cfalse
-subdirstringFor GET: prefix that may or may not be an actual virtual directory. For PUT: virtual destination directory for all generated objects. See CLI --prefix""
-timeoutdurationClient HTTP timeout (0 = infinity)10m
-tmpdirstringLocal directory to store temporary files/tmp/ais
-tokenfilestringAuthentication token (FQN)""
-totalputsizestringStop PUT workload once cumulative PUT size reaches or exceeds this value, can contain multiplicative suffix (0 = no limit)0
-trace-httpboolTrace HTTP latencies (see HTTP tracing)false
-uniquegetsboolWhen true, GET objects randomly and equally (i.e., avoid getting some objects more frequently than others)true
-usageboolShow command-line options, usage, and examplesfalse
-verifyhashboolChecksum-validate GET: recompute object checksums and validate against the one received with GET metadatafalse

Command Line Options Grouped by Category

Cluster Connection and API Configuration (clusterParams)

Command-line optionTypeDescriptionDefault
-ipstringAIS proxy/gateway IP address or hostnamelocalhost
-portstringAIS proxy/gateway port8080
-randomproxyboolWhen true, select random gateway (“proxy”) to execute each I/O requestfalse
-timeoutdurationClient HTTP timeout (0 = infinity)10m
-tokenfilestringAuthentication token (FQN)""
-s3endpointstringS3 endpoint to read/write S3 bucket directly (with no AIStore)""
-s3profilestringOther than default S3 config profile referencing alternative credentials""
-s3-use-path-styleboolUse older path-style addressing (e.g., https://s3.amazonaws.com/BUCKET/KEY). Should only be used with -s3endpointfalse

Target Bucket and Properties (bucketParams)

Command-line optionTypeDescriptionDefault
-bucketstringBucket name or bucket URI. If empty, aisloader generates a new random bucket name""
-providerstringais for AIS bucket, aws, azure, gcp, oci for Amazon, Azure, Google, and Oracle clouds respectivelyais
-bpropsjsonJSON string formatted as per the SetBucketProps API and containing bucket properties to apply""

Timing, Intensity, and Name-Getter Configuration (workloadParams)

Command-line optionTypeDescriptionDefault
-durationdurationBenchmark duration (0 - run forever or until Ctrl-C). If not specified and totalputsize > 0, runs until totalputsize reached1m
-numworkersintNumber of goroutine workers operating on AIS in parallel10
-pctputintPercentage of PUTs in the aisloader-generated workload (see also: -arch.pct)0
-pctupdateintPercentage of GET requests that are followed by a PUT “update” (i.e., creation of a new version of the object)0
-epochsintNumber of “epochs” to run whereby each epoch entails full pass through the entire listed bucket0
-perm-shuffle-maxintMax names for shuffle-based name-getter (above this uses O(1) memory affine)100000
-seedintRandom seed to achieve deterministic reproducible results (0 = use current time in nanoseconds)0
-maxputsintMaximum number of objects to PUT0
-totalputsizestringStop PUT workload once cumulative PUT size reaches or exceeds this value, can contain multiplicative suffix (0 = no limit)0
-skiplistboolWhen true, skip listing objects in a bucket before running 100% PUT workloadfalse
-uniquegetsboolWhen true, GET objects randomly and equally (i.e., avoid getting some objects more frequently than others)true

Object Size Constraints and Integrity (sizeCksumParams)

Command-line optionTypeDescriptionDefault
-minsizestringMinimal object size, may contain multiplicative suffix1MiB
-maxsizestringMaximal object size, may contain multiplicative suffix1GiB
-cksum-typestringChecksum type to use for PUT object requestsxxhash
-verifyhashboolChecksum-validate GET: recompute object checksums and validate against the one received with GET metadatafalse
-readertypestringType of reader: sg (default), file, rand, tarsg
-tmpdirstringLocal directory to store temporary files/tmp/ais

Archive/Shard Configuration (archParams)

Command-line optionTypeDescriptionDefault
-arch.formatstringArchive format (.tar, .tgz, .tar.gz, .zip, .tar.lz4).tar
-arch.prefixstringOptional prefix inside archive (e.g., trunk- or a/b/c/trunk-)""
-arch.num-filesintNumber of archived files per shard (PUT only; 0 = auto-computed from file sizes)0
-arch.minsizestringMinimum size of files inside shards, can contain multiplicative suffix""
-arch.maxsizestringMaximum size of files inside shards, can contain multiplicative suffix""
-arch.pctintPercentage of PUTs that create shards (0-100); does NOT affect GET operations0

Object Naming Strategy (namingParams)

Command-line optionTypeDescriptionDefault
-num-subdirsintSpread generated objects over this many virtual subdirectories (< 100k)0
-fileliststringLocal or locally accessible text file containing object names (for subsequent reading)""
-list-dirsboolList virtual subdirectories (remote buckets only)false
-randomnameboolWhen true, generate object names of 32 random characters. This option is ignored when loadernum is definedtrue
-subdirstringFor GET: prefix that may or may not be an actual virtual directory. For PUT: virtual destination directory for all generated objects. See CLI --prefix""
-putshardsintDeprecated - use -num-subdirs instead0

Read Operation Configuration (readParams)

Command-line optionTypeDescriptionDefault
-readoffstringRead range offset, can contain multiplicative suffix""
-readlenstringRead range length, can contain multiplicative suffix""
-get-batchsizeintUse GetBatch API (ML endpoint) instead of GetObject0
-latestboolWhen true, check in-cluster metadata and possibly GET the latest object version from the associated remote bucketfalse
-cachedboolList in-cluster objects - only those objects from a remote bucket that are present (“cached”)false
-evict-batchsizeintBatch size to list and evict the next batch of remote objects1000
-cont-on-errboolGetBatch: ignore missing files and/or objects - include them under __404__/ prefix and keep goingfalse

Multipart Upload Settings (multipartParams)

Command-line optionTypeDescriptionDefault
-multipart-chunksintNumber of chunks for multipart upload (0 = disabled, >0 = use multipart with specified chunks)0
-pctmultipartintPercentage of PUT operations that use multipart upload (0-100, only applies when multipart-chunks > 0)0

Multipart Download Stream Settings (mpdStreamParams)

Command-line optionTypeDescriptionDefault
-mpdstream-chunk-sizeint64Chunk size for multipart download stream, can contain multiplicative suffix (0 = API default: 8MiB)0
-mpdstream-workersintNumber of concurrent workers for multipart download stream (0 = API default: 16)0
-pctmpdstreamintPercentage of GET operations that use multipart download stream (0-100)0

ETL Configuration (etlParams)

Command-line optionTypeDescriptionDefault
-etlstringBuilt-in ETL, one of: tar2tf, md5, or echo. Each object that aisloader GETs undergoes the selected transformation""
-etl-specstringCustom ETL specification (pathname). Must be compatible with Kubernetes Pod specification""

Fleet Coordination (loaderParams)

Command-line optionTypeDescriptionDefault
-loaderidstringID to identify a loader among multiple concurrent instances0
-loadernumintTotal number of aisloaders running concurrently and generating combined load. If defined, must be greater than the loaderid and cannot be used together with loaderidhashlen0
-loaderidhashlenintSize (in bits) of the generated aisloader identifier. Cannot be used together with loadernum0
-getloaderidboolWhen true, print stored/computed unique loaderID and exitfalse

Statistics and Monitoring (statsParams)

Command-line optionTypeDescriptionDefault
-stats-outputstringFilename to log statistics (empty string = standard output)""
-statsintervalintInterval in seconds to print performance counters (0 = disabled)10
-jsonboolWhen true, print the output in JSONfalse
-statsdipstringDeprecated - StatsD IP address or hostnamelocalhost
-statsdportintDeprecated - StatsD UDP port8125
-statsdprobeboolDeprecated - Test-probe StatsD server prior to benchmarksfalse

Cleanup, Dry-Run, HTTP Tracing, Termination Control (miscParams)

Command-line optionTypeDescriptionDefault
-cleanupboolWhen true, remove bucket upon benchmark termination (must be specified for AIStore buckets)n/a (required)
-dry-runboolShow the entire set of parameters that aisloader will use when actually runningfalse
-trace-httpboolTrace HTTP latencies (see HTTP tracing)false
-stoppableboolWhen true, allow termination via Ctrl-Cfalse
-quietboolWhen starting to run, do not print command line arguments, default settings, and usage examplesfalse
-usageboolShow command-line options, usage, and examplesfalse

Assorted Command Line

Duration

The loads can run for a given period of time (option -duration <duration>) or until the specified amount of data is generated (option -totalputsize=<total size in KBs>).

If both options are provided the test finishes on the whatever-comes-first basis.

Example 100% write into the bucket “abc” for 2 hours:

1$ aisloader -bucket=abc -provider=ais -duration 2h -totalputsize=4000000 -pctput=100

The above will run for two hours or until it writes around 4GB data into the bucket, whatever comes first.

Write vs Read

You can choose a percentage of writing (versus reading) by setting the option -pctput=<put percentage>.

Example with a mixed PUT=30% and GET=70% load:

1$ aisloader -bucket=ais://abc -duration 5m -pctput=30 -cleanup=true

Example 100% PUT:

1$ aisloader -bucket=abc -duration 5m -pctput=100 -cleanup=true

The duration in both examples above is set to 5 minutes.

To test 100% read (-pctput=0), make sure to fill the bucket beforehand.

Read range

The loader can read the entire object (default) or a range of object bytes.

To set the offset and length to read, use option -readoff=<read offset (in bytes)> and readlen=<length to read (in bytes)>.

For convenience, both options support size suffixes: k - for KiB, m - for MiB, and g - for GiB.

Example that reads a 32MiB segment at 1KB offset from each object stored in the bucket “abc”:

1$ aisloader -bucket=ais://abc -duration 5m -cleanup=false -readoff=1024 -readlen=32m

The test (above) will run for 5 minutes and will not “cleanup” after itself (next section).

Cleanup

NOTE: -cleanup is a mandatory option defining whether to destroy bucket upon completion of the benchmark.

The option must be specified in the command line.

Example:

1$ aisloader -bucket=ais://abc -pctput=100 -totalputsize=16348 -cleanup=false
2$ aisloader -bucket=ais://abc -duration 1h -pctput=0 -cleanup=true

The first line in this example above fills the bucket “abc” with 16MiB of random data. The second - uses existing data to test read performance for 1 hour, and then removes all data.

If you just need to clean up old data prior to running a test, run the loader with 0 (zero) total put size and zero duration:

1$ aisloader -bucket=<bucket to cleanup> -duration 0s -totalputsize=0

Object size

For the PUT workload the loader generates randomly-filled objects. But what about object sizing?

By default, object sizes are randomly selected as well in the range between 1MiB and 1GiB. To set preferred (or fixed) object size(s), use the options -minsize=<minimal object size in KiB> and -maxsize=<maximum object size in KiB>

Setting bucket properties

Before starting a test, it is possible to set mirror or EC properties on a bucket (for background, please see storage services).

For background on local mirroring and erasure coding (EC), please see storage services.

To achieve that, use the option -bprops. For example:

1$ aisloader -bucket=ais://abc -pctput=0 -cleanup=false -duration 10s -bprops='{"mirror": {"copies": 2, "enabled": false}, "ec": {"enabled": false, "data_slices": 2, "parity_slices": 2}}'

The above example shows the values that are globally default. You can omit the defaults and specify only those values that you’d want to change. For instance, to enable erasure coding on the bucket “abc”:

1$ aisloader -bucket=ais://abc -duration 1h -bprops='{"ec": {"enabled": true}}' -cleanup=false

This example sets the number of data and parity slices to 2 which, in turn, requires the cluster to have at least 5 target nodes: 2 for data slices, 2 for parity slices and one for the original object.

Once erasure coding is enabled, its properties data_slices and parity_slices cannot be changed on the fly.

Note that (n data_slices, m parity_slices) erasure coding requires at least (n + m + 1) target nodes in a cluster.

Even though erasure coding and/or mirroring can be enabled/disabled and otherwise reconfigured at any point in time, specifically for the purposes of running benchmarks it is generally recommended to do it once prior to writing any data to the bucket in question.

The following sequence populates a bucket configured for both local mirroring and erasure coding, and then reads from it for 1h:

1# Fill bucket
2$ aisloader -bucket=ais://abc -cleanup=false -pctput=100 -duration 100m -bprops='{"mirror": {"enabled": true}, "ec": {"enabled": true}}'
3
4# Read
5$ aisloader -bucket=abc -cleanup=false -pctput=0 -duration 1h

Bytes Multiplicative Suffix

Parameters in aisLoader that represent the number of bytes can be specified with a multiplicative suffix. For example: 8M would specify 8 MiB. The following multiplicative suffixes are supported: ‘t’ or ‘T’ - TiB ‘g’ or ‘G’ - GiB, ‘m’ or ‘M’ - MiB, ‘k’ or ‘K’ - KiB. Note that this is entirely optional, and therefore an input such as 300 will be interpreted as 300 Bytes.


Environment variables

Environment VariableTypeDescription
AIS_ENDPOINTstringCluster’s endpoint: http or https address of any AIStore gateway in this cluster. Overrides ip and port flags.

To state the same slightly differently, cluster endpoint can be defined in two ways:

  • as (plain) http://ip:port address, whereby ‘—ip’ and ‘—port’ are command-line options.
  • via AIS_ENDPOINT environment universally supported across all AIS clients, e.g.:
1$ export AIS_ENDPOINT=https://10.07.56.68:51080

In addition, environment can be used to specify client-side TLS (aka, HTTPS) configuration:

var namedescription
AIS_CRTX.509 certificate
AIS_CRT_KEYX.509 certificate’s private key
AIS_CLIENT_CACertificate authority that authorized (signed) the certificate
AIS_SKIP_VERIFY_CRTwhen true, skip X.509 cert verification (usually enabled to circumvent limitations of self-signed certs)

See also:


Archive Workload

AIStore supports packing many small files into shards (TAR, ZIP, TGZ, LZ4-TAR) to improve performance and reduce metadata overhead.

AISLoader can benchmark both archive creation (PUT) and reading individual files from existing shards (GET).

Archive Parameters

ParameterDescription
-arch.pctPercentage of PUTs that create shards (0–100). Does not affect GET operations. 100 = all PUTs create shards; 30 = 30% shards, 70% plain objects.
-arch.formatArchive format: .tar (default), .tgz, .tar.gz, .zip, .tar.lz4.
-arch.num-filesFiles per shard for PUT. 0 = auto-computed from arch.minsize / arch.maxsize.
-arch.minsizeMinimum size of files inside shards (supports multiplicative suffixes).
-arch.maxsizeMaximum size of files inside shards (supports multiplicative suffixes).

When the bucket contains shards, aisloader automatically:

  1. Lists objects with archive expansion enabled
  2. Detects archived files (e.g., shard-987.tar/file-042.bin)
  3. Reads from them using the ?archpath= API parameter

The displayed statistics will show whether objects are plain or archived, e.g.:

1Found 108,959 plain objects and 1,089,590 archived files (91% archived)

Usage Examples

Create 100% shards (each containing 10 files)

1$ aisloader -bucket=ais://abc -pctput=100 -arch.pct=100 \
2 -arch.num-files=10 -arch.minsize=1K -arch.maxsize=100K \
3 -duration=5m -cleanup=false

All PUTs create shards; each shard contains 10 files between 1KB and 100KB.

Mixed workload: 30% shards, 70% plain objects

1$ aisloader -bucket=ais://abc -pctput=100 -arch.pct=30 \
2 -arch.num-files=10 -arch.minsize=1K -arch.maxsize=100K \
3 -duration=5m -cleanup=false

30% of PUT operations create shards; the rest create plain objects.

Read from existing shards

1$ aisloader -bucket=ais://abc -pctput=0 -duration=1h -cleanup=false

When the target bucket contains shards, aisloader automatically:

  1. Lists objects with archive expansion enabled
  2. Identifies archived files (e.g., photos.tar/00042.jpg)
  3. Issues GET requests using ?archpath= to retrieve individual files inside shards

Example startup message:

1Found 108,959 plain objects and 1,089,590 archived files (91% archived)

Create shards using a specific archive format

1$ aisloader -bucket=ais://abc -pctput=100 -arch.pct=100 -arch.format=.tgz -arch.num-files=20 -duration=5m -cleanup=false

Performance Considerations

  • Small-file workloads benefit greatly from sharding: fewer large objects → fewer metadata lookups → higher throughput.

  • Archived GETs add CPU overhead, especially for compressed formats (.tgz, .tar.lz4).

  • Throughput vs. operation rate tradeoff:

    • Large plain objects → high MB/s
    • Many tiny files inside shards → lower MB/s but similar (or higher) operations/sec

Example typical comparison:

  • Reading 16KB plain objects: ~250 MiB/s
  • Reading 1KB archived files: ~13 MiB/s, but with comparable GET operations/sec

Limitations

  • Multipart uploads of shards are not yet supported (requires streaming chunk writer).
  • Direct S3 access (-s3endpoint) does not support archive operations (sharding requires AIStore).

For more information about AIStore’s archive/shard support, see


Multipart Download Stream

aisloader can benchmark the MultipartDownloadStream API, which downloads a single object using multiple concurrent HTTP range requests. This improves single-object GET throughput for chunked objects by engaging multiple disks on the server side.

Configuration

FlagDescription
-pctmpdstreamPercentage of GETs that use multipart download stream (0-100)
-mpdstream-workersNumber of concurrent download workers per object (0 = API default: 16)
-mpdstream-chunk-sizeSize of each range request (0 = API default: 8MiB)

When -pctmpdstream is non-zero, the specified fraction of GET operations will use MultipartDownloadStream instead of regular single-stream GET. The remaining GETs use the standard path. Statistics for MPD stream operations are tracked separately (labeled GET-MPDSTREAM in the output).

Usage Example

100% read using multipart download stream with 32 workers:

1$ aisloader -bucket=ais://my_bucket -pctput=0 -duration=10m -numworkers=4 \
2 -pctmpdstream=100 -mpdstream-workers=32 -mpdstream-chunk-size=64MiB \
3 -cleanup=false

Mixed workload — 50% regular GET, 50% MPD stream:

1$ aisloader -bucket=ais://my_bucket -pctput=0 -duration=10m -numworkers=8 \
2 -pctmpdstream=50 -mpdstream-workers=16 -cleanup=false

Restrictions

  • Cannot be combined with -s3endpoint (direct S3 access)
  • Cannot be combined with -get-batchsize
  • Cannot be combined with -readoff / -readlen (range reads)

Get-Batch Support

With version 2.1, aisloader can now benchmark Get-Batch operations using the --get-batchsize flag (range: 1-1000). The tool consumes TAR streams (see note below), validates archived file counts, and tracks Get-Batch-specific statistics. The --continue-on-err flag enables testing of soft-error handling behavior.

Supported serialization formats include: .tar (default), .tar.gz, .tar.lz4, and .zip.

Random Access Across Very Large Collections

The tool uses the [name-getter] abstraction (see https://github.com/NVIDIA/aistore/blob/main/bench/tools/aisloader/namegetter/ng.go) to enable efficient random reads across very large collections: objects and archived files.

The --epochs N flag enables full-dataset read passes, with different algorithms selected automatically based on dataset size:

PermAffinePrime: For datasets larger than 100k (by default) objects, an affine transformation with prime modulus provides memory-efficient pseudo-random access without storing full permutations. The algorithm fills batch requests completely and may span epoch boundaries.

PermShuffle: For datasets up to (default) 100k objects, Fisher-Yates shuffle with uint32 indices (50% memory reduction compared to previous implementation).

Selection Logic:

WorkloadDataset SizeSelected Algorithm
Mixed read/write or non-epoched workloadsanyRandom / RandomUnique
Read-only<= 100k objects (default)PermShuffle
Read-only> 100k objects (—/—)PermAffinePrime

Command-line override to set the size threshold (instead of default 100k): --perm-shuffle-max flag.

Examples

For the most recently updated command-line options and examples, please run aisloader or aisloader usage.

1. Create a 10-seconds load of 50% PUT and 50% GET requests:

1$ aisloader -bucket=my_ais_bucket -duration=10s -pctput=50 -provider=ais
2Found 0 existing objects
3Run configuration:
4{
5 "proxy": "http://172.50.0.2:8080",
6 "provider": "ais",
7 "bucket": "my_ais_bucket",
8 "duration": "10s",
9 "put upper bound": 0,
10 "put %": 50,
11 "minimal object size in Bytes": 1024,
12 "maximum object size in Bytes": 1048576,
13 "worker count": 1,
14 "stats interval": "10s",
15 "backed by": "sg",
16 "cleanup": true
17}
18
19Actual run duration: 10.313689487s
20
21Time OP Count Total Bytes Latency(min, avg, max) Throughput Error
2201:52:52 Put 26 11.19GB 296.39ms 5.70s 14.91s 639.73MB 0
2301:52:52 Get 16 3.86GB 58.89ms 220.20ms 616.72ms 220.56MB 0
2401:52:52 CFG 0 0B 0.00ms 0.00ms 0.00ms 0B 0
2501:52:52 Clean up ...
2601:52:54 Clean up done

2. Time-based 100% PUT into ais bucket. Upon exit the bucket is destroyed:

1$ aisloader -bucket=nvais -duration 10s -cleanup=true -numworkers=3 -minsize=1K -maxsize=1K -pctput=100 -provider=ais

3. Timed (for 1h) 100% GET from a Cloud bucket, no cleanup:

1$ aisloader -bucket=aws://nvaws -duration 1h -numworkers=30 -pctput=0 -cleanup=false

4. Mixed 30%/70% PUT and GET of variable-size objects to/from a Cloud bucket. PUT will generate random object names and is limited by the 10GB total size. Cleanup enabled - upon completion all generated objects and the bucket itself will be deleted:

1$ aisloader -bucket=s3://nvaws -duration 0s -cleanup=true -numworkers=3 -minsize=1024 -maxsize=1MB -pctput=30 -totalputsize=10G

5. PUT 1GB total into an ais bucket with cleanup disabled, object size = 1MB, duration unlimited:

1$ aisloader -bucket=nvais -cleanup=false -totalputsize=1G -duration=0 -minsize=1MB -maxsize=1MB -numworkers=8 -pctput=100 -provider=ais

6. 100% GET from an ais bucket:

1$ aisloader -bucket=nvais -duration 5s -numworkers=3 -pctput=0 -provider=ais -cleanup=false

7. PUT 2000 objects named as aisloader/hex({0..2000}{loaderid}):

1$ aisloader -bucket=nvais -duration 10s -numworkers=3 -loaderid=11 -loadernum=20 -maxputs=2000 -objNamePrefix="aisloader" -cleanup=false

8. Use random object names and loaderID to report statistics:

1$ aisloader -loaderid=10

9. PUT objects with random name generation being based on the specified loaderID and the total number of concurrent aisloaders:

1$ aisloader -loaderid=10 -loadernum=20

10. Same as above except that loaderID is computed by the aisloader as hash(loaderstring) & 0xff:

1$ aisloader -loaderid=loaderstring -loaderidhashlen=8

11. Print loaderID and exit (all 3 examples below) with the resulting loaderID shown on the right:

1$ aisloader -getloaderid (0x0)
2$ aisloader -loaderid=10 -getloaderid (0xa)
3$ aisloader -loaderid=loaderstring -loaderidhashlen=8 -getloaderid (0xdb)

12. Destroy existing ais bucket. If the bucket is Cloud-based, delete all objects:

1$ aisloader -bucket=nvais -duration 0s -totalputsize=0 -cleanup=true

13. Generate load on a cluster listening on custom IP address and port:

1$ aisloader -ip="example.com" -port=8080

14. Generate load on a cluster listening on custom IP address and port from environment variable:

1$ AIS_ENDPOINT="examples.com:8080" aisloader

15. Use HTTPS when connecting to a cluster:

1$ aisloader -ip="https://localhost" -port=8080

16. PUT TAR files with random files inside into a cluster:

1$ aisloader -bucket=ais://my_bucket -duration=10s -pctput=100 -arch.pct=100 -arch.num-files=10 -arch.minsize=1K -arch.maxsize=10K -cleanup=false

17. Generate load on tar2tf ETL. New ETL is started and then stopped at the end. TAR files are PUT to the cluster. Only available when cluster is deployed on Kubernetes.

1$ aisloader -bucket=my_ais_bucket -duration=10s -pctput=100 -provider=ais -readertype=tar -etl=tar2tf -cleanup=false

18. Timed 100% GET directly from S3 bucket (notice ‘-s3endpoint’ command line):

1$ aisloader -bucket=s3://xyz -cleanup=false -numworkers=8 -pctput=0 -duration=10m -s3endpoint=https://s3.amazonaws.com

19. PUT approx. 8000 files into s3 bucket directly, skip printing usage and defaults. Similar to the previous example, aisloader goes directly to a given S3 endpoint (‘-s3endpoint’), and AIStore is not being used:

1 $ aisloader -bucket=s3://xyz -cleanup=false -minsize=16B -maxsize=16B -numworkers=8 -pctput=100 -totalputsize=128k -s3endpoint=https://s3.amazonaws.com -quiet

20. Generate a list of object names (once), and then run aisloader without executing list-objects:

1$ ais ls ais://nnn --props name -H > /tmp/a.txt
2$ aisloader -bucket=ais://nnn -duration 1h -numworkers=30 -pctput=0 -filelist /tmp/a.txt -cleanup=false

21. GetBatch example: read random batches each consisting of 64 archived files

1 $ ais ls ais://nnn --summary
2 NAME PRESENT OBJECTS SIZE (apparent, objects, remote) USAGE(%)
3 ais://nnn yes 108959 0 1.67GiB 1.66GiB 0B 0%
4
5 $ aisloader -bucket=ais://nnn -pctput=0 -duration=90m -numworkers=4 -cleanup=false -get-batchsize=64 --quiet -epochs 7 -cont-on-err
6 Found 1,089,590 archived files
7
8 Runtime configuration:
9 {
10 "proxy": "http://ais-endpoint:51080",
11 "bucket": "ais://nnn",
12 "duration": "1h30m0s",
13 "# workers": 4,
14 "stats interval": "10s",
15 "GET(batch): batch size": 64,
16 "archive (shards)": {
17 "% workload": 100,
18 "format": ".tar",
19 "minimum file size": 1024,
20 "maximum file size": 1048576
21 },
22 "name-getter": "unique epoch-based",
23 "cleanup": false
24 }
25
26 Time OP Count Size (Total) Latency (min, avg, max) Throughput (Avg) Errors (Total)
27 14:16:45 GBT 6,602 (6,602) 412.6MiB (412.6MiB) 4.399ms 6.030ms 22.278ms 41.26MiB/s (41.26MiB/s) -
28 14:16:55 GBT 6,397 (12,999) 399.8MiB (812.4MiB) 4.566ms 6.225ms 17.136ms 39.98MiB/s (40.62MiB/s) -
29 14:17:05 GBT 6,201 (19,200) 387.6MiB (1.2GiB) 4.609ms 6.424ms 22.505ms 38.75MiB/s (40.00MiB/s) -
30 14:17:15 GBT 6,127 (25,327) 382.9MiB (1.5GiB) 4.821ms 6.500ms 21.599ms 38.30MiB/s (39.57MiB/s) -
31 14:17:25 GBT 6,153 (31,480) 384.6MiB (1.9GiB) 4.765ms 6.473ms 23.135ms 38.46MiB/s (39.35MiB/s) -
32 ...

Collecting stats

Collecting is easy - aisloader supports at-runtime monitoring via with Graphite using StatsD. When starting up, aisloader will try to connect to provided StatsD server (see: statsdip and statsdport options). Once the connection is established the statistics from aisloader are send in the following format:

<metric_type>.aisloader.<hostname>-<loaderid>.<metric>
  • metric_type - can be: gauge, timer, counter
  • hostname - is the hostname of the machine on which the loader is ran
  • loaderid - see: -loaderid option
  • metric - can be: latency.*, get.*, put.*

Grafana

Grafana helps visualize the collected statistics. It is convenient to use and provides numerous tools to measure and calculate different metrics.

We provide simple script which allows you to set up the Graphite and Grafana servers which run inside separate dockers. To add new dashboards and panels, please follow: grafana tutorial.

When selecting a series in panel view, it should be in the format: stats.aisloader.<loader>.*. Remember that metrics will not be visible (and you will not be able to select them) until you start the loader.

HTTP tracing

Following is a brief illustrated sequence to enable detailed tracing, capture statistics, and toggle tracing on/off at runtime.

IMPORTANT NOTE:

The amount of generated (and extremely detailed) metrics can put a strain on your StatsD server. That’s exactly the reason for runtime switch to toggle HTTP tracing on/off. The example below shows how to do it (in particular, see kill -HUP).

1. Run aisloader for 90s (32 workers, 100% write, sizes between 1KB and 1MB) with detailed tracing enabled:

1$ aisloader -bucket=ais://abc -duration 90s -numworkers=32 -minsize=1K -maxsize=1M -pctput=50 --cleanup=false --trace-http=true

2. Have netcat listening on the default StatsD port 8125:

1$ nc 8125 -l -u -k
2
3# The result will look as follows - notice "*latency*" metrics (in milliseconds):
4
5...
6aisloader.u18044-0.put.latency.posthttp:0.0005412320409368235|ms|@0.000049
7aisloader.u18044-0.put.latency.proxyheader:0.06676835268647904|ms|@0.000049
8aisloader.u18044-0.put.latency.targetresponse:0.7371088368431411|ms|@0.000049aisproxy.DLEp8080.put.count:587262|caistarget.vuIt8081.kalive.ms:1|ms
9aistarget.vuIt8081.disk.sda.avg.rsize:58982|g
10aistarget.vuIt8081.disk.sda.avg.wsize:506227|g
11aistarget.vuIt8081.put.count:587893|c
12aistarget.vuIt8081.put.redir.ms:2|ms
13aistarget.vuIt8081.disk.sda.read.mbps:5.32|g
14aistarget.vuIt8081.disk.sda.util:3|gaisloader.u18044-0.get.count:0|caisloader.u18044-0.put.count:19339|caisloader.u18044-0.put.pending:7|g|@0.000052aisloader.u18044-0.put.latency:4.068928072806246|ms|@0.000052
15aisloader.u18044-0.put.minlatency:0|ms|@0.000052
16aisloader.u18044-0.put.maxlatency:60|ms|@0.000052aisloader.u18044-0.put.throughput:1980758|g|@0.000052aisloader.u18044-0.put.latency.posthttp:0.0005170898185014737|ms|@0.000052
17aisloader.u18044-0.put.latency.proxyheader:0.06742851233259217|ms|@0.000052
18aisloader.u18044-0.put.latency.proxyrequest:0.1034696726821449|ms|@0.000052
19aisloader.u18044-0.put.latency.targetheader:0.0699622524432494|ms|@0.000052
20aisloader.u18044-0.put.latency.targetrequest:0.09168002482031129|ms|@0.000052
21aisloader.u18044-0.put.latency.targetresponse:0.806660116862299|ms|@0.000052
22aisloader.u18044-0.put.latency.proxy:0.6616681317544858|ms|@0.000052
23aisloader.u18044-0.put.latency.targetconn:1.0948859816950205|ms|@0.000052
24aisloader.u18044-0.put.latency.proxyresponse:0.425616629608563|ms|@0.000052
25aisloader.u18044-0.put.latency.proxyconn:1.2669734732923108|ms|@0.000052
26aisloader.u18044-0.put.latency.target:1.0063602047675682|ms|@0.000052aisproxy.DLEp8080.put.count:605044|caistarget.vuIt8081.put.redir.ms:2|ms
27...

3. Finally, toggle detailed tracing on and off by sending aisoader SIGHUP:

1$ pgrep -a aisloader
23800 aisloader -bucket=ais://abc -duration 90s -numworkers=32 -minsize=1K -maxsize=1M -pctput=100 --cleanup=false --trace-http=true
3
4# kill -1 3800
5# or, same: kill -HUP 3800

The result:

1Time OP Count Size (Total) Latency (min, avg, max) Throughput (Avg) Errors (Total)
210:11:27 PUT 20,136 (20,136 8 0) 19.7MiB (19.7MiB) 755.308µs 3.929ms 42.493ms 1.97MiB/s (1.97MiB/s) -
3...
4Detailed latency info is disabled
5...
6
7# As stated, `SIGHUP` is a binary toggle - next time used it'll enable detailed trace with `aisloader printing:
8
9Detailed latency info is enabled

Note that other than --trace-http, all command-line options in this section are used for purely illustrative purposes.

AISLoader Composer

For benchmarking production-level clusters, a single AISLoader instance may not be able to fully saturate the load the cluster can handle. In this case, multiple aisloader instances can be coordinated via the AISLoader Composer. See the README for instructions on setting up.

References

For AIS observability (including CLI, Prometheus, and Kubernetes integration), please see:

For StatsD compliant backends, see:

Finally, for another supported - and alternative to StatsD - monitoring via Prometheus integration, see: