Focussed comparison test of CRT f=512 with t=6 and fermat threads at 3 vs. 5

CRT fermat threads test: -f 512 -t 6 -d 3 (-i 320000) vs -d 5 (-i 72000)

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

measureppstpsgpsglstbpcl/s
mean2322779144806429711361.103.82
max3209072275639536441942.0711.52
min217548121532286470.010.16
std150657795946119290.5983.95

t6-d5-i74000-22m-crt0512

measureppstpsgpsglstbpcl/s
mean3303191214911244220261.574.59
max5270996408403657772612.9812.58
min310929623424423500.010.12
std23183011727881816670.8591.48

t6-d5-i7190-22m-crt0096

measureppstpsgpsglstbpcl/s
mean6339403583538399853650.281.34
max94795071405936298175640.552.79
min59352046060393720.000.00
std60891204274018547250.1625.51

t6-d4-i16380-22m-crt0096

measureppstpsgpsglstbpcl/s
mean64441332303383518192610.295.47
max70943164146714092551250.5913.47
min5846064480935036630.000.19
std19998184992550140000.17282.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.

Your browser is now constructing the plots, it will take a few moments ...

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