CPU affinity / speed improvement

Discussion about new features and development support

Moderator: thorsten

Post Reply
GeraldCarda
Posts: 8
Joined: Wed 19 Feb 2020, 17:47

CPU affinity / speed improvement

Post by GeraldCarda » Tue 17 Mar 2020, 12:50

I was able to significantly improve the simulation speed on the machine I am using. It is a two socket NUMA machine with 2x6 physical core (2x12 hyperthreading).

Here are the results for an arbitrary benchmark run:

- Original v0.0.35-62-gbb235b2 -

Time for 8938 iterations with 1610121.00 cells : 269.07 sec
Speed: 53.49 MCells/s

- modified code -

Time for 9047 iterations with 1610121.00 cells : 156.78 sec
Speed: 92.91 MCells/s

This was done by adding a CPU affinity option to the existing code. All modification are local to 'engine_multithread.cpp'. The code is pretty simple for now (thread<->CPU affinity taken from env, not much error handling). The current version is only tested on Linux (due to some low level pthread dependancies).

How to proceed?

Regards,
Gerald

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

Re: CPU affinity / speed improvement

Post by thorsten » Tue 24 Mar 2020, 09:25

Post your changes on github for me and others to review.

Post Reply