cancel
Showing results for 
Search instead for 
Did you mean: 

Server Gurus Discussions

absmith1
Journeyman III

Very poor Python performance on EPYC 7601

Hello,

I am benchmarking and AMD EPYC 7601 vs Intel 6148. Both systems are identical re: O/S:

Red Hat Enterprise Linux Server release 7.5 (Maipo)

gcc (GCC) 7.2.0

Python 3.6.5 been built from source using both these methods:

./configure --prefix=/home/andrew.york/Python-3.6.5-EPYC-bin --enable-optimizations

CFLAGS='-O3 -march=znver1' ./configure --prefix=/home/andrew/Python-3.6.5-EPYC-bin --enable-optimizations

The second method gives slightly slower results. But the the standard Python benchmarks comparing AMD and Intel performance shows that Python is not being built for the correct architecture:

+-------------------------+----------------+------------------------------+

| Benchmark               | AMD 7601 | Intel 6148                |

+=========================+================+==============================+

| 2to3                    | 681 ms         | 397 ms: 1.72x faster (-42%)  |

+-------------------------+----------------+------------------------------+

| chameleon               | 23.7 ms        | 12.0 ms: 1.98x faster (-49%) |

+-------------------------+----------------+------------------------------+

| chaos                   | 262 ms         | 138 ms: 1.90x faster (-47%)  |

+-------------------------+----------------+------------------------------+

| crypto_pyaes            | 222 ms         | 127 ms: 1.74x faster (-43%)  |

+-------------------------+----------------+------------------------------+

| deltablue               | 17.2 ms        | 9.72 ms: 1.77x faster (-44%) |

+-------------------------+----------------+------------------------------+

| django_template         | 320 ms         | 159 ms: 2.01x faster (-50%)  |

+-------------------------+----------------+------------------------------+

| fannkuch                | 1.00 sec       | 575 ms: 1.74x faster (-43%)  |

+-------------------------+----------------+------------------------------+

| float                   | 243 ms         | 138 ms: 1.77x faster (-43%)  |

+-------------------------+----------------+------------------------------+

| genshi_text             | 76.8 ms        | 36.3 ms: 2.12x faster (-53%) |

+-------------------------+----------------+------------------------------+

Can any one shed some light on what may be going on?

Many thanks,

Andrew

0 Likes
4 Replies

How does the version of Python from your Linux distribution perform? does it have adequate performance for your requirements?

I suspect that most components will work adequately as I use cloud services a lot where servers are often loaded hard.

0 Likes
Anonymous
Not applicable

Hello absmith1 ,

Are you compiling python from source on both systems? If you are, would you be able to provide the steps with compiler flags used and version of the compiler on both systems please?

0 Likes

Hello,

I have download version 3.6.5 (also 3.7.0b5) and compiled is using GCC v7.2.0. Both methods of building python have been tried on the AMD system:

./configure --prefix=/home/andrew/Python-3.6.5-EPYC-bin --enable-optimizations

CFLAGS='-O3 -march=znver1' ./configure --prefix=/home/andrew.york/Python-3.7.0b5-EPYC-bin --enable-optimizations

The build completes and passes the tests. with no problems. I have confirmed that the '-march=znver1' flag has been passed to the compiler.

The Intel system was built with:

./configure --prefix=/home/andrew/Python-3.6.5-Intel-bin --enable-optimizations

Andrew

0 Likes

Hello,

Please be sure the compilers your are using have fix for this bug :

80313 – -march=znver1 produce worse code than -march=haswell

I would build both Intel and AMD versions using like this to test:

On the first run build both with:

-march=x86-64 -mtune=generic -O3

( run your tests )

On the second run build both with:

-march=native -O3

( run the test again )

BR

0 Likes