Skip to navigation

AIS Loader (aisloader)

View as MarkdownOpen in Claude

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:

./scripts/install_from_binaries.sh --help

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

## uncomment if needed:
## git clone https://github.com/NVIDIA/aistore.git
## cd aistore
##
$ make aisloader

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

Testing

The end-to-end tests require a running cluster. To deploy one locally, see local playground. The ETL test additionally requires an ETL-enabled Kubernetes cluster. To deploy one locally, follow Local K8s Deployment using make etl, and set AIS_ENDPOINT as shown there.

$ make aisloader # rebuild the binary the end-to-end tests run (from PATH)
$ make test-aisloader-unit # unit tests (no cluster needed)
$ make test-aisloader # end-to-end tests
$ TEST_TAGS=etl make test-aisloader # plus the ETL test

Environment variables:

  • AIS_ENDPOINT: Cluster endpoint (default: http://localhost:8080).
  • BUCKET: Bucket to test against (default: a new ais:// bucket, destroyed afterward). For an existing bucket, only the objects the tests create are deleted.
  • DURATION: Base run time per stage (default: 20s).

YAML Configuration

Load runtime settings from a YAML file with -config:

$ aisloader -config=./workload.yaml

Values follow CLI parsing rules, whether quoted or unquoted. See the complete sample for available settings.

  • Explicit CLI flags take precedence over config values.
  • Missing or null values leave a setting unset.
  • Unknown or duplicate keys, nested values, and CLI-only flags (e.g. -dry-run) are rejected.
  • Existing environment rules still apply. Relative paths resolve from the working directory.

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.listboolTreat the bucket as archive-aware on listing/GET (enumerate inner files; enables archpath-selective GetBatch). Required for read-only archpath workloads (-pctput=0)false
-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). For pure-read archpath workloads, set -arch.list instead0
-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, delete objects PUT by this run and destroy the bucket only if this run created it. Required with -bucketfalse
-configstringLoad runtime settings from a YAML file; explicit CLI flags take precedence""
-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 - no time limit; requires -totalputsize, -epochs, or -stoppable). 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: transformer-echo, tar2tf, transformer-md5, or parquet-parser. Each object that aisloader GETs undergoes the selected transformation""
-etl-specstringCustom ETL runtime specification (pathname)""
-evict-batchsizeintBatch size for deleting objects PUT by this run on cleanup (-cleanup=true)1000
-fileliststringLocal or locally accessible text file containing object names (for subsequent reading)""
-filelist-objstringobject URI of a list of object names to read, one per line (fetched through AIS). To write one, see Writing an object-name list""
-get-batchsizeintUse GetBatch API (ML endpoint) instead of GetObject0
-getloaderidboolWhen true, print stored/computed unique loaderID and exitfalse
-idle-conns-per-hostintMaximum idle (keep-alive) connections per host, AIS gateway or S3 endpoint (0 = size the pool to the concurrent workload, minimum 32)0
-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
-list-outstringObject URI to write listed object names to, one per line, and exit. See Writing an object-name list""
-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
-nbiboolList via native bucket inventory (NBI) snapshot. Remote buckets only; the inventory must already exist - aisloader does not create itfalse
-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; random selects a random offset for each GET (see Read range)""
-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
-split-readsboolWhen true, each loader only GETs a share of the object names; requires -loaderid and -loadernum (see Splitting reads across loaders)false
-stats-outputstringFilename to log statistics (empty string = standard output)""
-stats-output-objstringURI of an object in a local AIS bucket to save statistics after the run""
-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
-idle-conns-per-hostintMaximum idle (keep-alive) connections per host, AIS gateway or S3 endpoint (0 = size the pool to the concurrent workload, minimum 32)0
-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 - no time limit; requires -totalputsize, -epochs, or -stoppable). 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.listboolTreat the bucket as archive-aware on listing/GET (enumerate inner files; enables archpath-selective GetBatch). Required for read-only archpath workloads (-pctput=0)false
-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). For pure-read archpath workloads, set -arch.list instead0

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)""
-filelist-objstringobject URI of a list of object names to read, one per line (fetched through AIS). To write one, see Writing an object-name list""
-list-dirsboolList virtual subdirectories (remote buckets only)false
-list-outstringObject URI to write listed object names to, one per line, and exit. See Writing an object-name list""
-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; random selects a random offset for each GET (see Read range)""
-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
-nbiboolList via native bucket inventory (NBI) snapshot. Remote buckets only; the inventory must already exist - aisloader does not create itfalse
-evict-batchsizeintBatch size for deleting objects PUT by this run on cleanup (-cleanup=true)1000
-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: transformer-echo, tar2tf, transformer-md5, or parquet-parser. Each object that aisloader GETs undergoes the selected transformation""
-etl-specstringCustom ETL runtime specification (pathname)""

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
-split-readsboolWhen true, each loader only GETs a share of the object names; requires -loaderid and -loadernum (see Splitting reads across loaders)false
-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)""
-stats-output-objstringURI of an object in a local AIS bucket to save statistics after the run""
-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, Config, Dry-Run, HTTP Tracing, Termination Control (miscParams)

Command-line optionTypeDescriptionDefault
-cleanupboolWhen true, delete objects PUT by this run and destroy the bucket only if this run created it. Required with -bucketfalse
-configstringLoad runtime settings from a YAML file; explicit CLI flags take precedence""
-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:

$ 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:

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

Example 100% PUT:

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

Object-name lists

Use -filelist (local text file) or -filelist-obj (remote text object) to supply object names instead of listing the workload bucket. Use one object name per line.

training/image-001.jpg
training/image-002.jpg

Read these objects from an existing bucket:

$ aisloader -bucket=ais://images -filelist=names.txt -pctput=0 -duration=10s -cleanup=false
$ ais create ais://lists
$ ais put names.txt ais://lists/names.txt
$ aisloader -bucket=ais://images -filelist-obj=ais://lists/names.txt -pctput=0 -duration=10s -cleanup=false

The list object can be in any bucket AIS can access. Names refer to objects in -bucket; -subdir does not modify nor filter them. Mixed workloads can also GET objects successfully PUT during the run. The supplied list is unchanged.

List format and restrictions:

  • Surrounding whitespace is trimmed. Blank lines and names containing whitespace are skipped.
  • -filelist and -filelist-obj are mutually exclusive. Either option overrides -skiplist.
  • -filelist-obj cannot be combined with -s3endpoint (direct S3 access). An S3-hosted list must be read through AIS.
  • Failure to open, fetch, or read the list stops startup. Missing workload objects are reported as GET errors during the run.

Writing an object-name list

Use -list-out to list a bucket and save the names for later runs or for use on split reads (see Splitting reads across loaders). Aisloader lists objects with the same options as a benchmark run (-subdir, -cached, -list-dirs, -nbi, -arch.list), writes the names to a single object, one per line, and exits.

$ aisloader -config=get.yaml -list-out=ais://lists/run-1.txt
  • The destination bucket must already exist. An existing list is overwritten with a warning. Writing to the benchmark bucket, or an empty listing, also prints a warning.
  • With -arch.list, each file inside an archive is a separate entry (the archive name and the file’s path, separated by a NUL byte), and archives themselves are not listed. The first GET of any file in an archive that is not yet in the cluster brings in the whole archive, so turn -arch.list off for cold-GET benchmarks.
  • -list-out is CLI-only and cannot be combined with -dry-run, -filelist, -filelist-obj, -getloaderid, or -s3endpoint.

Splitting reads across loaders

With -split-reads, several aisloader instances can read the same objects without overlap. Each instance reads only its share of the object names, whether they are listed from -bucket or read from -filelist or -filelist-obj. Every name belongs to exactly one loader, even when loaders list the bucket at different times.

# loader 0 of 4 (run loaders 1, 2 and 3 the same way)
$ aisloader -bucket=ais://images -filelist-obj=ais://lists/names.txt -loaderid=0 -loadernum=4 -split-reads -pctput=0 -duration=10s -cleanup=false
  • -split-reads requires -loaderid, -loadernum, and a workload that reads (-pctput below 100). Without it, every loader reads every name.
  • Shares are close to equal only for large lists. In a 100% read run (-pctput=0), a loader whose share has fewer than 2 names stops at startup.
  • With -arch.list, names are split by shard, so all files in a shard go to the same loader.

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.

Note that -readoff takes effect only when -readlen is greater than zero; otherwise, the loader reads entire objects.

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

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

To read a different segment on each GET, use -readoff=random. For each GET, the loader selects a random offset such that the entire -readlen range fits within the object; objects that are not larger than -readlen are read from the beginning.

-readoff=random requires -readlen and uses object sizes from the bucket listing, refreshed from each GET response. It cannot be combined with -filelist, -filelist-obj, archive options (-arch.list, -arch.pct), -pctmpdstream, or -pctupdate, and is ignored in 100% PUT workloads.

Cleanup

NOTE: -cleanup defines whether to delete objects PUT by the run upon completion of the benchmark. The bucket is destroyed only if the run created it.

The option is required whenever -bucket is specified, either on the command line or in the config file.

Example:

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

The first line in this example above fills the bucket “abc” with 16MiB of random data. The latter uses existing data to test mixed read/write performance for 1 hour, and then removes the objects it wrote.

Objects the run did not PUT are preserved. When the benchmark bucket already exists and the workload has PUTs, -cleanup=true is incompatible with options that make object names repeat across runs: -randomname=false, -loadernum, -loaderidhashlen, or a non-zero -seed. PUT “updates” (-pctupdate) overwrite existing objects but are not deleted on cleanup.

To destroy a bucket, use ais bucket rm <BUCKET>. Alternatively, to empty a bucket, use ais object rm <BUCKET> --all.

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:

$ 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”:

$ 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:

# Fill bucket
$ aisloader -bucket=ais://abc -cleanup=false -pctput=100 -duration 100m -bprops='{"mirror": {"enabled": true}, "ec": {"enabled": true}}'
# Read
$ 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.:
$ 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.formatArchive format: .tar (default), .tgz, .tar.gz, .zip, .tar.lz4.
-arch.listTreat the bucket as archive-aware on listing/GET. Enables archpath-selective GetBatch reads. Required for read-only archpath workloads.
-arch.prefixOptional prefix inside archive (e.g., trunk- or a/b/c/trunk-)
-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).
-arch.pctPercentage of PUTs that create shards (0-100). 100 = all PUTs create shards; 30 = 30% shards, 70% plain objects. For pure-read archpath workloads (-pctput=0), set -arch.list instead.

When -arch.pct > 0 (PUT workloads that create shards) or -arch.list is set (read workloads), aisloader:

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

Without either flag, an archive bucket is treated as a flat object store — GETs and GetBatch fetch whole shards, not inner files.

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

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

Usage Examples

Create 100% shards (each containing 10 files)

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

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

Mixed workload: 30% shards, 70% plain objects

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

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

Read from existing shards (archpath-aware)

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

-arch.list is required for read-only archpath workloads — without it, listing returns shard names only and GET / GetBatch fetch whole shards.

With -arch.list set, aisloader:

  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:

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

Create shards using a specific archive format

$ 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:

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

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

$ aisloader -bucket=ais://my_bucket -pctput=0 -duration=10m -numworkers=8 \
-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.

With -epochs, each name in a GetBatch request counts toward the run’s read limit. Batches may cross epoch boundaries. The final batch is shortened when fewer than -get-batchsize reads remain.

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 in read-only workloads (-pctput=0 and -pctupdate=0), 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
-pctput > 0anyRandom
-pctput=0<= 100k objects (default)PermShuffle
-pctput=0> 100k objects (default)PermAffinePrime

Use --perm-shuffle-max to adjust the threshold for PermShuffle. However, datasets with 10 or fewer names always use PermShuffle when -pctput=0.

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:

$ aisloader -bucket=my_ais_bucket -duration=10s -pctput=50 -provider=ais
Found 0 existing objects
Run configuration:
{
"proxy": "http://172.50.0.2:8080",
"provider": "ais",
"bucket": "my_ais_bucket",
"duration": "10s",
"put upper bound": 0,
"put %": 50,
"minimal object size in Bytes": 1024,
"maximum object size in Bytes": 1048576,
"worker count": 1,
"stats interval": "10s",
"backed by": "sg",
"cleanup": true
}
Actual run duration: 10.313689487s
Time OP Count Total Bytes Latency(min, avg, max) Throughput Error
01:52:52 Put 26 11.19GB 296.39ms 5.70s 14.91s 639.73MB 0
01:52:52 Get 16 3.86GB 58.89ms 220.20ms 616.72ms 220.56MB 0
01:52:52 CFG 0 0B 0.00ms 0.00ms 0.00ms 0B 0
01:52:52 Clean up ...
01:52:54 Clean up done

2. Time-based 100% PUT into ais bucket:

$ 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:

$ 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:

$ 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:

$ 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:

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

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

$ aisloader -bucket=nvais -numworkers=3 -pctput=100 -minsize=1K -maxsize=1K -loaderid=11 -loadernum=20 -maxputs=2000 -subdir=aisloader -cleanup=false

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

$ aisloader -loaderid=10

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

$ aisloader -loaderid=10 -loadernum=20

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

$ aisloader -loaderid=loaderstring -loaderidhashlen=8

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

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

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

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

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

$ AIS_ENDPOINT="examples.com:8080" aisloader

14. Use HTTPS when connecting to a cluster:

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

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

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

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

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

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

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

18. 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:

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

19. Generate a list of object names (once), and then run aisloader without executing list-objects (see Object-name lists for storing the list in AIS):

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

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

