96% CPU: where a robot's processor actually goes
- Log
- 8 of 25
- Date
- Reading
- 2 min read
Skills in this log
On the evening of 20 October I asked myself a blunt question: is the robot already out of breath? And if so, do I need a laptop next to it for every demo?

What the numbers said
At 19:51 the robot’s processor was at 96%. My program alone used 2.3 of its four cores, the maker’s software 0.9. Memory and temperature were fine: 3.1 GB free, 54 °C, no throttling. So the machine was not failing. It was simply full.
Then the budget, measured over 110 minutes, in cores used on average:
| Who | Cores |
|---|---|
| Vision: finding faces and making fingerprints | 1.65 |
| Receiving the camera images, 30 per second, 1,280 × 720 | 0.16 |
| Sound, direction of the noise, the rest | 0.14 |
| Not attributed | 0.13 |
| My program, total | 2.08 |
| The maker’s software, alone | 0.38 |
Vision ate almost everything. And per image, with me in view, the work added up to about 750 milliseconds of processor time.
Inside the machine
OpenCV, the vision library, splits its work across all four cores by default. That sounds faster. On a small processor shared with other programs, it is mostly more expensive. I measured the processor time per image with four threads, then with one:
| Step | 4 threads | 1 thread |
|---|---|---|
| Find faces, 640 px | 232 ms | 160 ms |
| Refine the face box | 135 ms | 88 ms |
| Make one fingerprint | 387 ms | 323 ms |
With one thread, each step costs less processor time in total. The work is the same. The extra is most likely the cost of coordinating four threads, and of competing with the other programs for the same cores.
There was a second clue. In 112 minutes the program handled 26,353 images, 3.9 per second. Its target was 6. It never reached it, and its loop never slept. A loop that never sleeps takes everything you give it.
The change
One setting: OpenCV on a single thread. Installed on the robot at 21:07:
| Measure | Before | After |
|---|---|---|
| My program | 2.41 cores | 1.24 cores |
| Whole robot, while I dictated | 96% | 73% |
My answer to the evening’s question: the robot is not saturated by its hardware, it is saturated by the way I made it perceive. It computed a fingerprint on every image, and searched for faces at full speed even when nothing happened.
Next
That was the cheap lever. The real one meant changing how the robot keeps track of who is in front of it.

