MyRocks Memory usage

222 views
Skip to first unread message

NaN

unread,
Dec 24, 2017, 4:30:33 AM12/24/17
to MyRocks - RocksDB storage engine for MySQL
Hi,

I am a happy MyRocks user, but I have a problem. MariaDB/MyRocks works really nice, but after some weeks it consumes most of my memory (I have 32GB at all) and other processes are not able to allocate memory anymore. Up to now, I just restart the mysql service every few weeks, but this is not really a nice solution. So I have two questions 1) how can I find out which part of mysql consumes so much memory 2) how can I fix it? 

My current configuration (just the rocksdb related stuff) looks like this:

transaction-isolation=READ-COMMITTED
rocksdb_max_open_files
=-1
rocksdb_max_total_wal_size
=1G
rocksdb_block_size
=16384
rocksdb_block_cache_size
=3G
rocksdb_table_cache_numshardbits
=6
rocksdb_bytes_per_sync
=4194304
rocksdb_wal_bytes_per_sync
=4194304
rocksdb_rate_limiter_bytes_per_sec
=104857600
rocksdb_compaction_sequential_deletes_count_sd
=1
rocksdb_compaction_sequential_deletes
=199999
rocksdb_compaction_sequential_deletes_window
=200000
rocksdb_tmpdir
=/mnt/data/tmp


rocksdb_default_cf_options
=write_buffer_size=128m;target_file_size_base=32m;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


lei li

unread,
Dec 26, 2017, 1:54:53 AM12/26/17
to MyRocks - RocksDB storage engine for MySQL
Look  at the specific file. 
 

NaN

unread,
Dec 27, 2017, 4:27:13 AM12/27/17
to MyRocks - RocksDB storage engine for MySQL
Specific file? Which file? I have a memory issue, not a disk space issue. Or do you mean the configuration file?

Aravind S

unread,
Mar 9, 2018, 2:45:49 AM3/9/18
to MyRocks - RocksDB storage engine for MySQL
You have set rocksdb_max_open_files to -1 which means infinite number of file handles. Well do you have heavy workload? May be you can try setting the open files to a specific hard limit.
Reply all
Reply to author
Forward
0 new messages