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
1=== modified file 'config.yaml'
2--- config.yaml 2015-02-11 20:16:48 +0000
3+++ config.yaml 2015-02-16 14:18:43 +0000
4@@ -68,6 +68,11 @@
5 InnoDB table into separate .idb file. Existing InnoDB tables will remain
6 in ibdata1 file - full dump/import is needed to get rid of large
7 ibdata1 file
8+ table-open-cache:
9+ type: int
10+ default: 2048
11+ description:
12+ Sets table_open_cache (formerly known as table_cache) to mysql.
13 lp1366997-workaround:
14 type: boolean
15 default: False
16
17=== modified file 'hooks/percona_hooks.py'
18--- hooks/percona_hooks.py 2015-02-11 23:16:02 +0000
19+++ hooks/percona_hooks.py 2015-02-16 14:18:43 +0000
20@@ -113,11 +113,10 @@
21 'sst_method': 'xtrabackup',
22 'sst_password': mysql_password,
23 'innodb_file_per_table': config('innodb-file-per-table'),
24+ 'table_open_cache': config('table-open-cache'),
25 'lp1366997_workaround': config('lp1366997-workaround')
26 }
27
28- print config
29-
30 if config('prefer-ipv6'):
31 # NOTE(hopem): this is a kludge to get percona working with ipv6.
32 # See lp 1380747 for more info. This is intended as a stop gap until
33
34=== modified file 'templates/my.cnf'
35--- templates/my.cnf 2015-02-11 20:16:48 +0000
36+++ templates/my.cnf 2015-02-16 14:18:43 +0000
37@@ -61,7 +61,7 @@
38
39 # Fine tuning
40 key_buffer_size = {{ key_buffer }}
41-table_cache = 512
42+table_open_cache = {{ table_open_cache }}
43 max_allowed_packet = 16M
44
45 # InnoDB buffer should consume 100% of the bytes of the dataset size

Subscribers

People subscribed via source and target branches