View Single Post
Old 2020-12-14, 23:18   #1
Dec 2016

23×7 Posts
Default gmp-ecm step 1 performance with hyperthreading

While there's some good information about gmp-ecm step 1 performance on a single core, and many postings about running multiple gmp-ecm instances, I could not find any information about whether it benefits from CPU-threads (a.k.a SMT, a.k.a. Hyperthreading). So I decided to test myself.

I tried out how gmp-ecm stage 1 performs when using all physical CPU cores compared to using all threads of the CPU. Specifically, I checked how stage 1 performs with B1=1e8 for M1489. I chose these parameters because
  • stage 1 takes much more time than stage 2, so its performance is more relevant
  • B2=1e8 gets results reasonably quickly but still runs long enough for reliable results
  • M1489 has so many known factors that <1000 bits remain to be factored
The surprising result was that using all CPU-threads almost doubled the throughput! Time needed for 1 curve for each gmp-ecm process:

AMD Ryzen 9 3950X
16 cores 570 seconds
32 threads 589 seconds
throughput change: +91%

Intel Core i7 6600U
2 cores 858 seconds
4 threads 984 seconds
throughput change: +74%

I also cross-tested against mprime, which is said to be faster for stage 1. Interestingly, mprime working on M1489 with one thread and B1=1e9 on the Ryzen takes ~6400s, compared to the ~5850s with gmp-ecm. I assume this happens because mprime does not use the known factors when doing ECM. So for this particular number, gmp-ecm is actually a bit faster in step 1 than mprime.
nordi is offline   Reply With Quote