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 1
means: 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
--sieve-primes
,--threads
or--fermat-threads
to 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 --fermat-threads
: -i 320000
for d=3
and -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).
Test notes
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.
t6-d3-i340000-22m-crt0512
measure | pps | tps | gps | glst | bpc | l/s |
---|---|---|---|---|---|---|
mean | 2322779 | 1448064 | 297 | 1136 | 1.10 | 3.82 |
max | 3209072 | 2756395 | 364 | 4194 | 2.07 | 11.52 |
min | 2175481 | 21532 | 286 | 47 | 0.01 | 0.16 |
std | 150657 | 795946 | 11 | 929 | 0.59 | 83.95 |
t6-d5-i74000-22m-crt0512
measure | pps | tps | gps | glst | bpc | l/s |
---|---|---|---|---|---|---|
mean | 3303191 | 2149112 | 442 | 2026 | 1.57 | 4.59 |
max | 5270996 | 4084036 | 577 | 7261 | 2.98 | 12.58 |
min | 3109296 | 23424 | 423 | 50 | 0.01 | 0.12 |
std | 231830 | 1172788 | 18 | 1667 | 0.85 | 91.48 |
t6-d5-i7190-22m-crt0096
measure | pps | tps | gps | glst | bpc | l/s |
---|---|---|---|---|---|---|
mean | 633940 | 3583538 | 3998 | 5365 | 0.28 | 1.34 |
max | 947950 | 7140593 | 6298 | 17564 | 0.55 | 2.79 |
min | 593520 | 46060 | 3937 | 2 | 0.00 | 0.00 |
std | 60891 | 2042740 | 185 | 4725 | 0.16 | 25.51 |
t6-d4-i16380-22m-crt0096
measure | pps | tps | gps | glst | bpc | l/s |
---|---|---|---|---|---|---|
mean | 644413 | 3230338 | 3518 | 19261 | 0.29 | 5.47 |
max | 709431 | 6414671 | 4092 | 55125 | 0.59 | 13.47 |
min | 584606 | 44809 | 3503 | 663 | 0.00 | 0.19 |
std | 19998 | 1849925 | 50 | 14000 | 0.17 | 282.17 |
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.
Replication:
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