Jump to content
ASalcedo

Slow executable on a different PC

Recommended Posts

Hello to all.

First I explain my environment and then I will ask the question.

PC 1 (development PC): intel i5, windows10 64bits, 8GB Ram, Labview 2015 SP1 (32 bits), Vision Adquisition Software 2015, Module Vision 2015, DSC 2015, ni OPC Server.

PC 2 (deployment PC) : intel celeron 1.99 GHz, windows 7 64bits 8GB Ram, Labview 2015 SP1 (32 bits), VIsion Adquisition Software 2015, Module Vision 2015, DSC 2015, ni OPC Server, Run Time Engine 2015, VIsion Run Time 2015.

PC 3 (deployment PC) intel Atom CPU N2600 1.40GHz, windows 7 64bits, 4GB Ram, Labview 2015 SP1 (32 bits), VIsion Adquisition Software 2015, Module VIsion 2015, DSC 2015, ni OPC Server, Run Time Engine 2015, VIsion Run Time 2015.

I use the next in my aplication:

2 cameras GigE Lan connected to PC. A PLC connected RS232 through ni OPC server and about 15 shared variables.

In development environment my application works well. In PC 2 a executable of my application works well.

But the problem is that the same executable works bad in PC 3. Front Panel is slow and displays of image cameras don't refresh the image well. So all my application is slow in PC 3.

What can it be? I don't think that it could be the specification of PC 3 but I don't know... Does anyone fix something similar?

Any help will be appreciate it.

Thanks a lot.

Share this post


Link to post
Share on other sites

Well. The Celeron is probably a quad core and the Atom you describe is a dual core but you might also look at the Ethernet port since most budget boards use 10/100 rather than Gb ethernet.

Share this post


Link to post
Share on other sites
25 minutes ago, ShaunR said:

Well. The Celeron is probably a quad core and the Atom you describe is a dual core but you might also look at the Ethernet port since most budget boards use 10/100 rather than Gb ethernet.

Hello. Thanks for repalying.

I thought that but for example if I open NI Max the images are captured well with no problem in refresh. So I do not know what happens with executable.

Share this post


Link to post
Share on other sites
50 minutes ago, ShaunR said:

Well. The Celeron is probably a quad core and the Atom you describe is a dual core but you might also look at the Ethernet port since most budget boards use 10/100 rather than Gb ethernet.

He again.

The specification of Atomo is the next: http://ark.intel.com/products/58916/Intel-Atom-Processor-N2600-1M-Cache-1_6-GHz

So it has 2 cores. Celeron has 4 cores.

As weel I check the requirements for Labview application here: http://www.ni.com/labview/requirements/esa/

It says that the minimun requirement is pentiun 3 for Real Time Engine. So maybe the problem is the specification of Atom PC?

My software has 6 'whiles' so it is using multithreading I guess.

Thanks.

Share this post


Link to post
Share on other sites
3 hours ago, ASalcedo said:

My software has 6 'whiles' so it is using multithreading I guess.

Thanks.

I'd suggest that it is fairly likely that you have at least one of your while loops completely consuming one of your quad cores on the original machine, and your dual core atom processor doesn't have a free core to devote.  Look through your different loops and see if one is missing some timing, (e.g. a polling loop that is polling as fast as possible) and add a wait timer to slow it down even just a little.

  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, ASalcedo said:

As weel I check the requirements for Labview application here: http://www.ni.com/labview/requirements/esa/

That's the minimum to install the IDE, it isn't the minimum for any application you can write.  I can clearly write an application which requires more processing power than that.

 

8 hours ago, ASalcedo said:

I thought that but for example if I open NI Max the images are captured well with no problem in refresh. So I do not know what happens with executable.

In this case MAX isn't doing anything else.  I'd say evaluate your code, find slow parts, and inefficiencies.  An atom just might be under powered for what you want.  Oh and your low power PC might not have a GPU that the vision toolkit or OS might be using for rendering.

Share this post


Link to post
Share on other sites
8 hours ago, JKSH said:

Run your application on PC 2 and PC 3. Launch Resource Monitor.

Are you hitting the limit of any resource(s)?

Hello.

In PC3: CPU ussage is about 45-50%. LAN 1 and 2 is about 90%. Memory ussage is about 40%.

Maybe the atom is under power for I want to do...

That is true that if I put some delay in whiles the program improve but not what I want..

How can I do pooling? or How can I know which whiles are consuming a lot?

 

Thanks.

Share this post


Link to post
Share on other sites
19 hours ago, Jordan Kuehn said:

I'd suggest that it is fairly likely that you have at least one of your while loops completely consuming one of your quad cores on the original machine, and your dual core atom processor doesn't have a free core to devote.  Look through your different loops and see if one is missing some timing, (e.g. a polling loop that is polling as fast as possible) and add a wait timer to slow it down even just a little.

How can I see if a while is missing timing?.

It is true that if I add some delays the program improves but not at all.

15 hours ago, hooovahh said:

That's the minimum to install the IDE, it isn't the minimum for any application you can write.  I can clearly write an application which requires more processing power than that.

 

In this case MAX isn't doing anything else.  I'd say evaluate your code, find slow parts, and inefficiencies.  An atom just might be under powered for what you want.  Oh and your low power PC might not have a GPU that the vision toolkit or OS might be using for rendering.

How can I find slow parts?

Thanks!

Share this post


Link to post
Share on other sites
3 hours ago, ASalcedo said:

In PC3: CPU ussage is about 45-50%. LAN 1 and 2 is about 90%.

Well that's not good.  Is this PC a 100M connection as Shaun asked earlier?  I doubt you'd be using up 90% of a gigabit connection.  Is this a PC that can handle a PCIE network card that is a gigabit to test out with?

Share this post


Link to post
Share on other sites

I recently ran a simple vision application with a single camera that ran perfectly smoothly on a desktop CPU but absolutely choked on an Atom tablet. Nothing fancy going on either...

Share this post


Link to post
Share on other sites

Again not saying this is the issue, but many desktop CPUs have somewhat decent integrated graphics now a days, even lower end Core I3 has had some integrated Intel HD graphics.  These are still pretty poor for gaming, but basic video rendering, playback, and streaming could see some benefits.

Share this post


Link to post
Share on other sites
8 hours ago, hooovahh said:

Again not saying this is the issue, but many desktop CPUs have somewhat decent integrated graphics now a days, even lower end Core I3 has had some integrated Intel HD graphics.  These are still pretty poor for gaming, but basic video rendering, playback, and streaming could see some benefits.

Well I was going to say that labview rendering relies on the CPU so I'd think memory and cpu would be a bigger deal (cache on the atoms is tiny, so for even moderately sized images I'd bet processing would be expensive even with prefetching) but it turns out that on one benchmark, my old atom tablet (about 2x the power of the one listed) gets a rating of "1%" where 100% is a mid-priced current gen discrete card (~$250)....so yeah, maybe the GPU :/

Also doing a simple network benchmark uses 33% of the cpu (about 10% for "system" which I believe on windows 10 is the process actually reading from the network before it gets forwarded to the metro app). This was for a whopping 3 MB/s (although, over wifi)

Share this post


Link to post
Share on other sites
On 1/18/2017 at 5:40 PM, ASalcedo said:

In PC3: CPU ussage is about 45-50%.

PC 3 has 2 cores, right? 50% CPU usage means that one of your cores is running at 100%. Jordan is probably correct: You have at least one while loop running wild.

Run Resource Monitor on PC 2 too. I suspect you'll find your application using 25% CPU there (1/4 cores).

 

On 1/18/2017 at 5:42 PM, ASalcedo said:

How can I see if a while is missing timing?

Look at your code. For each loop, tell us: How frequently does the code inside the loop run? (Is it... once every second? Once every 10 ms? Once every time a queued item is received?)

Anyway, here's a small note about loop timing:

Loop Timing.png

 

On 1/18/2017 at 5:40 PM, ASalcedo said:

LAN 1 and 2 is about 90%.

You haven't answered the questions asked by ShaunR and hooovahh: Are your Ethernet ports 100 Mbps or 1000 Mbps? Since you are using GigE cameras, you need to use Gigabit (1000 Mbps) Ethernet ports.

 

On 1/18/2017 at 5:40 PM, ASalcedo said:

Memory ussage is about 40%.

This should be fine, if you don't run anything else on the PC.

Share this post


Link to post
Share on other sites
8 hours ago, JKSH said:

Loop Timing.png

If you use a "Wait" (or Wait until next millisecond) with a value of zero, it will yield when other tasks want the processor but run full-pelt if not.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.