Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-882

LP #1433980: Percona server .deb binaries are built without fast mutexes

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Packaging
    • Labels:

      Description

      **Reported in Launchpad by Valerii Kravchuk last update 01-04-2015 05:03:54

      Based on INFO_BIN files included, this is how .deb binaries are built by Percona (only relevant parts are present below):

      openxs@ao756:~/bzr/percona-5.6$ zcat /usr/share/doc/percona-server-server-5.6/INFO_BIN.gz
      ===== Information about the build process: =====
      Build was run at 2015-03-02 12:43:59 on host 'vps-trusty-x64-03'

      Build was done on Linux-2.6.32-042stab093.5 using x86_64
      Build was done using cmake 2.8.12

      ===== Compiler flags used (from the 'sql/' subdirectory): =====

      1. compile C with /usr/bin/x86_64-linux-gnu-gcc
      2. compile CXX with /usr/bin/x86_64-linux-gnu-g++
        C_FLAGS = -O2 -g -fno-strict-aliasing -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -I/mnt/workspace/percona-server-5.6-debian-binary/label_exp/ubuntu-trusty-64bit/percona-server-5.6-5.6.23-72.1/builddir/include -I/mnt/workspace/percona-server-5.6-debian-binary/label_exp/ubuntu-trusty-64bit/percona-server-5.6-5.6.23-72.1/include -I/mnt/workspace/percona-server-5.6-debian-binary/label_exp/ubuntu-trusty-64bit/percona-server-5.6-5.6.23-72.1/sql -I/mnt/workspace/percona-server-5.6-debian-binary/label_exp/ubuntu-trusty-64bit/percona-server-5.6-5.6.23-72.1/regex -I/mnt/workspace/percona-server-5.6-debian-binary/label_exp/ubuntu-trusty-64bit/percona-server-5.6-5.6.23-72.1/builddir/sql
        C_DEFINES = -DHAVE_CONFIG_H -DHAVE_EVENT_SCHEDULER -DHAVE_OPENSSL -DHAVE_POOL_OF_THREADS -DMYSQL_SERVER
        CXX_FLAGS = -O3 -g -felide-constructors -fno-exceptions -fno-rtti -fno-strict-aliasing -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -I/mnt/workspace/percona-server-5.6-debian-binary/label_exp/ubuntu-trusty-64bit/percona-server-5.6-5.6.23-72.1/builddir/include -I/mnt/workspace/percona-server-5.6-debian-binary/label_exp/ubuntu-trusty-64bit/percona-server-5.6-5.6.23-72.1/include -I/mnt/workspace/percona-server-5.6-debian-binary/label_exp/ubuntu-trusty-64bit/percona-server-5.6-5.6.23-72.1/sql -I/mnt/workspace/percona-server-5.6-debian-binary/label_exp/ubuntu-trusty-64bit/percona-server-5.6-5.6.23-72.1/regex -I/mnt/workspace/percona-server-5.6-debian-binary/label_exp/ubuntu-trusty-64bit/percona-server-5.6-5.6.23-72.1/builddir/sql
        CXX_DEFINES = -DHAVE_CONFIG_H -DHAVE_EVENT_SCHEDULER -DHAVE_OPENSSL -DHAVE_POOL_OF_THREADS -DMYSQL_SERVER

      Pointer size: 8

      ===== Feature flags used: =====
      – Cache values
      BUILDNAME:STRING=ft-index RelWithDebInfo Linux-2.6.32-042stab093.5 x86_64 GNU g++-4.8 4.8.2
      BUILD_TESTING:BOOL=OFF
      CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
      ...
      WITH_ARCHIVE_STORAGE_ENGINE:BOOL=ON
      WITH_ASAN:BOOL=OFF
      WITH_BLACKHOLE_STORAGE_ENGINE:BOOL=ON
      WITH_DEBUG:BOOL=OFF
      WITH_DEFAULT_COMPILER_OPTIONS:BOOL=ON
      WITH_DEFAULT_FEATURE_SET:BOOL=ON
      WITH_EDITLINE:STRING=bundled
      WITH_EMBEDDED_SERVER:BOOL=OFF
      WITH_EXAMPLE_STORAGE_ENGINE:BOOL=OFF
      WITH_EXTRA_CHARSETS:STRING=all
      WITH_FEDERATED_STORAGE_ENGINE:BOOL=ON
      WITH_INNOBASE_STORAGE_ENGINE:BOOL=ON
      WITH_INNODB_MEMCACHED:BOOL=ON
      WITH_LIBEVENT:STRING=bundled
      WITH_LIBWRAP:BOOL=ON
      WITH_PAM:BOOL=ON
      WITH_PARTITION_STORAGE_ENGINE:BOOL=ON
      WITH_PERFSCHEMA_STORAGE_ENGINE:BOOL=ON
      WITH_PIC:BOOL=OFF
      WITH_QUERY_RESPONSE_TIME:BOOL=OFF
      WITH_SSL:STRING=system
      WITH_UNIT_TESTS:BOOL=ON
      WITH_VALGRIND:BOOL=OFF
      WITH_ZLIB:STRING=system
      XZ_SOURCE_DIR:FILEPATH=/mnt/workspace/percona-server-5.6-debian-binary/label_exp/ubuntu-trusty-64bit/percona-server-5.6-5.6.23-72.1/storage/tokudb/ft-index/third_party/xz-4.999.9beta

      ===== EOF =====

      This is how .rpm ones are built:

      [openxs@centos ~]$ cat /usr/share/doc/Percona-Server-server-56-5.6.23/INFO_BIN
      ===== Information about the build process: =====
      Build was run at 2015-03-02 17:43:22 on host 'vps-centos6-x64-03.ci.percona.com'

      Build was done on Linux-2.6.32-042stab093.5 using x86_64
      Build was done using cmake 2.8.12

      ===== Compiler flags used (from the 'sql/' subdirectory): =====

      1. compile C with /opt/percona-devtoolset/root/usr/bin/gcc
      2. compile CXX with /opt/percona-devtoolset/root/usr/bin/g++
        C_FLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1 -I/mnt/workspace/percona-server-5.6-redhat-binary/label_exp/centos6-64/rpmbuild/BUILD/percona-server-5.6.23-72.1/release/include -I/mnt/workspace/percona-server-5.6-redhat-binary/label_exp/centos6-64/rpmbuild/BUILD/percona-server-5.6.23-72.1/include -I/mnt/workspace/percona-server-5.6-redhat-binary/label_exp/centos6-64/rpmbuild/BUILD/percona-server-5.6.23-72.1/sql -I/mnt/workspace/percona-server-5.6-redhat-binary/label_exp/centos6-64/rpmbuild/BUILD/percona-server-5.6.23-72.1/regex -I/mnt/workspace/percona-server-5.6-redhat-binary/label_exp/centos6-64/rpmbuild/BUILD/percona-server-5.6.23-72.1/zlib -I/mnt/workspace/percona-server-5.6-redhat-binary/label_exp/centos6-64/rpmbuild/BUILD/percona-server-5.6.23-72.1/release/sql
        C_DEFINES = -DHAVE_CONFIG_H -DHAVE_EVENT_SCHEDULER -DHAVE_OPENSSL -DHAVE_POOL_OF_THREADS -DMYSQL_SERVER
        CXX_FLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -felide-constructors -fno-rtti -fPIC -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1 -I/mnt/workspace/percona-server-5.6-redhat-binary/label_exp/centos6-64/rpmbuild/BUILD/percona-server-5.6.23-72.1/release/include -I/mnt/workspace/percona-server-5.6-redhat-binary/label_exp/centos6-64/rpmbuild/BUILD/percona-server-5.6.23-72.1/include -I/mnt/workspace/percona-server-5.6-redhat-binary/label_exp/centos6-64/rpmbuild/BUILD/percona-server-5.6.23-72.1/sql -I/mnt/workspace/percona-server-5.6-redhat-binary/label_exp/centos6-64/rpmbuild/BUILD/percona-server-5.6.23-72.1/regex -I/mnt/workspace/percona-server-5.6-redhat-binary/label_exp/centos6-64/rpmbuild/BUILD/percona-server-5.6.23-72.1/zlib -I/mnt/workspace/percona-server-5.6-redhat-binary/label_exp/centos6-64/rpmbuild/BUILD/percona-server-5.6.23-72.1/release/sql
        CXX_DEFINES = -DHAVE_CONFIG_H -DHAVE_EVENT_SCHEDULER -DHAVE_OPENSSL -DHAVE_POOL_OF_THREADS -DMYSQL_SERVER

      Pointer size: 8

      ===== Feature flags used: =====
      – Cache values
      BUILDNAME:STRING=ft-index RelWithDebInfo Linux-2.6.32-042stab093.5 x86_64 GNU g++ 4.8.1
      BUILD_TESTING:BOOL=OFF
      CMAKE_BUILD_TYPE:STRING=RelWithDebInfo

      ...

      WITH_ARCHIVE_STORAGE_ENGINE:BOOL=ON
      WITH_ASAN:BOOL=OFF
      WITH_BLACKHOLE_STORAGE_ENGINE:BOOL=ON
      WITH_DEBUG:BOOL=OFF
      WITH_DEFAULT_COMPILER_OPTIONS:BOOL=ON
      WITH_DEFAULT_FEATURE_SET:BOOL=ON
      WITH_EDITLINE:STRING=bundled
      WITH_EMBEDDED_SERVER:BOOL=OFF
      WITH_EXAMPLE_STORAGE_ENGINE:BOOL=OFF
      WITH_EXTRA_CHARSETS:STRING=all
      WITH_FEDERATED_STORAGE_ENGINE:BOOL=ON
      WITH_INNOBASE_STORAGE_ENGINE:BOOL=ON
      WITH_INNODB_MEMCACHED:BOOL=ON
      WITH_LIBEVENT:STRING=bundled
      WITH_LIBWRAP:BOOL=OFF
      WITH_PAM:BOOL=ON
      WITH_PARTITION_STORAGE_ENGINE:BOOL=ON
      WITH_PERFSCHEMA_STORAGE_ENGINE:BOOL=ON
      WITH_PIC:BOOL=ON
      WITH_QUERY_RESPONSE_TIME:BOOL=OFF
      WITH_SSL:STRING=system
      WITH_UNIT_TESTS:BOOL=ON
      WITH_VALGRIND:BOOL=OFF
      WITH_ZLIB:STRING=bundled
      XZ_SOURCE_DIR:FILEPATH=/mnt/workspace/percona-server-5.6-redhat-binary/label_exp/centos6-64/rpmbuild/BUILD/percona-server-5.6.23-72.1/storage/tokudb/ft-index/third_party/xz-4.999.9beta

      ===== EOF =====

      Note that fast mutexes are NOT used in both cases.

      This is what we see in a clean build from sources using recommended command line (I've changed only prefix):

      cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF -DCMAKE_INSTALL_PREFIX=/home/openxs/dbs/p5.6

      (note -DBUILD_CONFIG-mysql_release there):

      openxs@ao756:~/bzr/percona-5.6$ cat Docs/INFO_BIN
      ===== Information about the build process: =====
      Build was run at 2015-03-19 10:16:18 on host 'ao756'

      Build was done on Linux-3.13.0-29-generic using x86_64
      Build was done using cmake 2.8.12

      ===== Compiler flags used (from the 'sql/' subdirectory): =====

      1. compile C with /usr/bin/cc
      2. compile CXX with /usr/bin/c++
        C_FLAGS = -fPIC -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1 -I/home/openxs/bzr/percona-5.6/include -I/home/openxs/bzr/percona-5.6/sql -I/home/openxs/bzr/percona-5.6/regex -I/home/openxs/bzr/percona-5.6/zlib -I/home/openxs/bzr/percona-5.6/extra/yassl/include -I/home/openxs/bzr/percona-5.6/extra/yassl/taocrypt/include -DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED
        C_DEFINES = -DHAVE_CONFIG_H -DHAVE_EVENT_SCHEDULER -DHAVE_POOL_OF_THREADS -DMYSQL_SERVER
        CXX_FLAGS = -fPIC -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1 -I/home/openxs/bzr/percona-5.6/include -I/home/openxs/bzr/percona-5.6/sql -I/home/openxs/bzr/percona-5.6/regex -I/home/openxs/bzr/percona-5.6/zlib -I/home/openxs/bzr/percona-5.6/extra/yassl/include -I/home/openxs/bzr/percona-5.6/extra/yassl/taocrypt/include -DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED
        CXX_DEFINES = -DHAVE_CONFIG_H -DHAVE_EVENT_SCHEDULER -DHAVE_POOL_OF_THREADS -DMYSQL_SERVER

      Pointer size: 8

      ===== Feature flags used: =====
      – Cache values
      CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
      CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
      CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
      CMAKE_INSTALL_PREFIX:PATH=/home/openxs/dbs/p5.6
      COMMUNITY_BUILD:BOOL=ON
      ENABLED_PROFILING:BOOL=ON
      ENABLE_DEBUG_SYNC:BOOL=ON
      ENABLE_DOWNLOADS:BOOL=OFF
      ENABLE_DTRACE:BOOL=OFF
      ENABLE_GCOV:BOOL=OFF
      ENABLE_GPROF:BOOL=OFF
      ENABLE_MEMCACHED_SASL:BOOL=OFF
      ENABLE_MEMCACHED_SASL_PWDB:BOOL=OFF
      FEATURE_SET:STRING=community

      ...

      WITH_ARCHIVE_STORAGE_ENGINE:BOOL=ON
      WITH_ASAN:BOOL=OFF
      WITH_BLACKHOLE_STORAGE_ENGINE:BOOL=ON
      WITH_DEBUG:BOOL=OFF
      WITH_DEFAULT_COMPILER_OPTIONS:BOOL=ON
      WITH_DEFAULT_FEATURE_SET:BOOL=ON
      WITH_EDITLINE:STRING=bundled
      WITH_EMBEDDED_SERVER:BOOL=OFF
      WITH_EXAMPLE_STORAGE_ENGINE:BOOL=OFF
      WITH_EXTRA_CHARSETS:STRING=all
      WITH_FEDERATED_STORAGE_ENGINE:BOOL=ON
      WITH_INNOBASE_STORAGE_ENGINE:BOOL=ON
      WITH_INNODB_MEMCACHED:BOOL=OFF
      WITH_LIBEVENT:STRING=bundled
      WITH_LIBWRAP:BOOL=OFF
      WITH_PAM:BOOL=OFF
      WITH_PARTITION_STORAGE_ENGINE:BOOL=ON
      WITH_PERFSCHEMA_STORAGE_ENGINE:BOOL=ON
      WITH_PIC:BOOL=ON
      WITH_QUERY_RESPONSE_TIME:BOOL=OFF
      WITH_SSL:STRING=bundled
      WITH_UNIT_TESTS:BOOL=ON
      WITH_VALGRIND:BOOL=OFF
      WITH_ZLIB:STRING=bundled

      ===== EOF =====

      Note -DMY_PTHREAD_FASTMUTEX=1 specifically that is used for build created with -DBUILD_CONFIG=mysql_release.

      The fact that fast muteses are NOT used in recent Percona Server official binaries leads to various performance consequences. See https://bugs.launchpad.net/bugs/1413836 and customer issue (to be linked later) for some more details.

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lpjirasync lpjirasync (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: