AIStore (AIS) Documentation

repository·main·Indexed 23 days ago

https://github.com/nvidia/aistore

A high-performance, distributed storage stack optimized for AI and machine learning workloads. Features include elastic scaling, multi-cloud access, Get-Batch, and ETL offloading. Documentation covers the AIS CLI, the ishard utility for transforming datasets into WebDataset-formatted shards, token-based authentication using JWT, and rclone configuration for S3-compatible endpoints.

Tokens
372.5K
Snippets
713
Records
1.8K
Agent score
81%

What's inside AIStore

  1. Overview of AIStore extensions

    main

    AIStore provides several specialized extensions to handle specific high-performance AI workloads. These include:

    • ETL: Extensions for Extract, Transform, Load processes.
    • Dsort (Distributed Shuffle): Specialized extension for distributed shuffle operations.
    • Downloader: Extension for optimized data downloading tasks.
  2. Overview of AIStore (AIS) capabilities

    main

    AIStore (AIS) is a highly available, partition-tolerant distributed storage system designed for petascale deep learning workloads. It provides read-after-write consistency and supports data protection through n-way mirroring and erasure coding.

    Beyond standard storage, AIS functions as an ETL (Extract-Transform-Load) engine that can shuffle datasets and run custom workloads. It is designed to be lightweight and can be deployed on a single Linux machine or a bare-metal cluster, with or without Kubernetes.

    Key Features:

    • Direct I/O: Supports direct (compute <=> disk) I/O flows, avoiding the latency overhead of breaking objects into uniform fragments with separate metadata manifests.
    • Data Sharding: Focuses on (re)sharding datasets prior to workloads to ensure optimal consumption by training applications.
    • Linear Scalability: Achieves linear scalability under random-read workloads, where total-throughput = N * single-disk-throughput (N being the total number of clustered disks).
    • APIs: Provides both S3 and native APIs.
    • Extensibility: Can act as fast storage or an on-demand cache in front of supported backends, including Cloud buckets.
  3. Overview of AIStore Features

    main

    AIStore is a lightweight, distributed storage stack designed for AI workloads. Key capabilities include:

    • Multi-Cloud Access: Manage content across AWS S3, GCS, Azure, and OCI with namespace-aware bucket identity.
    • High Availability: Features redundant control/data planes, self-healing, n-way mirroring, and erasure coding.
    • API Support: Provides a native HTTP-based API (with Go and Python SDKs) and a compliant Amazon S3 API for unmodified S3 clients.
    • Chunked Objects: High-performance object representation supporting parallel reads, rechunking, and checksum-protected manifests.
    • ETL Offload: Execute data transformations inline (on-the-fly) or offline (batch processing) close to the data.
    • Get-Batch: A specialized operation for ML/AI pipelines that retrieves multiple objects/archives in a single call, assembling them into a specific serialization format (like TAR) in the requested order.
    • Unified Namespace: Connect independent clusters to provide unified access to datasets across the organization.
  4. Overview of AIS Python Components

    main

    The python/ directory in the AIStore repository provides several key components for integrating AIStore with Python-based AI workflows:

    • AIStore Python SDK: The primary interface for interacting with AIStore services programmatically.
    • PyTorch Integration: Specialized tools to enable high-performance data loading from AIStore directly into PyTorch datasets.
    • Botocore Patch: A mechanism to allow libraries relying on Botocore (like boto3) to transparently use AIStore as a backend.
  5. Overview of the AIStore ETL package

    main

    The etl package compiles into the aisnode executable. It is used to run custom ETL (Extract, Transform, Load) containers and communicate with them at runtime.

    AIStore supports both on the fly (online) and offline user-defined dataset transformations. A key design principle is that all I/O intensive operations are confined to the storage cluster, allowing computing clients to focus resources on executing computation over data that has already been transformed, filtered, or sorted.

    Common use cases include:

    • Dataset augmentation
    • Dataset filtering
  6. Overview of AIStore system environment variables

    main

    AIStore uses a set of globally defined system environment variables to configure various components, including the aisnode executable, authentication (AuthN), and cloud backends like Amazon S3 and Oracle OCI. These variable names are used consistently across the Go SDK, CLI, and deployment scripts.

    Key variable groups include:

    • Core/Node: Variables used by the aisnode executable.
    • AuthN: Variables for the authentication environment.
    • Cloud Backends: Variables for configuring Amazon S3 (e.g., S3_ENDPOINT) and Oracle OCI.
    • Testing: Variables used for integration tests.
  7. Use the Batch Request Module for efficient data loading

    main

    The Batch Module in the AIStore Python SDK allows you to load multiple objects in a single request. Instead of multiple individual GET requests, AIStore aggregates the requested objects (or sharded files) into a single ordered archive (e.g., TAR, ZIP) and streams it back. This reduces network round-trips and connection overhead, which is particularly beneficial for high-performance ML training workloads.

    Key features include:

    • Multi-Bucket Support: A single batch can span multiple local or remote cloud buckets (S3, GCS, Azure, OCI).
    • Strict Ordering: The archive contains objects in the exact sequence they were requested.
    • Archive Path Support: You can extract specific files from within archive objects (like WebDataset) without downloading the entire archive.
    • Byte Range Reads: Request specific byte ranges from objects or extracted archive files.
    from aistore.sdk import Client
    
    client = Client("http://localhost:8080")
    bucket = client.bucket("example")
    
    # Batch get using object names as strings
    object_names = ["obj1", "obj2", "dir/file3.jpg"]
    batch = client.batch(object_names, bucket=bucket)
    
    for obj_info, data in batch.get():
        print(f"Object: {obj_info.obj_name}, Size: {len(data)}")
  8. Features of AIStore long object names

    main

    AIStore is designed to handle complex naming requirements without performance degradation or practical constraints:

    • No Practical Length Limits: Supports object names that are 4000+ characters long.
    • Dual API Support: Identical long-name capabilities are available through both the Native API and the S3-compatible API.
    • Full Path Preservation: Deeply nested directory structures are maintained exactly as provided.
    • Consistent Performance: Operational speed is not impacted by the length of the object names.
  9. Developer Tools and SDKs

    main

    For building applications on top of AIStore, the following tools are available:

    • Go API: Used in the CLI and benchmarking tools.
    • Python SDK: A full SDK for Python applications.
    • PyTorch Integration: Specialized integration for PyTorch workflows.
    • Boto3 Support: Allows using standard AWS Boto3 clients to interact with AIS.
    • Open Formats: Data can be moved using standard Linux tools like tar(1), scp(1), and rsync(1).
  10. Use AIS Loader for benchmarking

    main

    AIS Loader (aisloader) is a load generator used to benchmark and stress-test AIStore or any S3-compatible backend. It can generate synthetic read/write workloads that mimic training and inference patterns, allowing you to isolate storage performance from compute bottlenecks.

    To view available commands and options, run:

    • aisloader
    • aisloader usage
    • aisloader --help
  11. Choose an AIStore observability method

    main

    AIS offers several methods for monitoring and troubleshooting depending on your use case:

    MethodDescriptionUse Cases
    CLICommand-line toolsQuick checks, diagnostics, interactive troubleshooting
    LogsDetailed event logsDebugging, audit trails, understanding system behavior
    PrometheusTime-series metrics via HTTPPerformance monitoring, alerting, trend analysis
    Metrics ReferenceMetric names and descriptionsSearching for specific metrics
    GrafanaVisualization dashboardsVisual monitoring and sharing status
    KubernetesK8s-specific integrationMonitoring AIS within Kubernetes stacks