JayDDee / cpuminer-opt

Optimized multi algo CPU miner
Other
774 stars 544 forks source link

CPU load option? #46

Closed kkkrackpot closed 6 years ago

kkkrackpot commented 6 years ago

Hi,

Is it possible to add an option to set CPU load?

Similar to m-minerd -e:

-e, --cpu-efficiency=N       mining efficiency (1-100) (default: 100, i.e, 100%)

UPD. Link to m-minerd git https://github.com/magi-project/m-cpuminer-v2 UPD2. Also it would be great to have 4-way for m7m.

CircuitSetup commented 6 years ago

I second this - I'm seeing great performance with my 1700x, but after a while it crashes my computer with a 100% load.

JayDDee commented 6 years ago

4way for m7m has some issues but it's part of the plan.

I don't really like the idea of limiting cpu load. A better approach is to use fewer threads.

Computer shouldn't crash due to cpuminer unless cpu-priority is set too high, default should be ok. It could shut down due to overheating, but that is a different problem. There's a --max-temp option but it only works on Linux.

kkkrackpot commented 6 years ago

@JayDDee yup, I tried fewer threads and --max-temp too. For me PC doesn't crash and doesn't overheat (even with 4x100% threads ), but even a single thread at 100% quickly makes CPU (or one of its cores, to be precise) too hot and the fan starts roaring. --max-temp does work, it might prevent overheating, but you begin hearing fan start-stops every other minute... Contrariwise, with configurable CPU load I can set all 4 threads on 30-50% and don't even notice CPU is mining during my routine activities.

JayDDee commented 6 years ago

You're asking for an optimized miner to be slowed down. You can achieve the same thing by running the unoptimized code, it runs slower and cooler. I'm in the business of making it faster and, conseqeuntly, hotter. It's up to users to deal with the heat. That's what the fans are for. You can either mine of have a cool cpu, not both. And fan noise is part of the game.

I'm not interested.