jceminer / cn_cpu_miner

Cryptonote CPU Miner
35 stars 23 forks source link

Please provide a sample config for background mining #8

Open luck143 opened 6 years ago

luck143 commented 6 years ago

Hello,

Can you please provide a sample config file for backgrouond mining. i have about 60 linux servers ,17 processors , 8 core each. These servers are mainly being used for a webservice i provide . and i also mine coins as a side job to utilize spare resources . Can you please post a sample config for this so that it only mines in background without effecting the main webservice. each server never get more the 20% cpu load but those 20% load is critical.

and btw if you are wondering these are not rooted or hacked servers they are mine legally.

Thanks

jceminer commented 6 years ago

Hi!

Thanks to be precise about hacks, that's the same for me, JCE is nothing malicious, and if it's so big that's because it packs hundreds of assembly versions of cryptonight.

The simplest way to mine in background is to run as nice plus use the parameter --low. It should make the JCE threads very low priority.

The maximum number of threads JCE can handle is 64, and you can tune it with parameter -t. Let's say you want to reserve one core for your webservice (that's 12.5% of your power) and let the other 7 cores mine in background. Use command:

nice +19 jce_cn_cpu_miner64 --low -t 7 .......

the +19 is the lowest nice priority on linux, --low ensures it's really low and -t 7 limits to 7 threads. No need for a config file. After, add the normal parameters -o -u -p x Note that depending on your CPU (Opteron? Xeon?) the best performance may be achieved with less than 7 threads. Tell me what are your CPUs, and also what coin you want to mine, optimal config is different on Monero and Loki for example.

luck143 commented 6 years ago

Thanks for your reply . i am mining turtlecoin . cpu is Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz As per your suggestion i m running miner with screen nice -n +19 ./start.sh --low -t 7

getting about 900-1100 h/s on each server

jceminer commented 6 years ago

That's an interresting case. An odd case with seven cores on a odd coin. The automatic -t 7 should give a decent result, but 7 cpu is not usual, so i provide a manual optimum. This is a case where manual config is needed, as opposed as what i said yesterday :p Because that config is non standard.

"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 },
     { "cpu_architecture" : "auto", "affine_to_cpu" : 4, "use_cache" : true, "multi_hash":1 },
     { "cpu_architecture" : "auto", "affine_to_cpu" : 5, "use_cache" : true, "multi_hash":1 },
     { "cpu_architecture" : "auto", "affine_to_cpu" : 6, "use_cache" : true, "multi_hash":2 }
]

It means you'll use only 7 cores, to keep room for your webserver, but use your whole 8M cache thanks to the dual hash on cpu 6. Don't worry about cache impact, it won't slow the webserver. Rather the opposite, the webserver will invalidate some cache and cause a few H/s less performance, but that's ok for you since the critical task is webserver, not mining.

luck143 commented 6 years ago

Thanks for your help :)