How to configure CPU Miner "miner.conf" File Properly
This is a guide on what each setting means and what to set values to for your mining needs. This is an example of the miner.conf file that comes with the new CPU miner.
host - This is the server/wallet you will be connecting to. For solo mining, you will put the IP address of your wallet (if the wallet is on the same computer, you will use "127.0.0.1"). For pool mining, you will use the url the pool website tells you to use (for example "nexusminingpool.com").
port - This is the mining port of the server/wallet you will be connecting to. For solo mining, you will use the port specified in your nexus.conf file (default is "9325"). For pool mining, you will use the port that the pool website tells you to use (for example, using host mentioned above the port would be "9549"). For information regarding the nexus.conf file, please view the "How to Enable Solo Mining" tutorial.
nxs_address - This is the address you wish to use for mining. For solo mining, this will be blank (as shown, "") as your mined blocks go directly to the wallet which you connect to. For pool mining, this will be the address you want the payouts to me made to. *NOTE* This MUST be a wallet address and NOT an exchange NXS address.
sieve_threads - This is the number of threads you want to use for the process of sieving. This is the process by which the miner filters out numbers to find possible solutions. The more sieve threads you have, the more possible solutions you will generate. Details on how to set this number are below.
ptest_threads - This is the number of threads you want to use for the process of testing if numbers are prime and if they are part of a dense prime cluster. This is the process by which the miner determines if the possible solutions found by sieving are valid and, if they are, what the difficulty value of it is. The more ptest threads you have, the more numbers that you've found sieving you can test. Details on how to set this number are below.
timeout - This is the amount of seconds the miner waits to receive a reply before it times out and tries again. Unless you're having connection issues and are troubleshooting it, there's no real reason to change this.
bit_array_size - This is the size, in bits, of the array used for sieving. If this value is too small, sieving takes longer because it has to keep generating a new array too often. If this value is too large, the CPU has to call out to RAM too much and sieving takes longer. This default value has been determined to be optimal for MOST situations and changing it isn't recommended for most people. Other values which MIGHT give you slightly increased performance (you will have to test them to see performance gain/loss) are 10485760, 12582912, and 16777216. Even if these values improve performance, its usually a very small amount (a couple and sticking with default 8388608 value is recommended as it has been heavily tested.
prime_limit - This value is the limit as to what number it will use as part of the sieving algorithm. It should not be altered as it is set specifically for the way the miner sieves out numbers and tests them.
n_prime_limit - This is the value use for the primality testing and relates to modular inverses. It should not be altered as it is set specifically for the way the miner sieves out numbers and tests them.
primorial_end_prime - This is the value used for setting the miners algorithm it uses when sieving out numbers. This equates to 200560490130 and should NEVER be changed as it will SEVERELY limit the miners ability to find primes. This is due to the miner code containing offsets that utilize this number and changing it will make those offsets look in the wrong places for primes.
experimental - This tells the miner to use the new formula for sieving primes when set to true, or use the older formula when set to false. The new formula has been found to be more efficient from LOTS of testing and this should stay true in almost all scenarios.
***Setting Sieve and PTest Threads***
The most important thing to note is that these 'threads' are not exactly equal to cpu 'threads'. For instance, if your cpu has 8 threads, you can have a combined total of more than 8 threads for sieve and ptest (for example 5s/8p).
Generally speaking, you'll need about 40% more ptest threads than you have sieve threads.
If you want to use your CPU to its maximum, your sieve threads should be about 70% of your total CPU threads.
For a CPU with more than 8 threads, you'll want to run 2 instances of the miner with half the threads on each. For example, for 16 thread CPU you'll want to run 2 instances of miner with 5s/8p threads. This is due to the way new block information is assigned and the delay in starting the sieving process with more threads assigned.
To find the ABSOLUTE optimal combination for your machine, you'll need to use the "Siv/s" and "Tst/s" values from the miner output. Follow these steps to find your best values:
- Set sieve threads to 1 and set ptest threads to 1 and run the miner. Wait 30 seconds for values to even out.
- If the Tst/s value is SEVERELY less than the Siv/s value, close the miner and increase ptest threads by 1.
- Repeat this until Tst/s value is close to Siv/s (less than 1/s difference at least). Record the siv/s and tst/s values.
- Increase sieve threads by 1 and set ptest threads back to 1 and run the miner.
- Do steps 2-4 until your recorded siv/s and tst/s values are less than the previous recorded values.
- The sieve and ptest threads that gave you the highest recorded values for siv/s and tst/s are your optimal settings.
tion of the newest CPU miner versio
thx switched to the new one
@kaos39 You're using an old miner. Please refer to the FAQ on this forum to find the location of the newest CPU miner version.
Hi, how I can see Siv/s Tst/s values, i'm using solo cpu mining and the output is as:
[METERS] 148.812500 PPS | 1.062500 CPS | 0 Blocks | 0.000000 CSD per Hour | Height = 1413632 | Difficulty 7.703022 | 01:14:06