Edited Why I shouldn’t write while dealing with a fever… under discussion.

I fix my CPU miner to produce 1740 kH/s instead of 990 kH/s with a few check boxes.

So I am mining some coinage in the Cryptocurrency world. Mainly because the miners make GREAT performance testing resources. Nothing like maxing out CPU or GPU or both whenever you need it (and making a little speculative coin on the side).

But, Windows the mining program was doing me wrong. By default, the thread scheduler thing sets a new process to use ALL cores available and apparently go in sequence. This is ‘ok’ but I find I get MUCH better results when I don’t let the thread scheduler miner handle my CPU-based miner threads.

Case in point:

miner going slow

Note CPU #6. Why is it 70,000 hashes/second faster than it’s peers? Because it’s the only miner thread that doesn’t have it’s partner CPU also running at 100%.

Let’s look at this in Task Manager, this is what it looks like:

task manager core count.png

So see the pairings? CPU 0/1, CPU 2/3, CPU 4/5, CPU 6/idle.

That’s why CPU 6 can run faster. It’s hyper-threaded pair isn’t mussing it up. Plus it perhaps has better caching since it isn’t using pipeline cache for another busy thread (conjecture).

Anyway, changing this is trivial. I found my miner in task manager and right clicked it and selected Processor affinity.

proc affinity

See how it’s spread out on all CPUs? Yeah we’re going to fix that.

better proc affinity.png

Now I’m using every odd CPU, and every even CPU is not used by my miner process. Fair enough. I am only allocating 7 miner threads by the way, so we’re giving the miner an extra thread. Who cares. It might not use it. Don’t care.

Hit ok and see the results:

change.png

See, CPU 0, 2, 4, 6 are falling. The odds are all increasing.

The results? Pretty damn good. I went from 990 kH/s on 7 mining threads to 1746 kH/s.

I’ll take it.faster.png

All this because Windows thread scheduling leaves something to be desired…since like, a while ago. But that’s another story…

Carl schooled me.

Author: jeffstokes

Jeff Stokes

3 thoughts on “Edited Why I shouldn’t write while dealing with a fever… under discussion.”

  1. So, you’re running an application that’s not aware of HT (very obviously) and is probably doing actual scheduling by counting CPUs, versus letting the OS manage it.

    Why are you saying that this is the OS’s fault? It’s HT-aware and would have been expected to execute a lower number of threads than physical cores on the available physical cores directly – unless told to otherwise to do so by the application. So, I guess I’m asking for a friend ;).

    Liked by 1 person

    1. I’ll show you the app shortly. I am able to specify the amount of mining threads that go to 100% CPU yeah. Why does an app need to micromanage where they go, why can’t the HAL do that?

      Like

      1. They don’t, at least not by default. Something is wrong with the app most likely telling Windows to do that, because by default it shouldn’t.

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s