jceminer / cn_cpu_miner

Cryptonote CPU Miner
35 stars 23 forks source link

Pool-managed Autoswitch and mining V8 only #26

Closed Axadiw closed 5 years ago

Axadiw commented 5 years ago

Hi,

is it possible somehow to specify which algorithms should be selected when using "Pool-managed Autoswitch" variany in JCE?

I have been previously mining on MoneroOcean with MM.js proxy miner, that've configured with manually gathered performance benchmarks, for example:

...
"algo_perf": {
     "cn/xtl": 54.17,
     "cn/2": 54.56,
     "cn/msr": 111.15,
     "cn-lite": 172.73,
     "cn-heavy": 29.44,
     "cn-heavy/tube": 22.53
    },

With these, MoneroOcean is able to decide which coin would be most profitable to mine on my setup (in my case, it would be cn-lite algorithm, a.k.a Cryptolight V7 fork of April-2018)

Unfortunately when I've configured JCE miner with variant 16 (Pool-managed Autoswitch) - it's mining only with Cryptonight V8 fork of Oct-2018.

Is it possible to specify somehow particular algorithms performance, that would be than used by MoneroOcean to decide which coin is most profitable to mine?

jceminer commented 5 years ago

Hi,

I advise to use the native Pool-managed Autoswitch feature now it's available, rather than an external tool. You can speciafy what algorithm you mine with manual config. Let's take an example, the config for a 4-core CPU, as in the doc:

/* This is the configuration when Cryptolight class algo is mined */
"cryptolight_cpu_threads_conf" : 
[ 
      { "cpu_architecture" : "auto", "affine_to_cpu" : 0, "use_cache" : true, "multi_hash":1 },
      { "cpu_architecture" : "auto", "affine_to_cpu" : 1, "use_cache" : true, "multi_hash":1 },
      { "cpu_architecture" : "auto", "affine_to_cpu" : 2, "use_cache" : true, "multi_hash":1 },
      { "cpu_architecture" : "auto", "affine_to_cpu" : 3, "use_cache" : true, "multi_hash":1 },
],

/* This is the configuration when Cryptonight class algo is mined */
"cryptonight_cpu_threads_conf" : 
[ 
      { "cpu_architecture" : "auto", "affine_to_cpu" : 0, "use_cache" : true, "multi_hash":1 },
      { "cpu_architecture" : "auto", "affine_to_cpu" : 2, "use_cache" : true, "multi_hash":1 },
],

/* This is the configuration when CN-Heavy class algo is mined */
"cn_heavy_cpu_threads_conf" : 
[ 
      { "cpu_architecture" : "auto", "affine_to_cpu" : 0, "use_cache" : true, "multi_hash":1 },
],

Configure one, two or three of these arrays according to your CPUs, and remove the ones you don't want. Want no CN-Heavy class (no Heavy, Haven, Tube...)? remove "cn_heavy_cpu_threads_conf" array. Want no CN-Light class (Turtlecoin...)? remove "cryptolight_cpu_threads_conf" array.

Technically you could remove the CN-class array, but I know MoneroOcean would refuse it. Also it's very possible that MoneroOcean keeps mining CN-v8 for a whole day. During my tests, it saw it switch to Stellite twice, and never on any other algo.

Axadiw commented 5 years ago

exactly, I want to get rid of any external software (like MM.js) - I'm just comparing my current solution, where algo swithcing actually works.

Indeed, when I've turned on JCEMiner with autoswitch feature, it has been mining CN-v8 for neraly all day (with short exceptions for stellite and msr as well).

As I've said - for my setup, cryptolite is most profitable (I'm making a lot of profit from multihash=6 that's not available on other miners), and I can't use it on MoneroOcean :(

I know that we can't just point JCE miner with variant 4 (cryptolite), because MO would reject it (all miners that are connecting to MO should advertise themselves that they "support" at least CN-v8, which isn't true if you force variant on JCE).

Would it be possible to send algo_perf somehow to MO, like it's done with other tools used there (https://github.com/MoneroOcean/meta-miner / https://github.com/MoneroOcean/xmr-node-proxy)

Axadiw commented 5 years ago

Plus I have my JCE miner configured exactly as you've presented: with 3 separate config blocks with cryptolight_cpu_threads_conf, cryptonight_cpu_threads_conf and cn_heavy_cpu_threads_conf sections

jceminer commented 5 years ago

Would it be possible to send algo_perf somehow to MO

Hoo, ok, i got what you need, not a manual config but that precise feature. Fine, in the next CPU version (planned to add Cryptolight-Dark algo) i'll put this too.

Axadiw commented 5 years ago

Great, thanks!

Axadiw commented 5 years ago

@jceminer He, I've noticed that you've released new 033f version with CN-Dark algo, have you had a chance to implement algo_perf that we've been talking about in this issue?

jceminer commented 5 years ago

Sorry i didn't had time to add it, i switched to the fixes for GPU version instead. My priorities change often... But i haven't give up, in fact it's quite a simple feature to add, compared to the GPU implementations... Still planned for the next CPU version (so: 33g)

Axadiw commented 5 years ago

No worries @jceminer - I'm looking forward for version 33g than ! :)

jceminer commented 5 years ago

i'm done adding the feature, ~~but during my tests, despite sending the new data "algo_perf" MoneroOcean still makes me mine v8, even when i set a very high algo_perf on other coins like XTL. Is it due to the recent change on coins values, or it works with meta-miner and just my code is bad? I ask you because you obviously have more experience on MO.~~

edit: mhh, the key is "algo-perf" and not "algo_perf", lost hours on this... Btw it's fixed, new release to come soon.

jceminer commented 5 years ago

It's online, the 0.33g Windows (linux version comes next)

Axadiw commented 5 years ago

awesome, thanks @jceminer

I'll have to wait with testing though, because all of my machines are basing on linux :)

jceminer commented 5 years ago

ho, no problem i start the linux build right now, easy. Should be online in a few hours, just to take time to test a bit. Meanwhile, you can take a look at the updated documentation, it's basically just putting the "algo_perf" node from MM.js to the JCE config as-is.

eLvErDe commented 5 years ago

If its ready before midnight, I ll provide debs

jceminer commented 5 years ago

Online, but too late, sorry Cinderella :-p

Axadiw commented 5 years ago

So far it looks like this feature works without any problems. Thanks @jceminer again !:)