Phidgets Spatial CPU Usage every 2 minutes

C, C++, and Visual C++
Post Reply
clohier
Fresh meat
Posts: 3
Joined: Thu Nov 12, 2020 10:02 am
Contact:

Phidgets Spatial CPU Usage every 2 minutes

Post 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
clohier
Fresh meat
Posts: 3
Joined: Thu Nov 12, 2020 10:02 am
Contact:

Re: Phidgets Spatial CPU Usage every 2 minutes

Post 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.
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Phidgets Spatial CPU Usage every 2 minutes

Post 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
clohier
Fresh meat
Posts: 3
Joined: Thu Nov 12, 2020 10:02 am
Contact:

Re: Phidgets Spatial CPU Usage every 2 minutes

Post 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.
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Phidgets Spatial CPU Usage every 2 minutes

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests