Merge lp:~mariosplivalo/charms/trusty/percona-cluster/table-cache into lp:~openstack-charmers-archive/charms/trusty/percona-cluster/next

Proposed by Mario Splivalo
Status: Merged
Merged at revision: 47
Proposed branch: lp:~mariosplivalo/charms/trusty/percona-cluster/table-cache
Merge into: lp:~openstack-charmers-archive/charms/trusty/percona-cluster/next
Diff against target: 45 lines (+7/-3)
3 files modified
config.yaml (+5/-0)
hooks/percona_hooks.py (+1/-2)
templates/my.cnf (+1/-1)
To merge this branch: bzr merge lp:~mariosplivalo/charms/trusty/percona-cluster/table-cache
Reviewer Review Type Date Requested Status
Billy Olsen Approve
Edward Hope-Morley Pending
Review via email: mp+249829@code.launchpad.net

Description of the change

This MP adds the table-open-cache charm config option so that sysadmin deploying the charm can tune table_open_cache mysql variable (formerly known as table_cache - both options are accepted in 5.5).

Also, it raises the default for table_open_cache from 512 to 2048 - this is a sane default as there is no significant increased memory usage with larger table_open_cache, and most deploys would benefit from having larger table cache.

To post a comment you must log in.
Revision history for this message
Billy Olsen (billy-olsen) wrote :

Mario, looks good to me - thanks for the submission. Approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'config.yaml'
--- config.yaml 2015-02-11 20:16:48 +0000
+++ config.yaml 2015-02-16 14:18:43 +0000
@@ -68,6 +68,11 @@
68 InnoDB table into separate .idb file. Existing InnoDB tables will remain68 InnoDB table into separate .idb file. Existing InnoDB tables will remain
69 in ibdata1 file - full dump/import is needed to get rid of large69 in ibdata1 file - full dump/import is needed to get rid of large
70 ibdata1 file70 ibdata1 file
71 table-open-cache:
72 type: int
73 default: 2048
74 description:
75 Sets table_open_cache (formerly known as table_cache) to mysql.
71 lp1366997-workaround:76 lp1366997-workaround:
72 type: boolean77 type: boolean
73 default: False78 default: False
7479
=== modified file 'hooks/percona_hooks.py'
--- hooks/percona_hooks.py 2015-02-11 23:16:02 +0000
+++ hooks/percona_hooks.py 2015-02-16 14:18:43 +0000
@@ -113,11 +113,10 @@
113 'sst_method': 'xtrabackup',113 'sst_method': 'xtrabackup',
114 'sst_password': mysql_password,114 'sst_password': mysql_password,
115 'innodb_file_per_table': config('innodb-file-per-table'),115 'innodb_file_per_table': config('innodb-file-per-table'),
116 'table_open_cache': config('table-open-cache'),
116 'lp1366997_workaround': config('lp1366997-workaround')117 'lp1366997_workaround': config('lp1366997-workaround')
117 }118 }
118119
119 print config
120
121 if config('prefer-ipv6'):120 if config('prefer-ipv6'):
122 # NOTE(hopem): this is a kludge to get percona working with ipv6.121 # NOTE(hopem): this is a kludge to get percona working with ipv6.
123 # See lp 1380747 for more info. This is intended as a stop gap until122 # See lp 1380747 for more info. This is intended as a stop gap until
124123
=== modified file 'templates/my.cnf'
--- templates/my.cnf 2015-02-11 20:16:48 +0000
+++ templates/my.cnf 2015-02-16 14:18:43 +0000
@@ -61,7 +61,7 @@
6161
62# Fine tuning62# Fine tuning
63key_buffer_size = {{ key_buffer }}63key_buffer_size = {{ key_buffer }}
64table_cache = 51264table_open_cache = {{ table_open_cache }}
65max_allowed_packet = 16M65max_allowed_packet = 16M
6666
67# InnoDB buffer should consume 100% of the bytes of the dataset size67# InnoDB buffer should consume 100% of the bytes of the dataset size

Subscribers

People subscribed via source and target branches