Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codis-server进程内存占用过高问题 #1702

Open
a13707331174 opened this issue Mar 17, 2020 · 3 comments
Open

codis-server进程内存占用过高问题 #1702

a13707331174 opened this issue Mar 17, 2020 · 3 comments

Comments

@a13707331174
Copy link

@a13707331174 a13707331174 commented Mar 17, 2020

我们的数据大小只有2g多一些(使用info memory查看),
但是codis-server进程却占了机器内存的30%,(32g机器),这会是什么问题呢?
下面是节点的info命令结果:

#Server
redis_version:3.2.12
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:7dc471ebfda27598
redis_mode:standalone
os:Linux 3.10.0-693.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.8.5
process_id:12363
run_id:3422d9ceaa98202344c117122fc1422da0d60f7d
tcp_port:6379
uptime_in_seconds:15409432
uptime_in_days:178
hz:10
lru_clock:7367223
executable:/app/tools/codis/codis-server
config_file:/app/tools/codis/authConf/6379.conf

# Clients
connected_clients:144
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:2251326656
used_memory_human:2.10G
used_memory_rss:10814910464
used_memory_rss_human:10.07G
used_memory_peak:8594099424
used_memory_peak_human:8.00G
total_system_memory:33547333632
total_system_memory_human:31.24G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:8589934592
maxmemory_human:8.00G
maxmemory_policy:volatile-ttl
mem_fragmentation_ratio:4.80
mem_allocator:jemalloc-4.0.3

# Persistence
loading:0
rdb_changes_since_last_save:20737757
rdb_bgsave_in_progress:0
rdb_last_save_time:1583493831
rdb_last_bgsave_status:err
rdb_last_bgsave_time_sec:36
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok

# Stats
total_connections_received:79217857
total_commands_processed:1301898717
instantaneous_ops_per_sec:372
total_net_input_bytes:101606593682
total_net_output_bytes:187680449370
instantaneous_input_kbps:19.41
instantaneous_output_kbps:27.37
rejected_connections:0
sync_full:7
sync_partial_ok:0
sync_partial_err:2
expired_keys:24681624
evicted_keys:1403355
keyspace_hits:103551363
keyspace_misses:16627377
pubsub_channels:1
pubsub_patterns:0
latest_fork_usec:120
migrate_cached_sockets:0

# Replication
role:master
connected_slaves:1
slave0:ip=192.168.181.143,port=6380,state=online,offset=68621516199,lag=1
master_repl_offset:68621519950
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:68620471375
repl_backlog_histlen:1048576

# CPU
used_cpu_sys:48071.54
used_cpu_user:28025.32
used_cpu_sys_children:141591.36
used_cpu_user_children:2457320.50

# Cluster
cluster_enabled:0

# Keyspace
db0:keys=3572150,expires=2429150,avg_ttl=157812492

@snailshen2014
Copy link

@snailshen2014 snailshen2014 commented Mar 25, 2020

应该和主机相关,是云主机吗?

@a13707331174
Copy link
Author

@a13707331174 a13707331174 commented Mar 27, 2020

是的,是私有云的虚机

@caiyiyong
Copy link

@caiyiyong caiyiyong commented Mar 27, 2020

内存碎片引起的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.