Showing results for 
Search instead for 
Did you mean: 

Occurrence Loop using 3 CPU cores

I ran into the situation recently that an occurrence was invalid, and the loop waiting for this occurrence didn't handle the timeout. This causes 37% CPU load on my 8-core machine (i.e. equivalent of 3 cores being fully utilized). This seems surprising, since usually a single loop will run in one thread and thus cannot use more than one CPU core.

I created a very simple test VI which shows the same behavior.


Running this VI on a multi-core CPU fully utilizes 3 CPU cores (on my machine).

Using Performance Monitor shows that this simple VI uses several threads.

Doing the same test with a notifier instead of an occurrence uses only 1 thread (and thus utilizes 1 CPU core).


Any idea what is happening here? How can this loop fully utilize 3 cores?



Message 1 of 3
I can confirm I am seeing the same behaviour in LV2014 - maxes out all 4 cores on my i5 machine.

Interestingly, I ran the desktop execution trace toolkit and it didn't show up anything strange.

Maybe this is why they suggest in the documentation for occurences to use notifiers instead?

LabVIEW Champion, CLA, CLED, CTD
0 Kudos
Message 2 of 3

Yeah we're moving away from using occurrences slowly.

But probably it helps to detect the implementation bug, with a notifier only 1 core would have been maxed out.

Just for completeness, queues also show the expected behavior, maxing out 1 core.

I'm curious how the occurrence loop can max out 3 or 4 cores. Must be heavily parallelized internally Smiley Wink

0 Kudos
Message 3 of 3