Create a gist now

Instantly share code, notes, and snippets.

[mysqld]
sql_mode=no_engine_substitution,no_unsigned_subtraction
default_tmp_storage_engine=MyISAM
sync_relay_log_info=100
relay_log_recovery=1
relay_log_info_repository=FILE
eq_range_index_dive_limit=1000
# block_create_myisam=1
gtid_mode=OFF
enforce_gtid_consistency=ON
lock_wait_timeout=60
part_scan_max=1000
ssl=0
plugin_load=
skip_temp_pool=0
# block_ftwrl=1
long_query_time=10
#skip_partition=1
wait_timeout=10
interactive_timeout=120
max_allowed_packet=128M
slave_max_allowed_packet=256M
skip_name_resolve
back_log=4096
max_connections=5000
max_user_connections=4000
max_connect_errors=3000
key_buffer_size=16M
myisam_sort_buffer_size=256M
max_tmp_tables=64
read_buffer_size=1M
read_rnd_buffer_size=1M
sort_buffer_size=2M
table_open_cache=50000
table_definition_cache=60000
query_cache_limit=4M
query_cache_size=0
query_cache_type=0
thread_cache_size=500
thread_stack=196608
open_files_limit=32767
net_read_timeout=15
net_write_timeout=30
tmp_table_size=64M
max_heap_table_size=512M
log_slow_extra=1
group_concat_max_len=1024
max_binlog_size=1G
binlog_cache_size=262144
max_binlog_cache_size=666G
tmpdir=/tmp
slave_load_tmpdir=/tmp
slow_query_log_file=/data/mysql/myrocks/slow.log
slow_query_log=1
log_slow_slave_statements=1
collation-server=latin1_bin
default-storage-engine=rocksdb
skip-innodb
default-tmp-storage-engine=MyISAM
rocksdb
long_query_time=10
log_bin=/binlogs/myrocks/bl
sync_binlog=0
binlog_format=row
transaction-isolation=READ-COMMITTED
rocksdb_max_open_files=-1
rocksdb_base_background_compactions=1
rocksdb_max_background_compactions=8
rocksdb_max_total_wal_size=4G
rocksdb_max_background_flushes=4
rocksdb_block_size=16384
rocksdb_table_cache_numshardbits=6
rocksdb_bytes_per_sync=4194304
rocksdb_wal_bytes_per_sync=4194304
# triggering compaction if there are many sequential deletes
rocksdb_compaction_sequential_deletes_count_sd=1
rocksdb_compaction_sequential_deletes=199999
rocksdb_compaction_sequential_deletes_window=200000
# Enable one of these
# ... to enable compression, change "bottommost_compression" to select the algorithm
# rocksdb_default_cf_options=write_buffer_size=64m;target_file_size_base=32m;max_bytes_for_level_base=512m;level0_file_num_compaction_trigger=4;level0_slowdown_writes_trigger=20;level0_stop_writes_trigger=30;max_write_buffer_number=4;compression_per_level=kNoCompression:kNoCompression:kNoCompression:kLZ4Compression:kLZ4Compression:kLZ4Compression;bottommost_compression=kLZ4Compression;compression_opts=-14:1:0;block_based_table_factory={cache_index_and_filter_blocks=1;filter_policy=bloomfilter:10:false;whole_key_filtering=1};level_compaction_dynamic_level_bytes=true;optimize_filters_for_hits=true
# ... to disable compression
# rocksdb_default_cf_options=write_buffer_size=64m;target_file_size_base=32m;max_bytes_for_level_base=512m;level0_file_num_compaction_trigger=4;level0_slowdown_writes_trigger=20;level0_stop_writes_trigger=30;max_write_buffer_number=4;compression_per_level=kNoCompression:kNoCompression:kNoCompression:kNoCompression:kNoCompression:kNoCompression;bottommost_compression=kNoCompression;block_based_table_factory={cache_index_and_filter_blocks=1;filter_policy=bloomfilter:10:false;whole_key_filtering=1};level_compaction_dynamic_level_bytes=true;optimize_filters_for_hits=true
# change this as needed
rocksdb_block_cache_size=100G
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment