communications-skill icon indicating copy to clipboard operation
communications-skill copied to clipboard

High CPU usage

Open adocampo opened this issue 6 years ago • 3 comments

Hello,

As explained on #6, this skill devours CPU cycles. I did a (quite boring) video where I show how one CPU rises from 8% to almost 100% for the process python3 -m mycroft.skills jus by downloading the skill and being recognized. https://cloud.docampo.net/index.php/s/fxXMQXQoiwFbpYB

What I saw so far:

  • The video shows a i7 7700 CPU, and the fan starts to make some noise
  • I did it also on a i7 2600 CPU and well, that CPU instead of 100%, went to 80%, but the CPU fan starts to make an unbearable noise
  • On a RPi, one CPU also goes to 100%, no fans means no noise, but I notices some "slowness" of the device.
  • I think mycroft.skills process is mono-thread, if that's true, carrying its CPU at 100% will concur on global bad performance

To be honest, I had to remove the skill because the fan noises, they are quite annoying.

adocampo avatar Aug 21 '19 10:08 adocampo

Okay, thanks for the benchmarking! I'm not sure why this is happening, but I bet that its because of the 3 threads that I spawn, to make the skill work. I need to keep the first thread running because that's what makes the skill work (it handles incoming message)

(Notes to myself:) However, I can probably stop the other two threads after a little while (they're related to finding the other devices), after they've found other devices. Then just use an intent to start device "paring" :Hey Mycroft, find my devices and that would start the other two threads, with the exact same behavior.

LinusSkucas avatar Aug 21 '19 15:08 LinusSkucas

Adding mm comment because it is relevant: https://chat.mycroft.ai/community/pl/rktt7qe33tyt7r9sk1fjjedk7y

Also, @ChanceNCounter is also having this problem.

LinusSkucas avatar Dec 14 '19 04:12 LinusSkucas

Oh, no I'm not! Sorry, I didn't mean to leave that impression. I was trying to diagnose this problem before installing the skill to a potato.

ChanceNCounter avatar Dec 14 '19 21:12 ChanceNCounter