Как Яндекс профилирует память миллионов колонок с Алисой: борьба за 256 МБ
Яндекс рассказал, как борется за память на умных колонках с Алисой: у младших моделей всего 256 МБ оперативки на всё устройство сразу. Команда, которая пишет код на C/C++ для колонок, телевизоров и автомобилей, построила инструмент семплирующего профилирования и ежедневно собирает дампы памяти с миллионов устройств в проде — чтобы точно знать, куда уходит каждый мегабайт: на бизнес-логику, обработку звука или локальные нейросети.
AI-processed from Habr: Яндекс; edited by Hamidun News
The Yandex team that writes application code in C/C++ for smart devices with Alice explained in July 2026 how it built a sampling memory profiling tool and collects memory dumps daily from millions of speakers in production. The reason for the fight is simple: entry-level speaker models have just 256 MB of RAM for the entire device at once.
Why Memory Is the Main Scarce Resource
Entry-level smart speakers with Alice have only 256 MB of RAM for the whole device — and this amount has to be shared simultaneously between business logic, audio processing, and local neural networks. According to the Yandex team, there is real competition between components for every megabyte: whatever one module takes up too much of becomes unavailable to another.
Unlike servers, where you can buy more memory, a smart speaker is fixed, cheap hardware. A developer can't "just add another gigabyte": the amount is baked into a device that's already sitting in the user's home. That's why the question of "where do the megabytes go" isn't abstract here — it determines which features can even fit on the device.
- 256 MB of RAM on entry-level speaker models — for the entire device at once
- Memory dumps are collected daily from millions of speakers
- The devices' application code is written in C/C++
- A single platform serves not only speakers, but also TVs and cars with Alice
- The device fleet runs on Linux
Why Profile Memory in Production?
Yandex needs profiling specifically in production to see real memory consumption on users' live devices, rather than an averaged picture from a test bench. A lab scenario rarely reproduces how a speaker behaves for days and weeks on end in a real apartment, with real requests to Alice.
The key to scale is the word "sampling." A full dump and detailed tracing of every memory allocation on weak 256 MB hardware would eat up part of the very resources it's trying to measure. The sampling approach captures data selectively and with low overhead, so it can be kept running on millions of devices at once without interfering with the speaker's operation.
Millions of sources provide statistics that can't be obtained on a single test bench: the team sees not an isolated case, but a distribution — which components consistently consume memory across the entire fleet, and which ones leak only in rare scenarios.
"There's real competition for every megabyte between multiple teams and components: business logic, audio processing, local neural networks," —
Sergey, a developer on Yandex's smart devices team, in the company's blog on Habr.
What This Means
As local neural networks move onto devices, memory is becoming just as critical a resource as computing power used to be. Yandex's case shows that fitting a voice assistant and on-device models into 256 MB takes more than writing careful code — it requires a tool that continuously measures real consumption across the entire device fleet in production.
Need AI working inside your business — not just in your newsfeed?
I build production AI for companies — custom CRM, internal tools, autonomous agents, workflow automation. Owned by you, shaped to your process, no per-seat tax. Built by Zhemal Khamidun, CPO of AlpinaGPT (AI platform, 6,000+ users).
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.