Tencent / Tendis

Tendis is a high-performance distributed storage system fully compatible with the Redis protocol.
http://tendis.cn
Other
2.92k stars 319 forks source link

Tendis 单实例部署 RSS内存占用过高问题 #250

Open chenshi2023 opened 11 months ago

chenshi2023 commented 11 months ago

Description

Tendis 单实例 total-memory 内存开销 7g左右,但实际进程的 RSS内存开销不断增大 涨到48.8G, 想了解下除了rocksdb自身内存消耗, RSS内存其他消耗在哪些地方?

rocksdb.total-memory:7067943720 rocksdb.size-all-mem-tables:2759316280 rocksdb.estimate-table-readers-mem:18733136 rocksdb.blockcache.capacity:4294967296

memory-2

Dataset
rocksdb.kvstore-count:10
rocksdb.total-sst-files-size:7378251993
rocksdb.binlogcf-sst-files-size:501995550
rocksdb.live-sst-files-size:7378251993
rocksdb.estimate-live-data-size:2287508414
rocksdb.estimate-num-keys:261300
rocksdb.estimate-num-keys-binlogcf:52956
rocksdb.total-memory:7067943720
rocksdb.cur-size-all-mem-tables:734126328
rocksdb.size-all-mem-tables:2759316280
rocksdb.estimate-table-readers-mem:18733136
rocksdb.blockcache.capacity:4294967296
rocksdb.blockcache.usage:4289894304
rocksdb.blockcache.pinnedusage:918304
rocksdb.mem-table-flush-pending:0
rocksdb.estimate-pending-compaction-bytes:0
rocksdb.compaction-pending:0
rocksdb.number.iter.skip:5969504
rocksdb.compaction-filter-count:12800390
rocksdb.compaction-kv-expired-count:0

memory-3

memory-1

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

takenliu commented 11 months ago

内存占用问题可以参考: http://tendis.cn/#/Tendisplus/%E7%9F%A5%E8%AF%86%E5%BA%93/FAQ:~:text=%E6%B2%A1%E6%9C%89%E8%80%83%E8%99%91%E5%9C%A8%E5%86%85%EF%BC%89%E3%80%82-,Q%3A%20tendis%E7%9A%84%E5%86%85%E5%AD%98%E5%8D%A0%E7%94%A8%E6%98%AF%E5%A4%9A%E5%B0%91,-tendis%E8%8A%82%E7%82%B9%E5%86%85%E5%AD%98

githubname1024 commented 11 months ago

@takenliu 我也遇到了同样的问题,tendis实例的RSS内存占用一直在增长。 设置了rocks.cache_index_and_filter_blocks=1,RSS内存也一直增长。 后边对比了官网的Requirements,发现要求g++版本大于等于5.5。而我使用的默认centos7.5自带的g++ 为4.8.5。 升级机器gcc版本之后,发现内存占用维持在一定范围以下(如我的配置下为12G)。 想确认一下,这个RSS内存增长是不是和gcc版本有关? 谢谢。