Bug #101089 Binary Size of RPM Build
Submitted: 8 Oct 10:34 Modified: 8 Oct 12:33
Reporter: Sebastian Schubert Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Packaging Severity:S4 (Feature request)
Version:8.0 OS:Red Hat (7)
Assigned to: CPU Architecture:x86
Tags: unstripped binary build

[8 Oct 10:34] Sebastian Schubert
The provided mysql community builds for mysql 8.0 on RHEL7 seem to be missing the "debug" builds. The mysqld binaries that are shipped have an enormous size of >1GB

After "strip"ing them, they are at 60mb for mysqld and 120mb for mysqld-debug

How to repeat:
Use RHEL 7 / CentOS 7

Install MySQL Repo from https://dev.mysql.com/downloads/repo/yum/
Install MySQL Server: yum install mysql-community-server

ls -la /usr/sbin/mysql*
-rwxr-xr-x 1 root root 1160290352 Jun 16 19:56 /usr/sbin/mysqld
-rwxr-xr-x 1 root root  756117752 Jun 16 19:36 /usr/sbin/mysqld-debug

Suggested fix:
Change rpm spec to build seperate debug packages or at least do a "strip" on the binary files.
[8 Oct 12:33] MySQL Verification Team
Hello Sebastian,

Thank you for the report and feedback.

[8 Oct 12:35] MySQL Verification Team
## imho most of the size is caused by debug symbols, there was some internal discussion happening

ls -lh mysql-8.0.11/bin/mysqld*
-rwxr-xr-x 1 umshastr common 654M Apr  8  2018 mysql-8.0.11/bin/mysqld
-rwxr-xr-x 1 umshastr common 548M Apr  8  2018 mysql-8.0.11/bin/mysqld-debug

ls -lh mysql-8.0.16/bin/mysqld*
-rwxr-xr-x 1 umshastr common 983M Apr 14  2019 mysql-8.0.16/bin/mysqld
-rwxr-xr-x 1 umshastr common 659M Apr 14  2019 mysql-8.0.16/bin/mysqld-debug

ls -lh mysql-8.0.20/bin/mysqld*
-rwxr-xr-x 1 umshastr common 1.1G Mar 26  2020 mysql-8.0.20/bin/mysqld
-rwxr-xr-x 1 umshastr common 703M Mar 26  2020 mysql-8.0.20/bin/mysqld-debug

 ls -lh mysql-8.0.21/bin/mysqld*
-rwxr-xr-x 1 umshastr common 1.1G Jun 16 23:31 mysql-8.0.21/bin/mysqld
-rwxr-xr-x 1 umshastr common 725M Jun 16 22:51 mysql-8.0.21/bin/mysqld-debug
[8 Oct 12:37] MySQL Verification Team
This is nothing to do with rpm builds but this can be even seen in binary tarball builds. Imho most of the size is caused by debug symbols and this looks like reasonable feature request to reduce the size.