Openpnp high cpu usage

181 views
Skip to first unread message

SMdude

unread,
Dec 27, 2016, 1:05:56 AM12/27/16
to OpenPnP
Hi Jason,

It seems that since some of the recent updates, my cpu usage is very high while openpnp is running. This is not while running a job, this is with openpnp just being open and sitting idle in the background.

Running windows 7 x64
Java was updated a week or 2 ago.

Cheers
openpnp cpu usage.JPG

Jason von Nieda

unread,
Dec 27, 2016, 1:42:28 AM12/27/16
to OpenPnP
Hi SMdude, what version of OpenPnP do you have installed?If it's not the very latest, can you try that? I pushed a chance just the other day that might have affected CPU usage.

Also, do you know about how much it was using previously?

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/97ef0dd8-11d1-4b88-922d-8c840698c7e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

SMdude

unread,
Dec 27, 2016, 2:05:10 AM12/27/16
to OpenPnP
Hi Jason,

I am running the version that was committed today with the diptrace importer.

I am not sure when the high cpu usage started to occur,  but I do know that it has not always been this high.
I will install an instance of the "stable" version and report back shortly.. or maybe longer than that, seems as though it is downloading via a 28k dial up modem!!!
I will update as soon as I know.

Thanks

SMdude

unread,
Dec 27, 2016, 2:18:21 AM12/27/16
to OpenPnP
Ok, have installed "stable" and am using about 25% cpu.
The screenshot shows more cpu being used, but that is because the snipping tool is starting up when it freezes the cpu usage widget. Overall from the graph, you can see that the usage is much less intense.

Thanks

stable.JPG

Zeljko Zed

unread,
Dec 27, 2016, 2:28:04 AM12/27/16
to OpenPnP
Hi Jason,

It is same for me, Win 7 64_bit,  CPU Q9300 - quad core, 8GB RAM, OpenPnP build 1474d2
CPU usage from 60% to 99%. Before this version works OK, but now sometime OpenPNP Not responding and I must kill app in task manager.

Zeljko

SMdude

unread,
Dec 27, 2016, 5:30:39 AM12/27/16
to OpenPnP
Ok so it only seems to do this while there are no cameras plugged in and active. I found that once I had plugged in and set the address of one of my cameras the CPU usage would settle right down.

Zeljko Zed

unread,
Dec 27, 2016, 6:22:55 AM12/27/16
to OpenPnP
Interesting, shortly before and I've tried with a camera and everything is ok

Jason von Nieda

unread,
Dec 27, 2016, 10:06:48 AM12/27/16
to OpenPnP
Thanks folks, I will look into this: https://github.com/openpnp/openpnp/issues/392

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

Jason von Nieda

unread,
Dec 27, 2016, 6:53:22 PM12/27/16
to OpenPnP
Hi all,

I have done some research and testing on this and have not found really great conclusions. It seems like it might be specific to Win 7, at the moment. I tested on Win 10 and while CPU is a little higher, it's nothing like what you are seeing on your systems. I've documented the testing here: https://github.com/openpnp/openpnp/issues/392

Do any of you have a Win 10 system you can test on and see if you get similar results? Or even Win 8.1? I'm trying to find out of this is specific to Win 7 and unfortunately I don't have a way to test on it.

Jason

evilwulfie

unread,
Dec 27, 2016, 7:06:04 PM12/27/16
to ope...@googlegroups.com
win 8.1 here just started the program and see 2% CPU usage 699mb memory no disk usage
Quad core with hyper threading ( 8 cores ) I7

Jason von Nieda

unread,
Dec 27, 2016, 7:36:02 PM12/27/16
to ope...@googlegroups.com
Thanks, that's a helpful data point! Helps narrow it down to a Win 7 issue.

SMdude and Zeljko, can you tell me what version of Java you are running? java -version from the command line should do it.

Jason


evilwulfie

unread,
Dec 27, 2016, 7:48:50 PM12/27/16
to ope...@googlegroups.com
C:\Windows\System32> java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b15)
Java HotSpot(TM) Client VM (build 25.91-b15, mixed mode)

Jason von Nieda

unread,
Dec 27, 2016, 8:02:10 PM12/27/16
to ope...@googlegroups.com
Thanks! I'm going to see about getting a Win 7 VM up and running so I can try to track this down.

Jason


Jason von Nieda

unread,
Dec 27, 2016, 9:42:00 PM12/27/16
to ope...@googlegroups.com
Can anyone who is having this problem try this version and see if it resolves it?


The only change to this version from develop is that the nav panel is disabled.

Jason

SMdude

unread,
Dec 27, 2016, 10:42:17 PM12/27/16
to OpenPnP
HI Jason,

I have just installed the version without the nav panel and my cpu barely batted an eyelid while opening and also once open. I currently have no cameras connected. So the problem is somewhere in the nav panel code..

I am running java version 8 update 111

Cheers

Jason von Nieda

unread,
Dec 27, 2016, 10:45:19 PM12/27/16
to OpenPnP
Thanks SMdude, I've confirmed this with another user too. Seems to be an issue with the nav panel. Unfortunately I am not able to reproduce the issue myself so I can't profile it to find out what is happening. If any of you happen to be Java savvy, I'd love it if someone would run a profiler and tell me what is taking all the CPU :)

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

Jason von Nieda

unread,
Dec 27, 2016, 11:16:45 PM12/27/16
to OpenPnP
Okay, it looks like we had a red herring previously. Can anyone who is experiencing this problem please try deleting your machine.xml (back it up first if you have a real config) and start with a fresh one and tell me if it is still happening? It looks like it may be related to bad camera configurations.

Thanks,
Jason

Jason von Nieda

unread,
Dec 27, 2016, 11:49:42 PM12/27/16
to OpenPnP
Okay, I am 99% sure I've tracked this down to poor handling of bad camera configs. If any of you can confirm that resetting your config fixes the problem then that will help back this up. I know where the bug is and will work on a fix tomorrow.

Jason

Zeljko Zed

unread,
Dec 28, 2016, 2:29:53 AM12/28/16
to OpenPnP
Hi Jason

java version 8 update 111. After install OpenPnP-windows-x64-test.exe  without cameras connected CPU  usage is very low...

Zeljko


On Tuesday, December 27, 2016 at 7:05:56 AM UTC+1, SMdude wrote:

Zeljko Zed

unread,
Dec 28, 2016, 2:41:13 AM12/28/16
to OpenPnP
Hi Jason 

After test version without Nav-panel I remove - uninsatal this version and delete openpnp dir. from user, then  instal again build 1474d2. without cameras conected -
now CPU usage is noraml - low

Zeljko


SMdude

unread,
Dec 28, 2016, 7:33:33 AM12/28/16
to OpenPnP
Ok, deleted machine.xml and started fresh.
Boot up openpnp, cpu usage good.
delete zoom camera and install top and bottom vision cameras.
Close openpnp and re-open, all good(cams still connected)
close openpnp, disconnect cameras
open openpnp, high cpu usage.
Connect cameras, not automatically recognised.
Go to camera setup and set index number(although it was on the correct number) eg it would be on say 1, I change to 0 and "apply", wrong camera, change back to 1, correct camera.
Then when doing the same for the second camera, when apply was clicked openpnp would just hang and the only way to shut it down was via task manager. It did not matter what order the cameras were re-indexed in, it would always hang on the second camera.
Then disconnecting both cameras, and reconnecting them in the original order(top camera first, bottom second) and opening openpnp, both cameras were automatically recognised and cpu usage was normal.

So to me it looks like when the cameras are not initially detected when openpnp expects they shoudl be there, it just keeps on looking for them over and over.
Perhaps if an expected camera is not found on startup, a button needs to pop up somewhere on the user interface to "re-check camera connection".

Got to say, re-configuring machine xml directly from openpnp is getting really easy to do now with all the changes that have been made in recent months!
Thanks for the help.

Cheers

Zeljko Zed

unread,
Dec 28, 2016, 8:12:33 AM12/28/16
to OpenPnP
Hi

Like SMdude is describe, it is same behavior on my PC

Jason von Nieda

unread,
Dec 28, 2016, 11:03:47 AM12/28/16
to OpenPnP
Okay, I believe this is now fixed in the develop branch (Latest on downloads). A bad camera config should no longer cause high CPU usage or kill the nav view. Please download and let me know if you continue to run into problems. 

Thanks,
Jason


On Wed, Dec 28, 2016 at 7:12 AM Zeljko Zed <dab...@gmail.com> wrote:
Hi

Like SMdude is describe, it is same behavior on my PC

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

Zeljko Zed

unread,
Dec 28, 2016, 11:53:28 AM12/28/16
to OpenPnP
Hi Jason

Now is perfect ...

You remind me of my childhood and one cartoon with "Professor Balthazar" - everything is solved quickly and with magical drop ...    :-)

Thank You

Cheers

Zeljko 

evilwulfie

unread,
Dec 28, 2016, 12:32:11 PM12/28/16
to ope...@googlegroups.com
opened up openpnp and the updater worked !!!!

Jason von Nieda

unread,
Dec 28, 2016, 12:46:21 PM12/28/16
to ope...@googlegroups.com
Thanks Zeljko, glad it's working now!

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

SMdude

unread,
Dec 28, 2016, 3:28:18 PM12/28/16
to OpenPnP
HI Jason,

Can also confirm that the autoupdate worked and also your fix :)
I will check it on the machine tonight after work.

Thanks!

Oz-Ron

unread,
Dec 28, 2016, 7:33:28 PM12/28/16
to OpenPnP
Hi Jason,

Also Win 7 32 bit issue.  Now fixed thanks.
The PDF attached shows the idle system, then running the version before the most recent update followed by your latest version running.

Cheers!


HighCPU_Fixed.pdf

Jason von Nieda

unread,
Dec 28, 2016, 11:30:01 PM12/28/16
to OpenPnP
Excellent, thank you for putting this together. Looks good!

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

SMdude

unread,
Dec 29, 2016, 4:38:17 AM12/29/16
to OpenPnP
Hi Jason,

Have played about with my machine tonight and can report that it was the most bug free it's ever been.
No problems with identifying cameras, either plugged in before startup(this is ideal as they come up automatically when openpnp starts)
When openpnp is opened before the cameras are plugged in, plugging in the cameras does not automatically activate them, I have to go to the camera setup and reselect the index number(if it is 1, I change it to another number which activates the apply button, then change back to the original number(1) and hit apply) and then it comes up. And now when doing the second camera it doesn't hang any more :)

Cheers

Jason von Nieda

unread,
Dec 29, 2016, 10:42:58 AM12/29/16
to OpenPnP
Glad to hear it, thanks for reporting in!

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages