Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarHabr AI→ original

Load Test Finds Radio Sending More Control Traffic Than Audio in AI-Written Code: 23 Mbit/s Drops to 0.12 Mbit/s

An agent writes code that passes its own tests with one user and an empty database, then slows down under live load. In a browser-based radio, every turn of the volume knob forced the server to rebuild and resend the station list to everyone. With 500 receivers, this control traffic reached 23 Mbit/s, more than the audio itself (19.9 Mbit/s). After a fix, it dropped to 0.12 Mbit/s. That is why a load run on every commit matters more than trusting the agent's green tests.

AI-processed from Habr AI; edited by Hamidun News
Load Test Finds Radio Sending More Control Traffic Than Audio in AI-Written Code: 23 Mbit/s Drops to 0.12 Mbit/s
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1A 3-second cache cut the median list response from 753 to 23 ms, but p95 rose to 2079 ms
Key metric #2Batches of 5 audio frames freed 33–40% of radio CPU on a 2 vCPU server
Key metric #3A two-minute CI run catches the regression in the commit where it appeared

An AI agent writes a feature faster than a human can read the previous commit, and it runs the tests itself. But those tests live in an ideal world: one user, an empty database, instant network. In reality, dozens of people hit the same data at once.

An engineer with six years of load-testing experience (SIP telephony for federal carriers, an AI platform for a major bank) demonstrated this on three of his own projects. One example is especially clear: in the browser-based Open Radio, every turn of the volume knob forced the server to rebuild and send the station list to every receiver again. With 500 listeners, this control traffic amounted to 23 Mbit/s, while the audio itself took 19.

9 Mbit/s. After a fix, control traffic dropped to 0.12 Mbit/s.

Why agent-written code is usually correct but slow

This is not an isolated problem. Research shows a systemic pattern. According to CodeRabbit (December 2025), in 470 open source pull requests (320 with AI, 150 from humans), the AI versions had 1.7 times more issues, and about 8 times more unnecessary disk and network calls. In the EffiBench benchmark (1000 tasks, 42 models), GPT-4's code was on average 3.12 times slower than the best human solution. In a study of optimizations in Kafka, Netty and Presto, developers' patches were faster in three of four projects, while some model-generated "optimizations" made code three times slower.

Typical errors in such code include: hundreds of small database queries per endpoint (N+1), caches that ignore concurrent requests, broadcasting full state to every subscriber, default limits and missing timeouts, and metrics that measure the wrong thing.

Three cases from practice

The first is SAR Review, a platform for shared viewing of drone video, used in a search and rescue operation in the mountains of Kyrgyzstan. The file list made about 300 database queries and was polled every 5 seconds from each open tab. With eight simultaneous users, it responded in 1.

5 seconds, and the whole platform's throughput fell from 105 to 59 requests per second. A 3-second cache cut the median response from 753 to 23 ms. But the p95 (the time within which 95% of requests complete) for the list itself rose from 1517 to 2079 ms: when the cache expired, all requests recomputed the same thing at once (cache stampede).

Retesting also exposed a cold start: after a restart, the first responses took up to 12 seconds. Now one request recomputes while the others wait, and the cold start takes 1.5 seconds.

The second is the radio. With 500 receivers, control traffic exceeded the audio. A single change cost 21 ms of CPU, 5.3 MB of memory and 6,500 allocations. After the fix, only the host receives the listener count, and no more than once every 2 seconds, while a track change is a short message of 60–150 bytes. The cost of the change fell to 0.045 ms of CPU, 12 KB and 14 allocations. With 2000 receivers, the old version lost 2.4% of audio, even though the server-side lost-frame counter showed zero: frames were not lost, they were late, and the listener's buffer ran empty. That is why quality should be measured on the receiver side.

The third is "Kontakt," a voice roulette over SIP on the same server (2 vCPU, 4 GB). With 2000 receivers, the web process hit its memory limit of MemoryMax=200M (about 90 KB per connection) and was killed along with the calls and the site. Calls ran into 200 RTP ports at just 50 conversations.

The radio sockets were routed around the web process, audio began going out in batches of 5 frames (100 ms), and the port range was widened to 1000. With 950 receivers, service CPU dropped from 1.31 to 0.

79 cores, there was no audio loss up to 2000 receivers, calls up to 400 subscribers meet the thresholds, and call setup takes 164 ms at p95. One "optimization" passed measurement but failed in reality: direct HTTPS on port 8443 gave 0.37 cores instead of 1.

31, but after three hours audio dropouts appeared on mobile networks. The broadcast was moved back to 443, and a rule was added for the agent: a new network path must first be measured from a mobile network.

What to change in the process

A large load test before release does not work: between releases, the agent manages hundreds of commits. The author runs a short two-minute load test at the target load with strict thresholds directly in CI (GitHub Actions) on every push, to catch the degradation in the commit where it appeared.

Accept agent optimizations only after comparing "before" and "after" with the same method: two of them in these projects made results worse, and without measurement they would have gone to production as improvements. The agent's load script also needs checking, since it often hits a single lightweight endpoint without pauses and reports averages. This is the experience of one author on small open source projects, but the approach applies to any team that hands code over to agents.

Story

Key Questions Answered

Why agent-written code is usually correct but slow?

This is not an isolated problem. Research shows a systemic pattern. According to CodeRabbit (December 2025), in 470 open source pull requests (320 with AI, 150 from humans), the AI versions had 1.7 times more issues, and about 8 times more unnecessary disk and network calls. In the EffiBench benchmark (1000 tasks, 42 models), GPT-4's code was on average 3.12 times slower than the best human solution.

What are the key details on Three cases from practice?

The first is SAR Review, a platform for shared viewing of drone video, used in a search and rescue operation in the mountains of Kyrgyzstan. The file list made about 300 database queries and was polled every 5 seconds from each open tab. With eight simultaneous users, it responded in 1.5 seconds, and the whole platform's throughput fell from 105 to 59 requests per second. A 3-second cache cut the median response from 753 to 23 ms.

What to change in the process?

A large load test before release does not work: between releases, the agent manages hundreds of commits. The author runs a short two-minute load test at the target load with strict thresholds directly in CI (GitHub Actions) on every push, to catch the degradation in the commit where it appeared. Accept agent optimizations only after comparing "before" and "after" with the same method: two of them in these projects made results worse, and without measurement they would have gone to production as improvements.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — Load Test Finds Radio Sending More Control Traffic Than Audio in AI-Written Code: 23 Mbit/s Drops to 0.12 Mbit/s https://news.hamidun.com/en/news/18660/load-test-finds-radio-sending-more-control-traffic-than-audi

What do you think?
Loading comments…