Last active
May 25, 2016 03:11
-
-
Save ericjsilva/d2f88585098cfecb4a0c to your computer and use it in GitHub Desktop.
AWS CLI script to modify RDS MySQL 5.6 parameter group to use optimized settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws rds modify-db-parameter-group --db-parameter-group={parameter-group-name} --region={region} \ | |
--parameters="ParameterName=character_set_server, ParameterValue=utf8, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=collation_server, ParameterValue=utf8_general_ci, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=tmp_table_size, ParameterValue={DBInstanceClassMemory/16}, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=max_heap_table_size, ParameterValue={DBInstanceClassMemory/16}, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=query_cache_type, ParameterValue=1, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=query_cache_size, ParameterValue=3048576, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=table_open_cache, ParameterValue=2500, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=join_buffer_size, ParameterValue={DBInstanceClassMemory/64}, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=thread_cache_size, ParameterValue={DBInstanceClassMemory/12582880}, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=sort_buffer_size, ParameterValue={DBInstanceClassMemory/64}, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=innodb_write_io_threads, ParameterValue=16, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=innodb_read_io_threads, ParameterValue=16, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=innodb_flush_log_at_trx_commit, ParameterValue=0, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=innodb_max_dirty_pages_pct, ParameterValue=90, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=max_allowed_packet, ParameterValue=33554432, ApplyMethod=pending-reboot" \ | |
--parameters="ParameterName=tx_isolation, ParameterValue=READ-COMMITTED, ApplyMethod=pending-reboot" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment