← Work

Agentic Data Transfer Optimizer

Tuning bulk data transfers from live TCP telemetry, with the agent's actions kept inside hard limits.

Status
In progress · first results in
Built with
Python, Zero-copy sendfile(), Multiprocessing, Ollama, Hugging Face, Pydantic
Slide titled An Autopilot for the World's Data, subtitled When data crawls, discovery waits. Left panel, set once by hand: 50 to 60 percent of top speed, 7 days of waiting. Middle panel, how it works: a loop of observe, diagnose, decide, and check around an autopilot. Right panel, AI autopilot: about 90 percent of top speed, about 4 days of waiting. Along the bottom: 24 of 24 runs reached the sweet spot; about 1 minute on average, starting from zero; goal, a virtual system administrator.
The project on one slide. Top speed is the capacity of the network link, which the agents fill to about 90%; the days of waiting are an example transfer scaled from those speeds. The comparison with the best fixed setting is under Results. Select the slide to open it full size.

The problem

Bulk data movers usually run with a hand-tuned, static concurrency setting. The right number of parallel streams depends on the network path, competing traffic, and host load, and all of them change during a long transfer.

Why it is hard

  • A decision has to be made every probing interval, from noisy signals.
  • Language models reason well about patterns but are unreliable at arithmetic.
  • An agent that changes concurrency too far or too often can do more damage than a fixed setting.
  • The model should run close to the transfer, on modest hardware, without depending on an outside service.

Try it

The toy below shows the problem in miniature: the best number of streams depends on the path, and the only way to find it is to measure.

Tune a transfer yourself

Illustration · made-up numbers
0%25%50%75%100%18162432parallel streamsthroughput, % of linkNearby: best 9Long-distance: best 21Busy: best 5

The best number of streams moves with the path: about 9 on a nearby, quiet link, about 21 on a long-distance link, about 5 on a busy shared link. A setting tuned for one path is wrong on the next, which is why the optimizer keeps measuring.

A toy model, not the real optimizer or its measurements. Its agent is a plain bounded search standing in for the two language-model agents described below.

My role

I am building the system: the transfer runtime, the telemetry, the two agents, and the guardrails around them.

The approach

A sender and receiver move data over TCP through a multiprocessing worker pool with zero-copy sendfile() transfers. At each probing interval the system observes the transfer, two agents reason about it, and the runtime acts on a bounded recommendation.

  1. ObserveRead TCP socket statistics, congestion window, retransmissions, RTT variance, and host load.
  2. DiagnoseThe Diagnostic agent turns observations and recent history into a structured assessment.
  3. DecideThe Decision agent recommends a concurrency change or holds the current setting.
  4. EnforceHard limits, bounded deltas, graduated ramping, and oscillation damping shape the action.

↻ Each action is evaluated at the next interval, closing an observe, reason, act, evaluate loop.

Results

85%90%95%100%Best fixed settingfound by trying every option first100%Agentic optimizernever told the best setting94%98%
Share of the best fixed setting's throughput objective, across runs on CloudLab and an InfiniBand HPC cluster. The axis does not start at zero.
84.5 Gbpsaverage throughput at best, over InfiniBand
No tuningthe best setting was never given in advance

I evaluated the optimizer on CloudLab with 10 Gbps links and on an InfiniBand HPC cluster. Each round, the local Diagnostic and Decision agents tuned concurrency from TCP, host, and throughput telemetry. Across these runs the optimizer reached 94–98% of the throughput objective of the best fixed concurrency setting, and averaged up to 84.5 Gbps.

The comparison is deliberately hard. The best fixed setting is only known after trying every option on that path; a static mover gets its throughput only if someone has already done that tuning. The agents were never told the answer and got within a few percent of it on their own.

Decisions

  1. Small local models instead of tool-calling agents. The agents are designed around small models that can run on a CPU, so the optimizer needs no external API. Tool-calling agents were ruled out because they need large models.
  2. Keep the model out of arithmetic. Telemetry reaches the model already computed, so it reasons about values instead of calculating them. If the model's output is invalid, the system keeps the previous decision.
  3. The model recommends; the system enforces. No agent output can push concurrency outside the permitted range, repeated reversals are damped, and large changes are ramped in steps.
  4. Make every decision inspectable. Structured memory and a decision journal record what each agent saw and chose. The model layer is pluggable across local Ollama models, fine-tuned Hugging Face checkpoints, OpenAI, and Google Gemini.

What comes next

The next evaluations stress the agent in the situations a static setting handles worst:

  • several transfers running at the same time;
  • a transfer that joins while another runs at a fixed concurrency;
  • congested disk I/O;
  • packet loss on the nodes in between.