Why more threads reduce h/s rate?

0

I have dual xeon processors (total 48 cores). I am using cpuminer-easy with nicehash pool on fedora. I have noticed that if i keep my number of threads greater than 10, the h/s falls dramatically. I am using Cryptonight algorithm. For 40 threads, i get 2-3h/s per thread while with 10 threads i get 25 -30h/s per thread. What is wrong here? How can i utilize all cores?

Abdullah Khan

Posted 2017-10-03T03:28:31.577

Reputation: 1

What algorithm?David Schwartz 2017-10-03T04:19:39.177

David Schwartz cryptonightAbdullah Khan 2017-10-03T04:25:11.570

I think I know! What is the exact model of the CPUs?David Schwartz 2017-10-03T04:29:33.907

David Schwartz Model name: Intel(R) Xeon(R) CPU E7-4830 v3 @ 2.10GHzAbdullah Khan 2017-10-03T04:35:10.960

Answers

1

The E7-4830v3 has 10 physical cores and 20MB of L3 cache. With two CPUs, you'd only have 20 physical cores and 40MB of L3. Since every thread is doing exactly the same thing, hyper-threading is virtually useless. It wouldn't help you anyway since you only have 2MiB per physical core and that's exactly what cryptonight requires.

So, short answer, with 40MB of L3 cache, you cannot run more than 20 instances of the cryptonight algorithm concurrently without dropping from L3 speed to RAM speed, which is a huge performance loss.

You can probably go higher than 10, but more than 20 is a non-starter.

David Schwartz

Posted 2017-10-03T03:28:31.577

Reputation: 46 931

So that means i should be running 20 threads without any issues, but as soon as i increase more than 10 threads, the h/s starts to decrease.Abdullah Khan 2017-10-03T04:42:06.470

For 20 threads , i am getting 4 h/s per thread.Abdullah Khan 2017-10-03T04:43:26.153

What happens with 18 threads? And are you 100% sure you have two of them?David Schwartz 2017-10-03T04:45:37.997

David Schwartz, for 18, i have 7 h/s on averageAbdullah Khan 2017-10-03T04:46:43.973

Hmm, now I see that it has 30MB of L3 cache and 12 physical cores. Maybe I looked up the wrong CPU. Yeah, it seems something is wrong. You should be performing better than that. Maybe you need a BIOS update? It may help to disable hyper-threading in the BIOS.David Schwartz 2017-10-03T04:47:34.330

Could it be the issue with cpuminer-easy, that i am using?Abdullah Khan 2017-10-03T04:49:21.347

I guess it could be. It couldn't hurt to try a different program.David Schwartz 2017-10-03T04:50:09.750

The issue was with cpuminer-easy, i am currently using xmrig, and it is giving me about 700h/s for cryptonight.Abdullah Khan 2017-10-04T09:46:09.197

That seems about right. I calculated 720 as about your maximum. (Using the numbers for the correct CPU this time.)David Schwartz 2017-10-04T17:56:07.830