cpu load serial-monitor.exe

35 views
Skip to first unread message

Holger Lembke

unread,
Feb 10, 2025, 10:37:29 AMFeb 10
to Developers
Moin!

I always stumble across the relatively high cpu load serial-monitor.exe creates.

Mine currently has about 6% on an idle system. That is the task with the most cpu load.. Even more than Firefox... Why? As far as I see, it only reads from stdio and writes back to stdout (?)

mfg
Holger



c.ma...@bug.st

unread,
Mar 3, 2025, 11:48:35 AMMar 3
to devel...@arduino.cc, Holger Lembke

Hello Holger,

serial-monitor.exe is a proxy between the serial port and the client that runs it (the Arduino IDE or the Arduino CLI). It is part of the ecosystem that we call Pluggable Monitors https://docs.arduino.cc/arduino-cli/pluggable-monitor-specification/

The client controls serial-monitor.exe via stdio, it sends ASCII commands to open/close the serial port and set options like baudrate, parity etc.
Once the serial port is opened, communication with it is done on a different channel via network TCP/IP (using the loopback interface).

The CPU load may depend on how much data is transferred via the serial port. In the early tests we did, it could handle several MB/sec, and the process may easily starve one CPU core.

If you think the load on your CPU is excessive you could open an issue on the serial-monitor github repo with the instructions to reproduce and we will take a look -> https://github.com/arduino/serial-monitor

Thanks!

C

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.
To view this discussion visit https://groups.google.com/a/arduino.cc/d/msgid/developers/2e361758-24a0-4998-b50a-0699de340b23n%40arduino.cc.

Holger Lembke

unread,
Mar 4, 2025, 7:59:31 AMMar 4
to c.ma...@bug.st, devel...@arduino.cc
Moin!

This error seems to be caused by some mysterious effects I can't point out. Currently, it is gone. But it was there. Just attach any board with an empty sketch and load is at 8 %. 

Might have a background in my PC-use-case with lots of hibernates and reboots only every other month...

So it does not make any sense to open an issue. And I looked into the source code, too. I did not see any obvious problems... (All this comment free golang code, pffff.)

mfh
Holger


Holger Lembke

unread,
Mar 5, 2025, 6:33:09 AMMar 5
to c.ma...@bug.st, devel...@arduino.cc
Moin!

Addendum:
* seems it is related to a certain board type: esp8266 (3.1.2 https://arduino.esp8266.com/stable/package_esp8266com_index.json)
if I select a different board type, the load is gone.

* something is pumping data...
as far as I can see, there is a thread continuously moving data.

grafik.png




c.ma...@bug.st

unread,
Mar 5, 2025, 6:49:11 AMMar 5
to Holger Lembke, devel...@arduino.cc


Thanks for investigating the problem Holger!

please open an issue at https://github.com/arduino/serial-monitor/issues we'll continue the discussion there.

thanks

C.

Reply all
Reply to author
Forward
0 new messages