Skip to content

内存泄漏问题 #59

@ida1kd

Description

@ida1kd
  1. 模拟数据 插入以下结构的大约数据 1万个
    exhset us:126902 session:dea155d63828f002484fb2d67a879c81 "" EX 60
  2. 查看每个数据占用内存情况 (大约152)
    127.0.0.1:6379> memory usage us:105681
    (integer) 152
  3. 但总内存占用 100M
    127.0.0.1:6379> info memory

Memory

used_memory:105388744
used_memory_human:100.51M
问题:按道理算 10000 * 152 = 1.449M 那为什么会占用 100M内存

测试了三种模式,都是占用这么多内存,希望得到回复

Memory

used_memory:105388744
used_memory_human:100.51M
used_memory_rss:118505472
used_memory_rss_human:113.02M
used_memory_peak:105447208
used_memory_peak_human:100.56M
used_memory_peak_perc:99.94%
used_memory_overhead:1407072
used_memory_startup:929088
used_memory_dataset:103981672
used_memory_dataset_perc:99.54%
allocator_allocated:105497072
allocator_active:105697280
allocator_resident:109481984
total_system_memory:16573603840
total_system_memory_human:15.44G
used_memory_lua:31744
used_memory_vm_eval:31744
used_memory_lua_human:31.00K
used_memory_scripts_eval:0
number_of_cached_scripts:0
number_of_functions:0
number_of_libraries:0
used_memory_vm_functions:32768
used_memory_vm_total:64512
used_memory_vm_total_human:63.00K
used_memory_functions:184
used_memory_scripts:184
used_memory_scripts_human:184B
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
allocator_frag_ratio:1.00
allocator_frag_bytes:200208
allocator_rss_ratio:1.04
allocator_rss_bytes:3784704
rss_overhead_ratio:1.08
rss_overhead_bytes:9023488
mem_fragmentation_ratio:1.12
mem_fragmentation_bytes:13137400
mem_not_counted_for_evict:0
mem_replication_backlog:0
mem_total_replication_buffers:0
mem_clients_slaves:0
mem_clients_normal:1928
mem_cluster_links:0
mem_aof_buffer:0
mem_allocator:jemalloc-5.3.0
active_defrag_running:0
lazyfree_pending_objects:0
lazyfreed_objects:0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions