AIS Loader (aisloader)
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.
(**)
aisloadercan 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
- Testing
- YAML Configuration
- Command Line Options
- Assorted Command Line
- Environment variables
- Archive Workload
- Multipart Download Stream
- Get-Batch Support
- Random Access Across Very Large Collections
- Examples
- Collecting stats
- HTTP tracing
- AISLoader-Composer
- References
Setup
You can install aisloader using the following Bash script:
Alternatively, you can also build the tool directly from the source:
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.
Environment variables:
AIS_ENDPOINT: Cluster endpoint (default:http://localhost:8080).BUCKET: Bucket to test against (default: a newais://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:
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 Options Grouped by Category
Cluster Connection and API Configuration (clusterParams)
Target Bucket and Properties (bucketParams)
Timing, Intensity, and Name-Getter Configuration (workloadParams)
Object Size Constraints and Integrity (sizeCksumParams)
Archive/Shard Configuration (archParams)
Object Naming Strategy (namingParams)
Read Operation Configuration (readParams)
Multipart Upload Settings (multipartParams)
Multipart Download Stream Settings (mpdStreamParams)
ETL Configuration (etlParams)
Fleet Coordination (loaderParams)
Statistics and Monitoring (statsParams)
Cleanup, Config, Dry-Run, HTTP Tracing, Termination Control (miscParams)
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:
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:
Example 100% PUT:
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.
Read these objects from an existing bucket:
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.
-filelistand-filelist-objare mutually exclusive. Either option overrides-skiplist.-filelist-objcannot 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.
- 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.listoff for cold-GET benchmarks. -list-outis 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.
-split-readsrequires-loaderid,-loadernum, and a workload that reads (-pctputbelow 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”:
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:
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:
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”:
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_slicesandparity_slicescannot be changed on the fly.
Note that (n
data_slices, mparity_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:
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
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_ENDPOINTenvironment universally supported across all AIS clients, e.g.:
In addition, environment can be used to specify client-side TLS (aka, HTTPS) configuration:
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
When -arch.pct > 0 (PUT workloads that create shards) or -arch.list is set (read workloads), aisloader:
- Lists objects with archive expansion enabled (
LsArchDir) - Detects archived files (e.g.,
shard-987.tar/file-042.bin) - Reads from them using the
?archpath=API parameter /MossIn.ArchPathfor 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.:
Usage Examples
Create 100% shards (each containing 10 files)
All PUTs create shards; each shard contains 10 files between 1KB and 100KB.
Mixed workload: 30% shards, 70% plain objects
30% of PUT operations create shards; the rest create plain objects.
Read from existing shards (archpath-aware)
-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:
- Lists objects with archive expansion enabled
- Identifies archived files (e.g.,
photos.tar/00042.jpg) - Issues GET requests using
?archpath=to retrieve individual files inside shards
Example startup message:
Create shards using a specific archive format
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
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:
Mixed workload — 50% regular GET, 50% MPD stream:
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:
Use
--perm-shuffle-maxto adjust the threshold forPermShuffle. However, datasets with 10 or fewer names always usePermShufflewhen-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:
2. Time-based 100% PUT into ais bucket:
3. Timed (for 1h) 100% GET from a Cloud bucket, no cleanup:
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:
5. PUT 1GB total into an ais bucket with cleanup disabled, object size = 1MB, duration unlimited:
6. 100% GET from an ais bucket:
7. PUT 2000 objects named as aisloader/hex({0..2000}{loaderid}):
8. Use random object names and loaderID to report statistics:
9. PUT objects with random name generation being based on the specified loaderID and the total number of concurrent aisloaders:
10. Same as above except that loaderID is computed by the aisloader as hash(loaderstring) & 0xff:
11. Print loaderID and exit (all 3 examples below) with the resulting loaderID shown on the right:
12. Generate load on a cluster listening on custom IP address and port:
13. Generate load on a cluster listening on custom IP address and port from environment variable:
14. Use HTTPS when connecting to a cluster:
15. PUT TAR files with random files inside into a cluster:
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.
17. Timed 100% GET directly from S3 bucket (notice ‘-s3endpoint’ command line):
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:
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):
20. GetBatch example: read random batches each consisting of 64 archived files
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.
- 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-objcannot be combined with-s3endpoint.-cleanup=trueis 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- can be:gauge,timer,counterhostname- is the hostname of the machine on which the loader is ranloaderid- see:-loaderidoptionmetric- 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:
2. Have netcat listening on the default StatsD port 8125:
3. Finally, toggle detailed tracing on and off by sending aisoader SIGHUP:
The result:
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: