Comparison between reported performance of GapMiner on CRT mining at a shift of 512 with a varying number of threads devoted to Fermat tests of primality of the gap list contents, as described by j0nn9 in announcing Gapminer mining with the Chinese Remainder Theorem (CRT):
Mining with the CRT is split into sieve and primality testing using separate threads for each.
Setting the parameters
--threads 4 --fermat-threads 1means: use 3 sieve threads and 1 gap scan thread.
The scan threads always pick the most promising gap from the gaplist, therefore the gaplist value should always be at least over 100, but a too high gaplist value can slow down mining, (for example over 9000). You can alter
--fermat-threadsto achieve this.
These tests are intended to validate the advice “for best performance, set the number of fermat threads to be 1 less than the number of threads”. Tests are of two values of
--fermatthreads: 3 and 5, where total threads is 6. In order to keep the size of the gaplist within the recommended bounds, the value of
--sieve-primes is adjusted according to the selected value of
-i 320000 for
-i 72000 for
d=5 (note the difference in these settings from those used in a similar test with fewer threads - illustrating the effect on the gaplist size of changing the number of threads).
Wanted to check Wizz’s recommendation of using
t=6 d=4 for shifts below 128, so I made a comparison at shift 96, it looks like the “set fermat threads to the number of threads minus one” actually holds true for shift 96 but not to any huge advantage. It took me some considerable trial-and-error attempts to discover sieve-primes settings which kept the gap list above zero and didn’t balloon unreasonably.
Column labels map directly to miner output:
pps is average primes per second,
tps is average tests per second,
gps is average gaps per second,
glst is the size of the gaplist and
l/s is the time in seconds to scan the gaplist at the reported rate of gaps per second.
The charts included below are for completeness. The figures given are the means and they differ from the means in the above table because, in order to support the different requirements of charting, the first 1/5th of the data is ignored in order to aid visual comparison. The chartline uses the full dataset.
gapminer -o localhost -p 31397 -u $USER -x $USERPASS -e -j 5 -t 6 -d 3 -f 512 -i [as-discovered] -r crt/crt-22m-0512s.txt gapminer -o localhost -p 31397 -u $USER -x $USERPASS -e -j 5 -t 6 -d 5 -f 512 -i [as-discovered] -r crt/crt-22m-0512s.txt