Skip to content

Commit

Permalink
Renamed table_cache to table_open_cache in tuning.
Browse files Browse the repository at this point in the history
  • Loading branch information
arangamani committed Jan 9, 2014
1 parent 9e34cda commit d765cab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions libraries/tuning.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,27 @@ def self.tune_attributes(node_tuning, memory, server_usage)
# > 50 GB
#
if memory < 3 * GB
node_tuning['table_cache'] = (256 * factor).to_i
node_tuning['table_open_cache'] = (256 * factor).to_i
node_tuning['sort_buffer_size'] = value_with_units(2, 'M', factor)
node_tuning['innodb_additional_mem_pool_size'] = value_with_units(50, 'M', factor)
node_tuning['myisam_sort_buffer_size'] = value_with_units(64, 'M', factor)
elsif memory < 10 * GB
node_tuning['table_cache'] = (512 * factor).to_i
node_tuning['table_open_cache'] = (512 * factor).to_i
node_tuning['sort_buffer_size'] = value_with_units(4, 'M', factor)
node_tuning['innodb_additional_mem_pool_size'] = value_with_units(200, 'M', factor)
node_tuning['myisam_sort_buffer_size'] = value_with_units(96, 'M', factor)
elsif memory < 25 * GB
node_tuning['table_cache'] = (1024 * factor).to_i
node_tuning['table_open_cache'] = (1024 * factor).to_i
node_tuning['sort_buffer_size'] = value_with_units(8, 'M', factor)
node_tuning['innodb_additional_mem_pool_size'] = value_with_units(300, 'M', factor)
node_tuning['myisam_sort_buffer_size'] = value_with_units(128, 'M', factor)
elsif memory < 50 * GB
node_tuning['table_cache'] = (2048 * factor).to_i
node_tuning['table_open_cache'] = (2048 * factor).to_i
node_tuning['sort_buffer_size'] = value_with_units(16, 'M', factor)
node_tuning['innodb_additional_mem_pool_size'] = value_with_units(400, 'M', factor)
node_tuning['myisam_sort_buffer_size'] = value_with_units(256, 'M', factor)
else
node_tuning['table_cache'] = (4096 * factor).to_i
node_tuning['table_open_cache'] = (4096 * factor).to_i
node_tuning['sort_buffer_size'] = value_with_units(32, 'M', factor)
node_tuning['innodb_additional_mem_pool_size'] = value_with_units(500, 'M', factor)
node_tuning['myisam_sort_buffer_size'] = value_with_units(512, 'M', factor)
Expand Down
14 changes: 7 additions & 7 deletions spec/tuning_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
max_allowed_packet: "#{(20 * factor).to_i}M",
innodb_log_file_size: "#{(4 * factor).to_i}M",
innodb_log_buffer_size: "#{(16 * factor).to_i}M",
table_cache: (256 * factor).to_i,
table_open_cache: (256 * factor).to_i,
sort_buffer_size: "#{(2 * factor).to_i}M",
innodb_additional_mem_pool_size: "#{(50 * factor).to_i}M",
myisam_sort_buffer_size: "#{(64 * factor).to_i}M",
Expand All @@ -34,7 +34,7 @@
max_allowed_packet: "#{(20 * factor).to_i}M",
innodb_log_file_size: "#{(4 * factor).to_i}M",
innodb_log_buffer_size: "#{(16 * factor).to_i}M",
table_cache: (256 * factor).to_i,
table_open_cache: (256 * factor).to_i,
sort_buffer_size: "#{(2 * factor).to_i}M",
innodb_additional_mem_pool_size: "#{(50 * factor).to_i}M",
myisam_sort_buffer_size: "#{(64 * factor).to_i}M",
Expand All @@ -50,7 +50,7 @@
max_allowed_packet: "#{(128 * factor).to_i}M",
innodb_log_file_size: "#{(64 * factor).to_i}M",
innodb_log_buffer_size: "#{(8 * factor).to_i}M",
table_cache: (256 * factor).to_i,
table_open_cache: (256 * factor).to_i,
sort_buffer_size: "#{(2 * factor).to_i}M",
innodb_additional_mem_pool_size: "#{(50 * factor).to_i}M",
myisam_sort_buffer_size: "#{(64 * factor).to_i}M",
Expand All @@ -66,7 +66,7 @@
max_allowed_packet: "#{(128 * factor).to_i}M",
innodb_log_file_size: "#{(64 * factor).to_i}M",
innodb_log_buffer_size: "#{(8 * factor).to_i}M",
table_cache: (512 * factor).to_i,
table_open_cache: (512 * factor).to_i,
sort_buffer_size: "#{(4 * factor).to_i}M",
innodb_additional_mem_pool_size: "#{(200 * factor).to_i}M",
myisam_sort_buffer_size: "#{(96 * factor).to_i}M",
Expand All @@ -82,7 +82,7 @@
max_allowed_packet: "#{(128 * factor).to_i}M",
innodb_log_file_size: "#{(64 * factor).to_i}M",
innodb_log_buffer_size: "#{(8 * factor).to_i}M",
table_cache: (1024 * factor).to_i,
table_open_cache: (1024 * factor).to_i,
sort_buffer_size: "#{(8 * factor).to_i}M",
innodb_additional_mem_pool_size: "#{(300 * factor).to_i}M",
myisam_sort_buffer_size: "#{(128 * factor).to_i}M",
Expand All @@ -98,7 +98,7 @@
max_allowed_packet: "#{(128 * factor).to_i}M",
innodb_log_file_size: "#{(64 * factor).to_i}M",
innodb_log_buffer_size: "#{(8 * factor).to_i}M",
table_cache: (2048 * factor).to_i,
table_open_cache: (2048 * factor).to_i,
sort_buffer_size: "#{(16 * factor).to_i}M",
innodb_additional_mem_pool_size: "#{(400 * factor).to_i}M",
myisam_sort_buffer_size: "#{(256 * factor).to_i}M",
Expand All @@ -114,7 +114,7 @@
max_allowed_packet: "#{(128 * factor).to_i}M",
innodb_log_file_size: "#{(64 * factor).to_i}M",
innodb_log_buffer_size: "#{(8 * factor).to_i}M",
table_cache: (4096 * factor).to_i,
table_open_cache: (4096 * factor).to_i,
sort_buffer_size: "#{(32 * factor).to_i}M",
innodb_additional_mem_pool_size: "#{(500 * factor).to_i}M",
myisam_sort_buffer_size: "#{(512 * factor).to_i}M",
Expand Down

0 comments on commit d765cab

Please sign in to comment.