30% slowdown in numerical solver exection on 16.04.1 vs. 14.04 with same solver binary

Bug #1613996 reported by Andreas Nicolai
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gcc
New
Undecided
Unassigned
glibc (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I noticed that a numerical solver I develop runs much slower on 16.04.1 than on 14.04.

UPDATE:

Test results (on Ubuntu 16.04.1 LTS):

case 1 - static linking = 6.56 s
case 1 - dynamic linking = 8.29 s

case 2 - static linking = 45.8 s
case 2 - dynamic linking = 49.4 s

case 3 - static linking = 7.02 s
case 3 - dynamic linking = 11.2 s

I compiled the solver with GCC 4.8.4 on Ubuntu 14.04. When I run the solver unmodified on 16.04.1 LTS it runs much slower. Tested on an Ubuntu system that was upgraded from 14.04.4 and on a second machine after a fresh install.

When the code is compiled with the new GCC 5.4 on Ubuntu 16.04, the execution times are approximately the same as with GCC 4.8.4 on Ubuntu 16.04. Hence, the slowdown does not seem to be related by the code-generation, but rather by the runtime library.

see attached performance test.

Tags: bot-comment
description: updated
description: updated
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1613996/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Andreas Nicolai (ghorwin) wrote :

ldd ./DelphinSolver gives:

 linux-vdso.so.1 => (0x00007ffdc833d000)
 libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbe9eee9000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbe9ebe0000)
 libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbe9e9c9000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbe9e600000)
 /lib64/ld-linux-x86-64.so.2 (0x0000563a11082000)

(where DelphinSolver is my numerical solver engine)

So the bug probably is related to packages:
- libstdc++6:amd64
- libc6:amd64
- libgcc1:amd64

description: updated
affects: ubuntu → gcc
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in glibc (Ubuntu):
status: New → Confirmed
Revision history for this message
Andreas Nicolai (ghorwin) wrote :
description: updated
description: updated
Revision history for this message
Andreas Nicolai (ghorwin) wrote :

Performance drop workaround: using static compiler and linker flags

When compiling the solver with CXXFLAGS -static-libgcc -static-libstdc++ -static the solver is now slightly faster on Ubuntu 16.04 than with Ubuntu 14.04. The issue appears to be related to dynamic linking of the runtime libraries.

Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

This is most likely the same bug as https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1663280
Can you confirm that the problem goes away if you run the dynamically linked binary with the environment variable LD_BIND_NOW=1?

Revision history for this message
Andreas Nicolai (ghorwin) wrote :

Since 18.04 and 20.04 problem has dissappeared. 16.04 is close to end of live, so I suggest closing this bug as obsolete.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.