Discussion:
seeking CPU load increasing
(too old to reply)
Yves
2008-08-12 12:10:12 UTC
Permalink
Hi I have a nasty problem. When my program is running several days the cpu load increases.I have a main. vi that acquires data and has one part of the user interface. In the background there are several sub program running. I can access those sub programs by clicking on buttons in the main vi. The sub programs are called by references. That means I can't run the NI "perfomance and memory" tool and get correct values.How can  get rid of this problem?Thanks for any help.If it helps I could also post some printscreens of the vi's.Yves
JoeLabView
2008-08-12 12:10:12 UTC
Permalink
Yes, it would help if you post screenshots of the VI's. Or better yet, attach the VI's. 
R
muks
2008-08-12 12:40:07 UTC
Permalink
Running program for several days.Is it logging the data in c:?
Ben
2008-08-12 13:10:07 UTC
Permalink
Yes screen shots help.
 
CPU increasing, but how about the meory usage?
 
If its CPU and not memory then I have to guess that some object is being asked to do more work as time goes on, so...
 
Charts?
 
Graphs?
 
Tables?
 
Array indicators?
 
If all else fails start chopping out parts until the patient gets better. Then figure out what it was that removed.
 
Ben
Yves
2008-08-12 14:10:07 UTC
Permalink
Thank you for your help. Well, the memory is slightly increasing. From 1GB to 1.8GB. But this should not be the problem. This is mainly due to read files whose content is placed into a "multicolumn listbox".The computer is a Intel Quadcore, 4GB RAM, Windows XP SP2.The attached subprogram is a very lean one. (I wrote it for testing). And in general there are 60 or more of those subprogram running independently on the computer.Regards,Yves


Example Subprogram.pdf:
http://forums.ni.com/attachments/ni/170/348593/1/Example Subprogram.pdf


Main FrontPanel.pdf:
http://forums.ni.com/attachments/ni/170/348593/2/Main FrontPanel.pdf


Main Blockdiagram.pdf:
http://forums.ni.com/attachments/ni/170/348593/3/Main Blockdiagram.pdf
Ben
2008-08-12 14:40:20 UTC
Permalink
:smileysurprised:
I'll start with the "low hanging fruit" and leave the real work for others.
Start by replacing all of you "wait Until Next MS Multiple" with the normal "Wait ms" version. The reasoning behind this suggestions is this. As the time required to do your processing increases, you will eventually get to the point where the work takes longer than the wait. So when a loop iteration time becomes 1.75 the specified wait value, you will have missed one of the multples and the function returns after only wait 0.25 of the specified value. So as the work-load grows, the breaks become shorter. The other aspect of the Wait until... is that if you are using wait values that have a common factor, the "Wait Unitl..." effectively sets up all of you threads to wake-up at the same time (the common multiple) and fight for the CPU rather than spreading the work out.
I'll let others comment on others things you should look at. But while you are waiting, you may want to review the posts I have linked in this <a href="http://forums.ni.com/ni/tagging/view_tag?tag.text=LabVIEW_Performance&amp;tag.message_scope=all" target="_blank">Tag LabVIEW_Performance</a>.
Ben
JoeLabView
2008-08-12 14:40:21 UTC
Permalink
Your explanation makes sense, Ben..
Yves
2008-08-13 06:10:06 UTC
Permalink
Ok. I'll change the "Wait ms" and see what happens. I forgot to mention that the increasing of the memory is certainly due to the filling of the Listbox. I don't empty them when I close the Front Panel.Yves
Yves
2008-08-13 08:10:06 UTC
Permalink
@ Ben: why is the tag not working anymore. I had it open and when tried to reopen it I'm getting the forum homepage...:smileysad:
Ben
2008-08-13 11:10:06 UTC
Permalink
It looks like the was a change made to the forum last night.&nbsp;Try <a href="http://forums.ni.com/ni/tagging/view_tag?tag.text=LabVIEW_Performance&amp;tag.message_scope=all" target="_blank">this</a>. &nbsp;BenMessage Edited by Ben on 08-13-2008 05:52 AM
tarun mishra
2008-08-12 13:10:08 UTC
Permalink
see may be any reason,
you should also check for Virus in Windows.
&nbsp;
Continue reading on narkive:
Loading...