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

Notification

Icon
Error

Grid + local performance question
wilhelmmedetz
#1 Posted : Tuesday, March 1, 2016 9:01:09 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 7/4/2012(UTC)
Posts: 35

Was thanked: 2 time(s) in 2 post(s)
Hi,

I have the following configuration:

NCrunch 2.19.0.4

local:
Logical CPU Cores: 4
Physical CPU Cores: 2
Physical Memory: 8.071
CPU: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
Task Capacity: 2

Azure Virtual Machine:
Logical CPU Cores: 4
Physical CPU Cores: 4
Physical Memory: 14.335
CPU: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
Task Capacity: 4

Fast lane threads: 1

Solution used for testing performance:
24 projects (6 test projects).
All projects use Code Contracts.
Copy referenced assemblies to workspace: true for 3 test projects

Times for enabling NCrunch and building all 24 projects and executing all tests
local: 56 seconds
Azure Virtual Machine: 37 seconds
local + Azure Virtual Machine: 57 seconds

Why is it that building and executing the tests on the local system and Azure Virtual Machine takes as long as on the local system alone (I would have expected it to take as long as on Azure Virtual Machine alone or maybe even faster)?

As far as I can see all build/test task are executed twice once local/once on the remote system - is this by design or have I configured something wrong?

I don't want to disable the local system, as I do not always have a (fast) connection to the remote system.

Any ideas how to improve this behavior?

Regards

Wilhelm
Remco
#2 Posted : Tuesday, March 1, 2016 9:36:28 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)
Hi Wilhelm,

When NCrunch works over a grid, it will duplicate build and analysis tasks so that each node (+ local) will build and analyse the same project.

The alternative design considered was to have a single node (or local) build each project, then transfer the artifacts across the grid. This alternative design was rejected for the following reasons:
1. It was excessively complex, as presently grid nodes cannot connect to each other and the artifact transfer would need to be orchestrated by the local system. This was problematic when working in 'grid only mode'
2. There is little performance benefit from doing this, as the projects can still only be built as fast as a single machine can build them. This means that while one system is building the projects, the others are sitting idle waiting for the artifacts
3. Transferring build artifacts requires reliably identifying them. As build logic is essentially user code and is heavily customisable, there is no 100% reliable way to do this. Missing artifacts could result in strange problems downstream.

Considering the number of projects in your solution and your use of code contracts, I would speculate that the bulk of the processing being performed by NCrunch on your solution is being spent building projects. NCrunch's distributed processing doesn't give any performance benefits for building projects, as the MSBuild system itself is not distributed and the projects still need to be built in dependency order.

You might find that the only real benefit you receive from distributed processing is the ability to offload work from your local machine onto the azure node to keep your local resources free. If you later start adding tests to your solution with a high run time, distributed processing would become much more valuable.

Note that the custom protocol used for distributed processing was designed with consideration for slow network connections. The system will retain existing data on the remote node and will update it only with fresh changes that are made to the local solution. If you're concerned about the speed of your connection affecting the engine's performance, I recommend first experimenting before drawing any conclusions on whether or not to disable the local machine. Your azure node looks to be much better suited for background execution.
wilhelmmedetz
#3 Posted : Tuesday, March 1, 2016 3:39:42 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 7/4/2012(UTC)
Posts: 35

Was thanked: 2 time(s) in 2 post(s)
Thanks for the clarification

Wilhelm
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.036 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download