$ ais ls ais://nnn --summary
NAME PRESENT OBJECTS SIZE (apparent, objects, remote) USAGE(%)
ais://nnn yes 133538 0 2.99GiB 2.99GiB 0B 10%
$ aisloader -bucket=ais://nnn -pctput=0 -arch.list -duration=90m -numworkers=4 -cleanup=false -get-batchsize=64 --quiet -epochs 7 -cont-on-err
Found 1,335,380 archived files
Runtime configuration:
{
"proxy": "http://<ais-endpoint>:8080",
"bucket": "ais://nnn",
"duration": "1h30m0s",
"# workers": 4,
"stats interval": "10s",
"GET(batch): batch size": 64,
"name-getter": "unique epoch-based",
"cleanup": false
}
Time OP Count Size (Total) Latency (min, avg, max) Throughput (Avg) Errors (Total)
11:07:28 GBT 877 (877) 82.1MiB (82.1MiB) 43.374ms 45.441ms 57.517ms 8.21MiB/s (8.21MiB/s) -
11:07:38 GBT 883 (1,760) 82.7MiB (164.8MiB) 42.996ms 45.383ms 49.333ms 8.27MiB/s (8.24MiB/s) -
11:07:48 GBT 880 (2,640) 82.5MiB (247.3MiB) 42.924ms 45.444ms 49.680ms 8.25MiB/s (8.24MiB/s) -
11:07:58 GBT 881 (3,521) 82.6MiB (329.9MiB) 42.820ms 45.279ms 49.177ms 8.26MiB/s (8.25MiB/s) -
...

Collecting stats

Statistics output

Use -stats-output to save statistics to a local file; otherwise, statistics go to standard output. Use -stats-output-obj to also upload them as an object after the run.

$ aisloader -bucket=ais://images -pctput=0 -duration=10s -cleanup=false -json -stats-output=stats-1.json
$ ais create ais://results
$ aisloader -bucket=ais://images -pctput=0 -duration=10s -cleanup=false -json -stats-output-obj=ais://results/stats-1.json
  • The object destination must be a local AIS bucket on the connected cluster. A destination bucket other than the benchmark bucket must already exist. Remote AIS and cloud destinations are not supported yet.
  • The two options can be combined, saving identical statistics to both destinations.
  • -stats-output-obj cannot be combined with -s3endpoint.
  • -cleanup=true is rejected when the destination is the benchmark bucket.
  • Without -stats-output, object uploads use a temporary file while statistics also print to standard output. If writing, closing, or uploading the file fails, aisloader keeps it and reports its path along with the errors.
  • If writing statistics fails, aisloader stops the run, exits with an error, and prints the final totals to standard error.

StatsD

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:

$ 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:

$ nc 8125 -l -u -k
# The result will look as follows - notice "*latency*" metrics (in milliseconds):
...
aisloader.u18044-0.put.latency.posthttp:0.0005412320409368235|ms|@0.000049
aisloader.u18044-0.put.latency.proxyheader:0.06676835268647904|ms|@0.000049
aisloader.u18044-0.put.latency.targetresponse:0.7371088368431411|ms|@0.000049aisproxy.DLEp8080.put.count:587262|caistarget.vuIt8081.kalive.ms:1|ms
aistarget.vuIt8081.disk.sda.avg.rsize:58982|g
aistarget.vuIt8081.disk.sda.avg.wsize:506227|g
aistarget.vuIt8081.put.count:587893|c
aistarget.vuIt8081.put.redir.ms:2|ms
aistarget.vuIt8081.disk.sda.read.mbps:5.32|g
aistarget.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
aisloader.u18044-0.put.minlatency:0|ms|@0.000052
aisloader.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
aisloader.u18044-0.put.latency.proxyheader:0.06742851233259217|ms|@0.000052
aisloader.u18044-0.put.latency.proxyrequest:0.1034696726821449|ms|@0.000052
aisloader.u18044-0.put.latency.targetheader:0.0699622524432494|ms|@0.000052
aisloader.u18044-0.put.latency.targetrequest:0.09168002482031129|ms|@0.000052
aisloader.u18044-0.put.latency.targetresponse:0.806660116862299|ms|@0.000052
aisloader.u18044-0.put.latency.proxy:0.6616681317544858|ms|@0.000052
aisloader.u18044-0.put.latency.targetconn:1.0948859816950205|ms|@0.000052
aisloader.u18044-0.put.latency.proxyresponse:0.425616629608563|ms|@0.000052
aisloader.u18044-0.put.latency.proxyconn:1.2669734732923108|ms|@0.000052
aisloader.u18044-0.put.latency.target:1.0063602047675682|ms|@0.000052aisproxy.DLEp8080.put.count:605044|caistarget.vuIt8081.put.redir.ms:2|ms
...

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

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

The result:

Time OP Count Size (Total) Latency (min, avg, max) Throughput (Avg) Errors (Total)
10: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) -
...
Detailed latency info is disabled
...
# As stated, `SIGHUP` is a binary toggle - next time used it'll enable detailed trace with `aisloader printing:
Detailed 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: