You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AIStore supports multiple ways to populate itself with existing datasets, including (but not limited to):
4
-
5
-
***on demand**, often during the first epoch;
6
-
***copy** entire bucket or its selected virtual subdirectories;
7
-
***copy** multiple matching objects;
8
-
***archive** multiple objects
9
-
***prefetch** remote bucket or parts of thereof;
10
-
***download** raw http(s) addressable directories, including (but not limited to) Cloud storages;
11
-
***promote** NFS or SMB shares accessible by one or multiple (or all) AIS target nodes;
12
-
13
-
> The on-demand "way" is maybe the most popular, whereby users just start running their workloads against a [remote bucket](/docs/providers.md) with AIS cluster positioned as an intermediate fast tier.
14
-
15
-
But there's more. In particular, v3.22 introduces a special facility to download very large remote objects a.k.a. BLOBs.
16
-
17
-
We call this (new facility):
18
-
19
1
## Blob Downloader
20
2
21
-
AIS blob downloader features multiple concurrent workers - chunk readers - that run in parallel and, well, read certain fixed-size chunks from the remote object.
22
-
23
-
User can control (or tune-up) the number of workers and the chunk size(s), among other configurable tunables. The tunables themselves are backed up by system defaults - in particular:
24
-
25
-
| Name | Comment |
26
-
| --- | --- |
27
-
| default chunk size | 2 MiB |
28
-
| minimum chunk size | 32 KiB |
29
-
| maximum chunk size | 16 MiB |
30
-
| default number of workers | 4 |
31
-
32
-
In addition to massively parallel reading (**), blob downloader also:
3
+
Blob downloader is AIStore's facility for **downloading large remote objects (BLOBs)** using **concurrent range-reads**.
4
+
Instead of pulling a 10–100+ GiB object with a single sequential stream, blob downloader:
33
5
34
-
* stores and _finalizes_ (checksums, replicates, erasure codes - as per bucket configuration) downloaded object;
35
-
* optionally(**), concurrently transmits the loaded content to requesting user.
6
+
-**splits the object into chunks** (configurable chunk size),
7
+
-**fetches those chunks in parallel** from the remote backend (configurable number of workers),
8
+
-**writes them directly into AIStore's chunked object layout** so all target disks are writing in parallel, effectively aggregating the full disk write bandwidth of the node.
36
9
37
-
> (**) assuming sufficient and _not_ rate-limited network bandwidth
> (**) see [GET](#2-get-via-blob-downloader) section below
12
+
The result is that, beyond a certain object size, blob downloader can deliver **much higher throughput** than a regular cold GET. In our internal benchmarks, a 4 GiB S3 object fetched with blobdownloader was up to **4× faster** than a monolithic cold GET.
40
13
41
-
## Flavors
14
+
Blob downloader is also **load‑aware**: it consults AIStore's internal load advisors to avoid overcommitting memory or disks, backing off when the node is under pressure and running at full speed when the system has headroom.
42
15
43
-
For users, blob downloader is currently(**) available in 3 distinct flavors:
16
+
For a deeper dive into the internals and detailed benchmarks, see the [blog post](https://aistore.nvidia.com/blog/2025/11/26/blob-downloader).
> (**) There's a plan to integrate blob downloader with [Internet Downloader](downloader.md) and, generally, all supported mechanisms that one way or another read remote objects and files.
22
+
AIStore exposes blob download functionality through three distinct interfaces, each suited to different use cases.
53
23
54
-
> (**) At the time of this writing, none of the above is supported (yet) in our [Python SDK](https://github.com/NVIDIA/aistore/tree/main/python/aistore/sdk).
24
+
-**Single object blob-download job** – explicitly start a blob-download job for one or more objects.
25
+
-**Prefetch + blob-threshold** – route large objects in the prefetch job through blob downloader.
26
+
-**Streaming GET** – stream a large object from blob downloader while it is being cached in AIS.
55
27
56
-
Rest of this text talks separately about each of the 3 "flavors" providing additional details, insights, and context.
28
+
### 1. Single object blob-download job
57
29
58
-
## 1. Usage
30
+
Use this when you want direct control over which/how objects are fetched with blob downloader.
59
31
60
-
To put some of the blob downloader's functionality into immediate perspective, let's see some CLI:
Thus, when the size in question is greater than the _threshold_ there's a motivation to speed up.
67
+
-**Multiple objects in one job**
110
68
111
-
To meet this motivation, AIS now supports `GET` request with additional (and optional) http headers:
69
+
```console
70
+
$ ais blob-download s3://my-bucket \
71
+
--list "obj1.tar,obj2.bin,obj3.dat" \
72
+
--chunk-size 8MiB \
73
+
--num-workers 4 \
74
+
--wait --progress
75
+
```
112
76
113
-
| Header | Values (examples) | Comments |
114
-
| --- | --- | --- |
115
-
|`ais-blob-download`| "true", "" | NOTE: to engage blob downloader, this http header must be present and must be "true" (or "y", "yes", "on" case-insensitive) |
* HTTP headers that AIStore recognizes and supports are always prefixed with "ais-". For the most recently updated list (of headers), please see [the source](https://github.com/NVIDIA/aistore/blob/main/api/apc/headers.go).
79
+
`prefetch` is AIStore's **multi‑object “warm‑up” job** for remote buckets. When you add a **blob size threshold**, it automatically decides which objects are large enough to benefit from blob downloader:
- Objects **≥ `--blob-threshold`** are fetched via blob downloader (parallel range‑reads, chunked writes).
82
+
- Objects **< `--blob-threshold`** are fetched with the normal cold GET path.
122
83
123
-
`Prefetch` is another batch operation, one of the supported job types that can be invoked both via Go or Python call, or command line.
84
+
This lets you get the large‑object gains of blob downloader by just tuning prefetch's knobs.
124
85
125
-
The idea of size threshold applies here as well, with the only difference being the _scope_: single object in [GET](#2-get-via-blob-downloader), all matching objects in `prefetch`.
126
-
127
-
> The `prefetch` operation supports multi-object selection via the usual `--list`, `--template`, and `--prefix` options.
128
-
129
-
But first thing first, let's see an example.
86
+
**Example**:
130
87
131
88
```console
132
-
$ ais ls s3://abc
89
+
# Inspect a remote bucket
90
+
$ ais ls s3://my-bucket
133
91
NAME SIZE CACHED
134
-
aisloader 39.30MiB no
135
-
largefile 5.76GiB no
136
-
smallfile 100.00MiB no
92
+
model.ckpt 12.50GiB no
93
+
dataset.tar 8.30GiB no
94
+
config.json 4.20KiB no
95
+
96
+
# Prefetch with 1 GiB threshold:
97
+
# - objects ≥ threshold use blob downloader (parallel chunks)
In addition to CLI jobs, blob downloader can be used to stream large objects while they are concurrently downloaded in the cluster. This is useful when you want to feed data directly into an application (for example, model loading or preprocessing) and still keep a local cached copy in AIS.
153
115
154
-
And that is because it is the blob downloader that actually does all the work behind the scenes:
116
+
```python
117
+
from aistore import Client
118
+
from aistore.sdk.blob_download_config import BlobDownloadConfig
## Selecting an effective blob-threshold for prefetch
135
+
136
+
The ideal `--blob-threshold` depends on your cluster (CPU, disks, network), backend (S3/GCS/…), and object size distribution.
137
+
Running full `prefetch` experiments for many candidate values can easily take **hours**, so instead we recommend using a **shorter single‑object blob-download benchmark** to pick a good starting point and then using that value directly in your prefetch job.
138
+
139
+
To do this in practice, **compare cold GET vs. blob-download on a single object**:
140
+
141
+
1.**Pick a representative large remote object** in your bucket (for example, a model shard or big archive).
142
+
2.**Evict it from AIStore** to ensure a cold path:
$ time ais blob-download s3://my-bucket/large-model.bin --wait
160
+
```
161
+
162
+
5. Repeat the above for a few object sizes (for example: 64 MiB, 256 MiB, 1 GiB, 4 GiB) until you see a pattern:
163
+
164
+
-**Below some size**, cold GET is as fast or faster (blob overhead dominates).
165
+
-**Above that size**, blob-download is consistently faster.
166
+
167
+
The **crossover size** where blob-download _wins_ is your **blob-threshold** for prefetch: use that size as `--blob-threshold` when you run your real `ais prefetch` job. This single‑object comparison gives you a quick, reasonable approximation.
168
+
169
+
In our internal 1.56 TiB S3 benchmark, applying this method led us to a threshold of about **256 MiB**. This value provided the best trade‑off for that specific cluster and workload and delivered roughly **2.3× faster** end‑to‑end prefetch compared to a pure cold‑GET baseline.
0 commit comments