Amazon Auroraのパラメータグループ(RDS for MySQL 5.6と比較)

2015.07.28

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

はじめに

藤本です。

Amazon AuroraがGAされましたね。 Amazon AuroraはMySQL5.6互換というところで、 今回はAmazon RDS for MySQL(v5.6)のパラメータグループとパラメータを比較しました。

やってみた

aws-cliでパラメータグループで定義されたパラメータの一覧を取得することができます。

➜  ~  aws rds describe-engine-default-parameters --db-parameter-group-family aurora5.6
{
    "EngineDefaults": {
        "Parameters": [
(略)
        ]
    }
}

MySQLのParameter Groupとdiffります。

➜  ~  diff \
> <(aws rds describe-engine-default-parameters --db-parameter-group-family aurora5.6 |jq -r ".[].Parameters[].ParameterName") \ > <(aws rds describe-engine-default-parameters --db-parameter-group-family mysql5.6 |jq -r ".[].Parameters[].ParameterName") \ > | grep "<"
< table_cache_element_entry_ttl
< thread_handling

➜  ~  aws rds describe-engine-default-parameters --db-parameter-group-family aurora5.6 |jq -r ".[].Parameters |map(select(.[\"ParameterName\"]==\"table_cache_element_entry_ttl\")) |.[]"
{
  "Description": "table_cache_element_entry_ttl",
  "DataType": "integer",
  "AllowedValues": "5",
  "Source": "engine-default",
  "IsModifiable": false,
  "ParameterName": "table_cache_element_entry_ttl",
  "ApplyType": "static"
}

➜  ~  aws rds describe-engine-default-parameters --db-parameter-group-family aurora5.6 |jq -r ".[].Parameters |map(select(.[\"ParameterName\"]==\"thread_handling\")) |.[]"
{
  "Description": "The thread-handling model used by the server for connection threads.",
  "DataType": "string",
  "IsModifiable": true,
  "AllowedValues": "multiple-connections-per-thread,no-threads,one-thread-per-connection,dynamically-loaded",
  "Source": "system",
  "ParameterValue": "multiple-connections-per-thread",
  "ParameterName": "thread_handling",
  "ApplyType": "static"
}

以下の2つのパラメータが追加されました。

  • table_cache_element_entry_ttl Descriptionもパラメータ名で、変更も不可なようで何なのか。。。
  • thread_handling スレッドモードを選択できます。 デフォルトでは1スレッドに対して複数のクライアントからの接続を受け付けます。 MySQL EnterpriseやMariaDBのスレッドプールと同様の動作かな。

逆にAmazon RDS for MySQLにしかないパラメータもありますので、 移行の際はこちらもご注意ください。

➜  ~  diff \
<(aws rds describe-engine-default-parameters --db-parameter-group-family aurora5.6 |jq -r ".[].Parameters[].ParameterName") \
<(aws rds describe-engine-default-parameters --db-parameter-group-family mysql5.6 |jq -r ".[].Parameters[].ParameterName") \ | grep ">"
> auto_increment_increment
> auto_increment_offset
> binlog_checksum
> binlog_error_action
> binlog_format
> binlog_row_image
> binlog_rows_query_log_events
> binlogging_impossible_mode
> character_set_database
> character_set_filesystem
> completion_type
> default_storage_engine
> default_tmp_storage_engine
> innodb_adaptive_flushing_lwm
> innodb_autoinc_lock_mode
> innodb_buffer_pool_instances
> innodb_change_buffering
> innodb_checksum_algorithm
> innodb_cmp_per_index_enabled
> innodb_commit_concurrency
> innodb_data_home_dir
> innodb_fast_shutdown
> innodb_file_per_table
> innodb_flush_log_at_trx_commit
> innodb_ft_max_token_size
> innodb_ft_min_token_size
> innodb_ft_num_word_optimize
> innodb_ft_sort_pll_degree
> innodb_log_buffer_size
> innodb_log_file_size
> innodb_log_group_home_dir
> innodb_online_alter_log_max_size
> innodb_optimize_fulltext_only
> innodb_page_size
> innodb_print_all_deadlocks
> innodb_purge_batch_size
> innodb_purge_threads
> innodb_rollback_on_timeout
> innodb_rollback_segments
> innodb_spin_wait_delay
> innodb_strict_mode
> innodb_support_xa
> innodb_sync_array_size
> innodb_sync_spin_loops
> innodb_table_locks
> innodb_undo_directory
> innodb_undo_logs
> innodb_undo_tablespaces
> lc_time_names
> lower_case_table_names
> master-info-repository
> master_verify_checksum
> server_id
> simplified_binlog_gtid_recovery
> skip-character-set-client-handshake
> skip_name_resolve
> sync_frm
> table_open_cache_instances

参考

Amazon Auroraがリリースされているリージョンに対してAPIを発行する必要があります。 東京リージョンにAPIを発行しても無効なパラメータとなりますのでご注意ください。

aws rds describe-engine-default-parameters --db-parameter-group-family aurora5.6

A client error (InvalidParameterValue) occurred when calling the DescribeEngineDefaultParameters operation: ParameterGroupFamily aurora5.6 is not a valid parameter group family

➜  ~  aws configure
AWS Access Key ID [None]:
AWS Secret Access Key [None]:
Default region name [ap-northeast-1]: us-east-1
Default output format [None]:

➜  ~  aws rds describe-engine-default-parameters --db-parameter-group-family aurora5.6
{
    "EngineDefaults": {
        "Parameters": [
            {
                "Description": "Controls whether user-defined functions that have only an xxx symbol for the main function can be loaded",
                "DataType": "boolean",
                "AllowedValues": "0,1",
                "Source": "engine-default",
                "IsModifiable": false,
(略)
                "AllowedValues": "1-31536000",
                "Source": "engine-default",
                "IsModifiable": true,
                "ParameterName": "wait_timeout",
                "ApplyType": "dynamic"
            }
        ]
    }
}

参考サイト