08-27-2010 08:18 AM
Hi,
I have a top level VI with in there 8 tabs. within each tab I have a sub-panel with also VI's running.
Everything works well but I noticed that I have a 23% cpu usage when I run the app.
When I run all vis apart from eachother cpu usage is very low, like 0-1% -monitored in windows task manager-.
I am on win 7 with coreI7 @ 3.5 ghz quad core with hyperthreading.
I have distributed all VIs over several threads -e.g. 'standard' 'data acquisition' etc.
so.... I'd like to know why the prog is using so much cpu and what to do about it.
There are no very fast while loops etc.
Solved! Go to Solution.
08-27-2010 08:50 AM
@_Faust wrote:
Hi,
I have a top level VI with in there 8 tabs. within each tab I have a sub-panel with also VI's running.
Everything works well but I noticed that I have a 23% cpu usage when I run the app.
When I run all vis apart from eachother cpu usage is very low, like 0-1% -monitored in windows task manager-.
@I am on win 7 with coreI7 @ 3.5 ghz quad core with hyperthreading.
I have distributed all VIs over several threads -e.g. 'standard' 'data acquisition' etc.
so.... I'd like to know why the prog is using so much cpu and what to do about it.There are no very fast while loops etc.
You have painted a picture of an iteraction issue that prompts me to ask if you have tried all possible combinations of the eight to determine if two or more are fighting with each other over some shared resource?
Ben
08-27-2010 09:02 AM
Also you need to make sure that there aren't "things" in the sub-vi's that are actually causing them to use the UI thread, an already pretty busy one. Some of the things are using property nodes to update controls in the sub-vi's, using .dll's that aren't able to be marked "run in any thread" (the default is the UI thread).
08-27-2010 09:04 AM
THere aren't any over-lapping objects when run in the sub-panels are there?
Ben
08-27-2010 10:28 AM
Ben,
What do you mean by overlapping objects?
I think there are plenty of things running in the user interface thread, there are plenty of property nodes around, although
I try to use them as little as possible as I've understood that a property node forces a screen update.
How can I control whether a screen update occurs or not?
When I am viewing another tab, can I temporarily 'hold' vi's in others or stop their updates?
08-27-2010 10:36 AM
Over-lapping
When part of the screen used to display one object is shared by another object (in edit mode selct both and observe if the selected region have common screen realestate) both images have to be updated to update the screen.
Non-showing tabs should not update until you switch to them.
FP Defer.Update when set true will do ONE screen update then prevent all further updates until it se set false again.
In about LV 8.2 -8.6 there was bug where the defer in a sub-panel was not working.
In about the same version range there was bug where re-sized property nodes invoked more than one call of the UI thread.
I still want to hear bout your attempts to investigate which object are fighting with each other over CPU.
Ben
08-27-2010 01:25 PM
Well there are plenty objects overlapping, to give you an impression about how the prog looks like, see the attached figure.
I have no clue where or how to start figuring out why it is using so much cpu.
For example:when I start a blank vi and just put in 5 while loops having a control updated, I dont see my cpu usage rise very high. Probably cause its only using one core but still.
Most while loops have delays of 400 ms at least and I have plenty of loops with events.
Last, I have on 4 places timed loops -in different vi's-
And I uses queues only to pass around data, usually a 1 element queue with a cluster in it.
08-27-2010 02:09 PM
well well well it is solved.
I started disabling vi's from the main vi one by one and discovered that there was one VI where I didnt put a wait in the while loop.
It was a while with a case, where usually the true case is executed -it does something-, however when the prog is in idle mode it doesnt do anything and I shouldve put a wait there.
Soooo problem solved sorry for bothering you guys.
08-27-2010 02:17 PM
I appreciate you marking my post as the solution but your final post holds the real answer so for those that search and find this thread, it would be better that your post is marked as the solution.
Take care,
Ben
PS IN the option in the top right of my post there is an option to revoke...
05-15-2020 05:40 PM
Hello, Can you please clarify a bit more? Because I am having the same problem. Once I run the simulation, the CPU's cooler starts to cool down the CPU. I am using Win10 (64 bit) with I7-9th generation. Multisim (version 13 , 32bit).
Please advise...