Page 1 of 1

Phidgets Spatial CPU Usage every 2 minutes

Posted: Thu Nov 12, 2020 10:13 am
by clohier
Hi everybody,

I'm using a Phidgets Spatial device connected to a linux system.

I noticed that every 2 minutes, I have a CPU load increase during about 30 seconds.

My software is normally around 25% - 30% CPU usage, but every 2 minutes, I have a CPU load peak to 60% - 65% during about 30 seconds.

Does something special happens every 2 minutes ??

Did anybody already noticed such behaviour ? Can anybody explain me the reason of this CPU load and if it is possible to avoid this ?

If I disconnect the Phidgets Spatial, no CPU load problem anymore.

I suppose this is may be due to Phidgets library protocol but I don't know why...

For your information, I tried with the latest version of the libphidget22 (2020-10-23) with Spatial 1044_0 and 1044_1 and the same behaviour was observed...

Thanks to all of you,

Cyrille

Re: Phidgets Spatial CPU Usage every 2 minutes

Posted: Fri Nov 13, 2020 10:42 am
by clohier
Hi all,

I continued my investigations and here are some additional information.

The problem since to appear from the moment I call Phidget_open().
I tried to disable PhidgetLog, Phidget log rotating, PhidgetLog Network...

But the problem is still occuring... :(

Thanks in advance for those who will help me find a solution.

Re: Phidgets Spatial CPU Usage every 2 minutes

Posted: Mon Nov 16, 2020 11:24 am
by Patrick
What is your software doing with the spatial? Have you ruled out your own code? I can't think of anything in particular that would be spiking CPU on a 2 minute interval.

-Patrick

Re: Phidgets Spatial CPU Usage every 2 minutes

Posted: Mon Nov 23, 2020 7:47 am
by clohier
First of all, Thanks Patrick for your reply.

Well, my software does almost nothing with the Spatial when the problem appears.

As I wrote in my last post, I commented everything linked with the Spatial after a call to Phidget_open() and the problem still occurs. :(

I will investigate writing a little program dealing only with the Spatial. Then I will try to add some traces in the library libphidget or try to use a debugger to identify a piece of code responsible of this behaviour.

Re: Phidgets Spatial CPU Usage every 2 minutes

Posted: Mon Nov 23, 2020 10:14 am
by Patrick
Hi,

I will do some profiling on Linux and see if I can track it down - it may take awhile.

Thanks for reporting - if you do track anything down, or need help deciphering the library, send me an e-mail.

Thanks,
-Patrick