Skip to content

Commit

Permalink
Merge pull request #273 from phlipper/add-myisam-read-buffer-size-config
Browse files Browse the repository at this point in the history
Add `myisam_read_buffer_size` attribute
  • Loading branch information
phlipper committed Mar 14, 2015
2 parents 75101d3 + 8c987e2 commit 4833f6b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -340,6 +340,7 @@ default["percona"]["server"]["bulk_insert_buffer_size"] = "64M"
default["percona"]["server"]["myisam_recover_options"] = "BACKUP"
default["percona"]["server"]["myisam_sort_buffer_size"] = "128M"
default["percona"]["server"]["myisam_max_sort_file_size"] = "10G"
default["percona"]["server"]["myisam_read_buffer_size"] = "8M"
default["percona"]["server"]["myisam_repair_threads"] = 1

# InnoDB Specific
Expand Down Expand Up @@ -675,6 +676,8 @@ Many thanks go to the following [contributors](https://github.com/phlipper/chef-
* fix `ConfigHelper` definitions to make them available from `module_function`
* **[@dng-dev](https://github.com/dng-dev)**
* add `innodb_import_table_from_xtrabackup` attribute
* **[@washingtoneg](https://github.com/washingtoneg)**
* add `myisam_read_buffer_size` attribute


## License
Expand Down
1 change: 1 addition & 0 deletions attributes/default.rb
Expand Up @@ -136,6 +136,7 @@
default["percona"]["server"]["myisam_recover_options"] = "BACKUP"
default["percona"]["server"]["myisam_sort_buffer_size"] = "128M"
default["percona"]["server"]["myisam_max_sort_file_size"] = "10G"
default["percona"]["server"]["myisam_read_buffer_size"] = "8M"
default["percona"]["server"]["myisam_repair_threads"] = 1

# InnoDB Specific
Expand Down
13 changes: 13 additions & 0 deletions templates/default/my.cnf.main.erb
Expand Up @@ -382,6 +382,19 @@ bulk_insert_buffer_size = <%= node["percona"]["server"]["bulk_insert_buffer_size
# large settings.
myisam_sort_buffer_size = <%= node["percona"]["server"]["myisam_sort_buffer_size"] %>

# This buffer is allocated when MySQL does a sequential scan for a MyISAM
# table. It is allocated per thread so be careful with large settings.
# Note that the maximum permissible setting for read_buffer_size is 2GB.
# The value of this variable should be a multiple of 4KB. If it is set to
# a value that is not a multiple of 4KB, its value will be rounded down
# to the nearest multiple of 4KB.
# This option is also used in the following context for all search engines:
# For caching the indexes in a temporary file (not a temporary table), when
# sorting rows for ORDER BY.
# For bulk insert into partitions.
# For caching results of nested queries.
myisam_read_buffer_size = <%= node["percona"]["server"]["myisam_read_buffer_size"] %>

# The maximum size of the temporary file MySQL is allowed to use while
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
# If the file-size would be bigger than this, the index will be created
Expand Down

0 comments on commit 4833f6b

Please sign in to comment.