How do I determine my bottleneck when executing unit tests?

0

1

I've a very large solution, with 11K+ unit tests, and on my desktop it takes about 30 minutes to run them; on my laptop it takes 60 minutes.

NOTE: I've already swapped out the HDD for SSD and it provided no increase.

Differences in Machines

Processor

  • Desktop: Intel Xeon W3550 @ 3.07 GHz (8 cores)
  • Laptop: AMD A10-5745M APU with Radeon HD Graphics (4 cores)

RAM

  • Desktop: 6 GB
  • Laptop: 6 GB (upgradable to 16 GB)

NOTE: I'm not sure how to determine more specs on the RAM so guidance is appreciated if it's needed.

Question

Alright, so armed with that information, when running my unit tests how would I determine if it's the RAM or the processor that's the bottleneck? As stated above, the RAM is upgradable, and I believe the processor is a little but marginally.

Mike Perrenoud

Posted 2014-05-28T16:17:54.243

Reputation: 241

They both have the same amount of ram. That's a pretty big clue that it's prolly not the RAM. I would assume it's the fact that you're working with two very different processors. Beyond the fact that the Intel has more cores than the AMD, the AMD is for more "consumer" level processing. The Xeon is made for more Server level processing which in this case will help you out. – James Mertz – 2014-05-28T16:30:02.220

@KronoS: thanks. I didn't know about the RAM because I didn't know if CAS Latency between the two may cause issues or not. – Mike Perrenoud – 2014-05-28T16:30:57.480

Not to the extent that you're experiencing. At least that's what I assumed. BTW I believe that this question is a little too broad for this site. It's going to be really hard to pinpoint what the issue is here. Just warning ya in case it gets closed. – James Mertz – 2014-05-28T16:43:40.457

@KronoS: thanks again! But, as stated in the question, I'm hoping to have somebody on here help me understand how I can determine the cause. What is the right way to determine or verify it's the RAM vs. the processor. The last question got closed because I wasn't asking it that way. – Mike Perrenoud – 2014-05-28T16:45:10.913

Install the WPT (http://social.technet.microsoft.com/wiki/contents/articles/4847.install-the-windows-performance-toolkit-wpt.aspx), run WPRUI.exe, select CPU, Resident Set, DISK and File IO. Run this on both system for 60s while running the unit tests and stop the trace. Compress the ETL + the PDB folder(very important to also share the folder !!!!!!!!!!!!!!!) as 7z/RAR and share the compressed file (cloud service and post a link here).

– magicandre1981 – 2014-05-29T07:46:36.207

have you captured the traces so that I can compare them to see the bottleneck? – magicandre1981 – 2014-05-29T17:28:12.527

@magicandre1981: no I haven't yet, but will be as soon as possible. – Mike Perrenoud – 2014-05-29T17:34:48.463

Answers

1

I think a good way to answer your question is by using the KISS method: Keep It Super Simple.

Because you are comparing 2 computers, there is always going to be little things (RAM speed, FSB speed, age of hardware, background processes running, hard drive fragmentation, motherboard manufacturer) that will effect how fast solutions will be completed. Most of the time, these little things will only amount to a 0.1% - 5% change in the end result (making it negligible).

Leaving the little things aside, lets compare the two hardware specs you have listed:

As for the Memory, both the desktop and the laptop have the same amount of RAM (6 GB). If you were to put more memory in the laptop, I'm sure you'd see a little decrease in the completion time of the solution. Increasing the amount of RAM will give the OS a bit more breathing room to store information it needs and information you are running in your solution. Depending on the software you are using and the type of solution you are running, you could see anywhere from a 5% increase to a 200% increase. But as you have not supplied that information, I can not say for sure.

But because both computers have the same amount of memory, the program running on the 1 computer won't be able to gain an advantage by using any more memory than the other computer. As for this reason, memory is not the issue here and is a moot point.

As for the Processor, the 2 computers are vastly different in this regard. The desktop computer has a 8 core Intel Xeon processor while the laptop is stuck with a 4 core AMD processor. In terms of the speed of each processor, the Intel has a clock rate of 3.06 GHz while the AMD has a clock rate of 2.9 GHz. While this wouldn't give the desktop a huge advantage, it does give it a small one.

The big thing here is the fact that the Intel processor has 8 cores while the AMD only has 4. Because of this, the Intel can processes 2 times more information in the same amount of time than the AMD can. This makes the Intel processor 2 times faster than the AMD one. This is also why the Intel processor completed the task 2 times faster than the AMD processor did.

In conclusion, I would say that the AMD processor in the laptop is the major bottle neck you are looking for. When you compare two things, remember that the parts that are the same can be taken out of the equation so that you can focus only on the things that are different.

P.S. While the memory and processor in a desktop are almost always upgradeable, only the memory in a laptop is upgradeable. 95% of laptop processors are not able to be upgraded.

user304064

Posted 2014-05-28T16:17:54.243

Reputation: