commit 338614b861e9794a82660c261f176059dcd903c9 Author: eson <474420502@qq.com> Date: Thu Feb 27 23:07:14 2020 +0800 myrocks 本地化安装 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b8b6317 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +data +error.log diff --git a/init.sh b/init.sh new file mode 100644 index 0000000..1d68c89 --- /dev/null +++ b/init.sh @@ -0,0 +1 @@ +mysql_install_db --basedir=/home/myrocks/usr/local/mysql --defaults-file=/home/myrocks/workspace/my.cnf diff --git a/my.cnf b/my.cnf new file mode 100644 index 0000000..c08286f --- /dev/null +++ b/my.cnf @@ -0,0 +1,48 @@ +[mysql] + +port=2206 +socket=/tmp/myrocks.sock + +[mysqld] + +user=myrocks +basedir=/home/myrocks/usr +datadir=/home/myrocks/workspace/data +# plugin-dir=/home/myrocks/usr/local/mysql/lib/plugin + +port=2206 +socket=/tmp/myrocks.sock +log-error=/home/myrocks/workspace/error.log +language=/home/myrocks/usr/local/mysql/share/english + +rocksdb +default-storage-engine=rocksdb +skip-innodb +default-tmp-storage-engine=MyISAM +log-bin +binlog_format=ROW +character-set-server=utf8 +collation-server=utf8_bin +transaction-isolation=READ-COMMITTED + +rocksdb_max_open_files=-1 +rocksdb_max_background_jobs=8 +rocksdb_max_total_wal_size=4G +rocksdb_block_size=16384 +rocksdb_block_cache_size=8G +rocksdb_table_cache_numshardbits=6 + +# rate limiter +rocksdb_bytes_per_sync=8194304 +rocksdb_wal_bytes_per_sync=8194304 +rocksdb_rate_limiter_bytes_per_sec=1004857600 #100MB/s. Increase if you're running on higher spec machines + +# 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 + +# read free replication +# rocksdb_rpl_lookup_rows=0 + +rocksdb_default_cf_options=write_buffer_size=256m;target_file_size_base=128m;max_bytes_for_level_base=512m;level0_file_num_compaction_trigger=4;level0_slowdown_writes_trigger=10;level0_stop_writes_trigger=15;max_write_buffer_number=4;compression_per_level=kLZ4Compression;bottommost_compression=kZSTD;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;compaction_pri=kMinOverlappingRatio diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..d434613 --- /dev/null +++ b/readme.md @@ -0,0 +1,2 @@ +make DESTDIR=~/ install +export MY_BASEDIR_VERSION=/home/myrocks/usr/local/mysql (/home/myrocks install dir)