wrong key_buffer_size value in the mysql config

Bug #1648766 reported by Dmitry Goloshubov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Sergii Golovatiuk
Nominated for Ocata by Sergii Golovatiuk
Mitaka
Fix Released
High
Sergii Golovatiuk
Newton
Fix Committed
High
Sergii Golovatiuk

Bug Description

On the controller nodes the key_buffer_size parameter has wrong value in the [mysqld] section:
# cat /etc/mysql/my.cnf
...
[mysqld]
...
key_buffer_size = 64
...

# grep -r "key_buffer_size" /etc
/etc/mysql/my.cnf:key_buffer_size = 16M
/etc/mysql/my.cnf:key_buffer_size = 64
/etc/puppet/modules/mysql/CHANGELOG.md:- key_buffer renamed to key_buffer_size.
/etc/puppet/modules/mysql/manifests/params.pp: 'key_buffer_size' => '16M',
/etc/puppet/modules/mysql/manifests/params.pp: 'key_buffer_size' => '16M',
/etc/puppet/modules/osnailyfacter/manifests/database/database.pp: $key_buffer_size = 64
/etc/puppet/modules/osnailyfacter/manifests/database/database.pp: "<%= [[((${::memorysize_mb} * 0.3 - ${key_buffer_size}) /
/etc/puppet/modules/osnailyfacter/manifests/database/database.pp: 'key_buffer_size' => $key_buffer_size,

Expected results:
 key_buffer_size=64M

Actual result:
 key_buffer_size=64

Impact:
 performance issues (?)

Description of the environment:
 MOS 9.1

description: updated
Changed in fuel:
importance: Undecided → High
milestone: none → 9.2
Changed in fuel:
assignee: nobody → Sergii Golovatiuk (sgolovatiuk)
status: New → Confirmed
Changed in fuel:
milestone: 9.2 → 11.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/412431

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/413112

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/413114

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/412431
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=09ea28e73d656c3da56eac993e3395b5f3944c05
Submitter: Jenkins
Branch: master

commit 09ea28e73d656c3da56eac993e3395b5f3944c05
Author: Sergii Golovatiuk <email address hidden>
Date: Mon Dec 19 12:15:47 2016 +0100

    Modify memory calculation formula for MySQL

    - Optimize memory calculation formula. From one hand we want to limit
      MySQL to allocate not more than 50% of RAM. From other hand we want to
      have 1024 or greater connections. So, if environment has 2GB MySQL
      will allocate 1720Mb, if environment has 3 GB it will allocate 1984Mb
      of RAM. It will allocate 50% of RAM if server has 4.5+ GB. The higher
      limit will have action if server has 37+GB. In that case MySQL will
      allocate less than 50% of RAM.
    - Pass key_buffer_size in megabytes rather than bytes.
    - Remove query_cache_type, query_cache_type from fuel_override_options
      hash, as these settings are galera specific, so they should be
      explicitly in wsrep_options hash
    - Remove myisam_sort_buffer_size. OpenStack services use InnoDB engine,
      so MyISAM optimazation should be disabled. The only DB which uses
      MyISAM is 'mysql'. The default value 8M is enough

    DocImpact
    Closes-Bug: #1648766

    Change-Id: Ia48f94936fcd3090208e4e485d7c9cbfea3c0ed4
    Signed-off-by: Sergii Golovatiuk <email address hidden>

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/mitaka)

Reviewed: https://review.openstack.org/413114
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=0d7f92adb595914ab81834af215210822780b0d2
Submitter: Jenkins
Branch: stable/mitaka

commit 0d7f92adb595914ab81834af215210822780b0d2
Author: Sergii Golovatiuk <email address hidden>
Date: Mon Dec 19 12:15:47 2016 +0100

    Modify memory calculation formula for MySQL

    - Optimize memory calculation formula. From one hand we want to limit
      MySQL to allocate not more than 50% of RAM. From other hand we want to
      have 1024 or greater connections. So, if environment has 2GB MySQL
      will allocate 1720Mb, if environment has 3 GB it will allocate 1984Mb
      of RAM. It will allocate 50% of RAM if server has 4.5+ GB. The higher
      limit will have action if server has 37+GB. In that case MySQL will
      allocate less than 50% of RAM.
    - Pass key_buffer_size in megabytes rather than bytes.
    - Remove query_cache_type, query_cache_type from fuel_override_options
      hash, as these settings are galera specific, so they should be
      explicitly in wsrep_options hash
    - Remove myisam_sort_buffer_size. OpenStack services use InnoDB engine,
      so MyISAM optimazation should be disabled. The only DB which uses
      MyISAM is 'mysql'. The default value 8M is enough

    DocImpact
    Closes-Bug: #1648766

    Change-Id: Ia48f94936fcd3090208e4e485d7c9cbfea3c0ed4
    Signed-off-by: Sergii Golovatiuk <email address hidden>

tags: added: on-verification
Revision history for this message
Ekaterina Shutova (eshutova) wrote :

Verified on:
cat /etc/fuel_build_id:
 495
cat /etc/fuel_build_number:
 495
cat /etc/fuel_release:
 9.0
cat /etc/fuel_openstack_version:
 mitaka-9.0
rpm -qa | egrep 'fuel|astute|network-checker|nailgun|packetary|shotgun':
 fuel-nailgun-9.0.0-1.mos8924.noarch
 network-checker-9.0.0-1.mos77.x86_64
 fuel-ostf-9.0.0-1.mos947.noarch
 fuel-notify-9.0.0-1.mos8680.noarch
 fuel-agent-9.0.0-1.mos291.noarch
 python-packetary-9.0.0-1.mos160.noarch
 nailgun-mcagents-9.0.0-1.mos784.noarch
 fuel-setup-9.0.0-1.mos6359.noarch
 shotgun-9.0.0-1.mos90.noarch
 fuel-utils-9.0.0-1.mos8680.noarch
 fuelmenu-9.0.0-1.mos276.noarch
 fuel-provisioning-scripts-9.0.0-1.mos8924.noarch
 fuel-mirror-9.0.0-1.mos160.noarch
 fuel-openstack-metadata-9.0.0-1.mos8924.noarch
 rubygem-astute-9.0.0-1.mos784.noarch
 fuel-release-9.0.0-1.mos6359.noarch
 fuel-misc-9.0.0-1.mos8680.noarch
 fuel-ui-9.0.0-1.mos2854.noarch
 fuel-library9.0-9.0.0-1.mos8680.noarch
 fuel-bootstrap-cli-9.0.0-1.mos291.noarch
 fuel-migrate-9.0.0-1.mos8680.noarch
 python-fuelclient-9.0.0-1.mos364.noarch
 fuel-9.0.0-1.mos6359.noarch

tags: removed: on-verification
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/newton)

Reviewed: https://review.openstack.org/413112
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=095d0092067373691309230ee442845f2b17bc67
Submitter: Jenkins
Branch: stable/newton

commit 095d0092067373691309230ee442845f2b17bc67
Author: Sergii Golovatiuk <email address hidden>
Date: Mon Dec 19 12:15:47 2016 +0100

    Modify memory calculation formula for MySQL

    - Optimize memory calculation formula. From one hand we want to limit
      MySQL to allocate not more than 50% of RAM. From other hand we want to
      have 1024 or greater connections. So, if environment has 2GB MySQL
      will allocate 1720Mb, if environment has 3 GB it will allocate 1984Mb
      of RAM. It will allocate 50% of RAM if server has 4.5+ GB. The higher
      limit will have action if server has 37+GB. In that case MySQL will
      allocate less than 50% of RAM.
    - Pass key_buffer_size in megabytes rather than bytes.
    - Remove query_cache_type, query_cache_type from fuel_override_options
      hash, as these settings are galera specific, so they should be
      explicitly in wsrep_options hash
    - Remove myisam_sort_buffer_size. OpenStack services use InnoDB engine,
      so MyISAM optimazation should be disabled. The only DB which uses
      MyISAM is 'mysql'. The default value 8M is enough

    DocImpact
    Closes-Bug: #1648766

    Change-Id: Ia48f94936fcd3090208e4e485d7c9cbfea3c0ed4
    Signed-off-by: Sergii Golovatiuk <email address hidden>

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/fuel-library 11.0.0.0rc1

This issue was fixed in the openstack/fuel-library 11.0.0.0rc1 release candidate.

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.