Edge computer and screen with a conceptual model loading sequence
AI-generated conceptual image; not an actual Kalstor product, facility, customer project or test record.
Home › Resources › AI Model Loading Is Slow: Is Storage the Bottleneck?
Guides · Edge AI

AI Model Loading Is Slow: Is Storage the Bottleneck?

By Kalstor 7 min read
Key takeaways
  • Measure from application start to the first valid result, then break that interval into phases present in the actual framework.
  • Memory mapping, pre-load hashing and warm caches can move physical reads outside the apparent file-load call.
  • A faster storage device is worth testing only when controlled measurements show storage I/O materially delays readiness.

Time the path from application start to the first valid inference result before deciding that a faster SSD will help. Model-file access is only one possible part of that path. Depending on the framework, the device may also decode an archive, construct model objects, move weights to accelerator memory, initialize an engine and perform first-run work. The slowest phase is a measurement question, not a property of the model file's size alone.

This guide diagnoses startup latency. The separate edge AI storage qualification guide covers update recovery, concurrent writes and production acceptance.

Mark the phases that exist in your application

Record a monotonic timestamp at each boundary the application can observe. Use one start event, such as process launch, and one end event, such as the first output that passes the application's validity check. Then add applicable internal boundaries:

Possible phaseStart and end to markWhat may be contributing
File accessBefore opening or requesting model data; after the required bytes have actually been consumed.Physical reads, page-cache hits, filesystem and storage path.
Decode and state loadingBefore and after decompression, parsing or state restoration calls.CPU work, allocation and any reads deferred into those calls.
Device transferBefore weight transfer; after the accelerator has completed it, if asynchronous.Host memory, bus transfer and device allocation.
Runtime or engine setupBefore and after context or engine creation.Deserialization, allocation or compilation if this stack performs it at startup.
First inferenceBefore the first input; after a valid result is available.First-run initialization and actual computation.

The order and overlap vary. A TensorRT application may deserialize a previously built engine; building that engine is a different operation. PyTorch's loading examples distinguish reading a state dictionary from loading it into a model and moving tensors to a device. Do not force every framework into the same pipeline or add phase times that overlap as if they were independent.

Use a monotonic clock for elapsed time. If a transfer or inference API returns before accelerator work completes, synchronize at the measurement boundary using the framework's supported method. Otherwise the apparent “transfer time” may be only submission time, and the wait will appear in a later phase. NVIDIA's TensorRT benchmarking guidance treats warmup, device transfers and timing boundaries separately for this reason.

Distinguish disk reads from cache hits

Run repeated tests with the same model, host, software version and startup sequence, but record the cache conditions. “Cold” should describe an observed startup after the model was not already resident in the relevant memory caches; “warm” should identify prior reads or a resident model. A reboot label alone does not tell the reader exactly which caches and preloading paths were active. Avoid clearing shared caches on a production device merely to obtain a benchmark.

A hash check before loading reads the file and may warm the operating-system page cache. Include that check in the end-to-end timeline if production does it. Similarly, PyTorch documents mmap=True as a way to map tensor storage and let the OS load data as it is accessed. Timing only the mapping call can miss reads that occur later. The same caution applies to any implementation that defers access; confirm actual I/O with suitable operating-system counters or traces rather than inferring it from a fast API return.

Keep a phase record alongside system observations

Use a worksheet for each run, leaving unavailable measurements blank or marked unknown. Record the exact model artifact and checksum, framework/runtime, container or application build, filesystem, storage part, host interface and device fill state. Capture timestamps, total elapsed time, physical read activity if measurable, CPU and memory behavior, and any accelerator transfer or initialization telemetry the platform exposes.

Run condition and modelFile read or later page accessDecode/state loadDevice transferRuntime setupFirst valid resultTotal start-to-result
Cold condition as defined and observed
Repeat after prior load
Candidate storage, same host and software

Keep the underlying timestamps and I/O observations, not just these summary cells. Some reads overlap parsing or device transfer, so state how each interval was measured. A short file-load call with substantial later page faults is different from a true zero-I/O load.

Interpret the result before changing media

  • Physical reads coincide with the delay. Check whether the storage path, host interface or file access pattern limits the phase. A candidate drive is worth a controlled comparison, but the total gain is limited by how much end-to-end time that storage-sensitive work occupies.
  • Reads finish, but decoding or state construction continues. Investigate the format, CPU and allocation path. A faster drive cannot remove work already occurring after the data is available.
  • Time accumulates in device transfer. Check the supported accelerator and host-memory path. Confirm that synchronization is included before assigning the delay to PCIe, memory bandwidth or allocation.
  • The first result is slow but subsequent results are fast. Identify first-run initialization, compilation or warmup actually performed by the framework. This is distinct from sustained inference speed and from model-file read speed.

No single CPU, disk or GPU utilization percentage proves a cause. Correlate phase boundaries with the relevant I/O and application logs. If the application fetches a model over the network, include download and integrity verification as separate steps; a local SSD comparison cannot explain that transfer.

If the measured storage phase is material, compare candidate media on the same host with the same model, software, filesystem, relevant fill state and defined startup procedure. Repeat runs to observe variation and report total start-to-result time as well as the storage-sensitive part. For a storage-bound quote request, provide the host interface, model size and access pattern, measured physical-read phase, environment and target readiness time. A quoted drive speed alone cannot establish the application's startup time.

Sourcing in volume?

We publish measured usable capacity and define trial-batch verification against the quoted product and agreed test scope.