Bill Allombert on Mon, 26 Jun 2023 20:23:35 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: gp-2.15.3 compiled on Ubuntu on AMD 7600X very slow compared to i7 (many page faults), Win11 gp-2.15.3 on 7600X better than i7. How to fix AMD Ubuntu?


On Mon, Jun 26, 2023 at 08:01:12PM +0200, hermann@stamm-wilbrandt.de wrote:
> I bought new not-too-expensive big single thread performance PC with AMD
> Ryzen 7600X CPU for factoring big numbers / number theory:
> https://github.com/Hermann-SW/7600X#7600x
> 
> I used C++ with libgmpx executables to determine "sqrt(-1) (mod p)" for
> 10,000-/36,401-/100,355-digit primes.
> 7600X runtimes measured were 10%+ better for 7600X compared to i7-11850H,
> matching PassMark single thread numbers (no PBO yet, Performance Boost
> Optimization):
> https://github.com/Hermann-SW/7600X#c-with-libgmpxx
> 
> Win11 was preinstalled, so I installed Ubuntu 22.04 server on other disk in
> parallel, allowing same hardware+bios comparisons.
> While 7600X Win11 gp-1.25.3 is a bit faster with GP scripts (determining
> same numbers as with C++) than i7, 7600X Ubuntu numbers are much worse than
> i7-11850H numbers:
> https://github.com/Hermann-SW/7600X#parigp
> 
> I compiled gp-2.15.3 sources on i7 and 7600X the same, following
> instructions in INSTALL.
> Reason for the bad 7600X Ubunto runtimes seems to be the many page faults
> seen with "perf stat".

Do you have the same version of GNU MP on both systems ?

Did you compile PARI with pthread support ? 

If you want to speed up PARI, build with
CFLAGS='-march=native -flto=auto' ./Configure
make bench
and use
Olinux-x86_64/gp-sta

Using --mt=pthread will slow PARI down a little.

Cheers,
Bill