Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Core assignment backwards?
Axima
#1 Posted : Wednesday, August 30, 2023 11:58:03 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/13/2017(UTC)
Posts: 15
Location: Australia

Thanks: 4 times
Was thanked: 3 time(s) in 3 post(s)
I am seeing some unexpected behaviour when assigning all but 1 core to either VS, or NCrunch.
It seems like the values are applied backwards.

In this case the logical core 15 is an E-Core, which is non hyperthreaded.

Example 1: Assigning 15 cores to NCrunch, 1 core to VS, and rebuilding solution.
Expected: Build to be slow, mainly activity on VS core.
Actual: Build took 3 seconds, activity on all cores:

Screenshot: Assigned to NCrunch

Example 2: Assigning 15 cores to VS, 1 core to NCrunch, and rebuilding solution.
Expected: Build to be fast, activity over most cores.
Actual: Build took 26 seconds, activity only on NCrunch core:

Screenshot: Assigned to VS
Remco
#2 Posted : Thursday, August 31, 2023 12:27:27 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Thanks for sharing this.

Can you try the following and see if this affects your results?

1. Start VS and enable NCrunch
2. Ensure all work has finished (i.e. everything is idle)
3. Open task manager, look for the process called 'VBCSCompiler.exe'. Forcefully terminate it.
4. Rebuild your projects in VS
5. Repeat your performance tests while ensuring NCrunch doesn't run any local builds and is not reset at all

My suspicion is that this is caused by NCrunch assigning its affinity settings to VBCSCompiler.exe, which is a shared build process also used by VS.
Axima
#3 Posted : Thursday, August 31, 2023 5:42:02 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/13/2017(UTC)
Posts: 15
Location: Australia

Thanks: 4 times
Was thanked: 3 time(s) in 3 post(s)
Hi Remco,

Using those steps, this time the build was fast and used all cores in both examples.
Remco
#4 Posted : Thursday, August 31, 2023 6:33:20 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Thanks for confirming this.

I believe I owe you an apology. When advising you to give NCrunch a single core, I forgot entirely about VBCSCompiler.exe, which as described is shared by both VS and NCrunch. This process has always been somewhat of a troublemaker when it comes to thread affinity. We capture it under NCrunch's cores because otherwise NCrunch's background building steals CPU away from VS. A side-effect of this is that we also end up impacting VS's own builds.

Considering the above, I would recommend doing away with the core affinity and simply assigning ALL cores to both VS and NCrunch when working in grid-only mode. It looks like you have enough cores for both. Better to let the O/S sort it out.
1 user thanked Remco for this useful post.
Axima on 8/31/2023(UTC)
Axima
#5 Posted : Thursday, August 31, 2023 9:58:19 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/13/2017(UTC)
Posts: 15
Location: Australia

Thanks: 4 times
Was thanked: 3 time(s) in 3 post(s)
Ok thanks for the advice, I will give that a go.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.041 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download