Which hardware for openEMS?

How to use openEMS. Discussion on examples, tutorials etc

Moderator: thorsten

frankst
Posts: 32
Joined: Thu 21 Jul 2016, 11:36

Which hardware for openEMS?

Post by frankst » Thu 01 Jun 2017, 10:07

Hi Thorsten,

A the moment I run openEMS on a five year old notebook.
It has a i5-2410M CPU clocking up to 2.7 GHz and a single 4GB DDR3-1333 SODIMM.
I force openEMS to run only two threads because this is the number of physical CPU cores.

Since I think of buying something faster, I tried openEMS on another computer.
This computer has a i3-4150 CPU clocking up to 3.5 GHz and a single 4GB DDR3-1600 DIMM.
Again, I force openEMS to run only two threads because this is the number of physical CPU cores.

Much to my surprise, on both computers openEMS runs at the same speed (the example I used reaches about 70MC/s).
Hence my question:
What is the bottleneck? CPU? RAM? Both? Something else?

Cheers
Frank

thorsten
Posts: 1411
Joined: Mon 27 Jun 2011, 12:26

Re: Which hardware for openEMS?

Post by thorsten » Thu 01 Jun 2017, 18:11

What is the bottleneck? CPU? RAM? Both? Something else?
The CPU is not the bottleneck, it should be the memory bandwidth. Or in other words, how fast can your PC get the huge amount of data from memory to your CPU and back.
openEMS is unfortunately not really optimized for speed. But having fast RAM and large CPU cache should help the most... But I never did a rigorous analysis on this.
I once create a benchmark script and we discussed it here.
Of course any kind of field dump will slow down the engine too as this means either recording the field or even writing them to your hard-disk...
Until this is done, the engine has to wait. Another area were an improvement would be possible...

regards
Thorsten

frankst
Posts: 32
Joined: Thu 21 Jul 2016, 11:36

Re: Which hardware for openEMS?

Post by frankst » Thu 01 Jun 2017, 21:53

Hi Thorsten,

Indeed, I read in other threads that CPU is not the limit.
But I am still surprised to see the same speed.
If memory bandwidth would be the only limit, the computer with DDR3-1600 should have been faster then the notebook with DDR3-1333, shouldn't it?

I will test if fields dumps are an issue in my test case.

Cheers
Frank

frankst
Posts: 32
Joined: Thu 21 Jul 2016, 11:36

Re: Which hardware for openEMS?

Post by frankst » Mon 05 Jun 2017, 08:53

Hi Thorsten,

I removed the field dumps, but performance did not change significantly.

Since you say memory bandwidth is the limit, I would expect that fast DDR4 RAM and a CPU with four memory channels would be a proper choice.
Do you agree?

Cheers
Frank

thorsten
Posts: 1411
Joined: Mon 27 Jun 2011, 12:26

Re: Which hardware for openEMS?

Post by thorsten » Mon 05 Jun 2017, 16:27

Do you agree?
Maybe ;) As I said, I never did a study on this.

frankst
Posts: 32
Joined: Thu 21 Jul 2016, 11:36

Re: Which hardware for openEMS?

Post by frankst » Mon 05 Jun 2017, 21:37

Hi Thorsten,

To get another data point I ran my test simulation on one more computer.
This time it's a Linux (openSUSE Leap 42.2) machine running openEMS 0.0.34 (the others I used before were Win10), i5-4570 up to 3.6GHz, 2x 4GB DDR3-1600.

Assuming that the difference Linux vs Win10 is irrelevant.
And assuming that the difference openEMS 0.0.34 vs 0.0.35-28-g6133dea is irrelevant.
The most important difference is that the Linux PC has two RAM modules installed (= dual channel memory).
If your assumption is correct that memory bandwidth is the limit, one should expect that the speed roughly doubles.

And here is what I got: 135MC/s (1 thread), 170MC/s (2 threads), 176 MC/s (3 threads), 174 MC/s (4 threads)
That means, speed more than doubled!

Cheers
Frank

n4es
Posts: 8
Joined: Tue 12 Jun 2018, 21:34

Re: Which hardware for openEMS?

Post by n4es » Tue 03 Jul 2018, 04:32

I ran the same simulation on the same machine (i7-4790 @ 3.6 GHz) in Windows 8.1 and Linux Mint 18.3 (dual-boot).
Windows 8.1 => 70.4 MC/s
Linux Mint 18.3 => 106.1 MC/s
Factor is 1.51/1 for LM 18.3 vs. Win 8.1.

I expect the poor Windows results partially reflect Norton, Malwarebytes, and other background tasks robbing memory bandwidth. No other applications were running. A dedicated Linux box seems like a good idea. However, I can't seem to view field patterns in Linux on either machine.

I ran another simulation in Linux Mint 18.3 on two different machines: i5-3470 @ 3.2 GHz and i7-4790 @ 3.6 GHz.
i5-3470 => 68 MC/s (quad core, 4 threads)
i7-4790 => 77 MC/s (quad core, 8 threads)
MC/s factor is 1.13/1. Clock rate factor is also 1.13/1.
Passmark multi-thread benchmark factor is 1.50/1 for the i7-4790 versus the i5-3470.
Passmark single-thread factor is 1.19/1 for the i7 vs. the i5.

Bill N4ES

Hale_812
Posts: 172
Joined: Fri 13 May 2016, 02:54

Re: Which hardware for openEMS?

Post by Hale_812 » Mon 09 Jul 2018, 10:17

Most computational software requires fast cores, rather than multicore platform.

And OPENEMS is an experimental free software, so no-one seems been optimizing it for ultra-performance.

But the main factor for most of simulators not heavily relying on data-partitioning, is RAM.
OpenEMS supports nested mesh only in cylindrical coordinates, so you can not cut RAM usage by defining coarse mesh zones in non-important areas of rectangular mesh. Therefore your RAM requirements grow with volume proportionally.
I would recommend 4-core 3.3GHz Intel CPU with 16Gb RAM minimum for comfortable real-world simulations. Consider CPUs with larger cache. Since there are no super-optimizations for CPU-load, like in HFSS, Hyper-threading seems helping a bit, not reducing the performance(like in HFSS).
And any fast and large(1-4Tb) HDD, because dumped data can not be compressed well, when exporting to (ugly) VTK format for further analysis.

At home I have 6-core 4-memory channel Sandy-Bridge CPU, and it is just fine with 32GB fast RAM. But at work, small i5-4590 based DELL with 32GB RAM is not bad either - just overheating. So consider good cooling to your CPU.

The main thing you should avoid is using multi-cpu workstations, because inter-node RAM access can and will become the bottleneck in any computational software, except some rare data-partitioning codes , holding all the data near CPU cache. Definitely it is not OPENEMS.
Last edited by Hale_812 on Tue 10 Jul 2018, 02:04, edited 2 times in total.

Hale_812
Posts: 172
Joined: Fri 13 May 2016, 02:54

Re: Which hardware for openEMS?

Post by Hale_812 » Mon 09 Jul 2018, 10:23

>> I would expect that fast DDR4 RAM and a CPU with four memory channels
Second-hand DDR3 system with 4 channels would be all right. Just try to get a system with ECC/buffered ram to avoid surprises from unbuffered memory.

Hale_812
Posts: 172
Joined: Fri 13 May 2016, 02:54

Re: Which hardware for openEMS?

Post by Hale_812 » Mon 09 Jul 2018, 10:39

>>i5-4570 up to 3.6GHz
Never trust this Intel's deceit. You almost never get this clock-rate, except on "unlocked" cpus with overclocking board bioses.
Normally, in computation, you should see the minimal number of clock boost steps (usually 2-3 x 100MHz) for "all cores loaded". And then remember, that motherboard monitors current, temperature, and computes consumed power, in order to turn off that boost before the timeout. Only overclocker-oriented boards allow disabling that, but those support no ECC DRAM.

Post Reply