-
Notifications
You must be signed in to change notification settings - Fork 677
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
[BUG] Incorrectly reported used_memory_dataset and used_memory_dataset_perc #1373
Comments
My guess is that this is due to the non-atomic nature of memory sampling. Specifically here: We see there where lazyfreed_objects, so these where freed in the context of bio_lazy free thread (not main thread). This is also the reason for the value you get
I would expect this to be transient issue, can you confirm? Regarding a fix - we can possibly have internal retry if result is clearly not correct |
When you say transient, do you mean you would expect this to resolve itself? It is also showing similar odd number in bytes per key.
|
Yes, I expect repeated call to show correct numbers. Is it? |
Confirmed, eventually it came down.
|
The transient sate i was referring to should be resolved immediately, was that the case? on next invocation usually. It's a valid ask, though, to propose\request a feature that would handle (retry?) in case of temporal unexpected state |
@zvi-code Shouldn't we try and fix it rather than letting it underflow ? |
Describe the bug
Incorrect numbers reported from INFO for used_memory_dataset and used_memory_dataset_perc for the replica only.
Two instances valkey_version:8.0.0
Primary port 8001
Replica port 8010
valkey-cli -p 8010 info memory
Memory
used_memory:12191720
used_memory_human:11.63M
used_memory_rss:16850944
used_memory_rss_human:16.07M
used_memory_peak:39387208
used_memory_peak_human:37.56M
used_memory_peak_perc:30.95%
used_memory_overhead:12268439
used_memory_startup:1009256
used_memory_dataset:18446744073709474897
used_memory_dataset_perc:164961355563008.00%
allocator_allocated:12369896
allocator_active:12759040
allocator_resident:17674240
allocator_muzzy:0
total_system_memory:24964886528
total_system_memory_human:23.25G
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:33792
used_memory_vm_total:65536
used_memory_vm_total_human:64.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.03
allocator_frag_bytes:389144
allocator_rss_ratio:1.39
allocator_rss_bytes:4915200
rss_overhead_ratio:0.95
rss_overhead_bytes:-823296
mem_fragmentation_ratio:1.38
mem_fragmentation_bytes:4677128
mem_not_counted_for_evict:12280
mem_replication_backlog:10539200
mem_total_replication_buffers:10539056
mem_clients_slaves:0
mem_clients_normal:719439
mem_cluster_links:0
mem_aof_buffer:8
mem_allocator:jemalloc-5.3.0
mem_overhead_db_hashtable_rehashing:0
active_defrag_running:0
lazyfree_pending_objects:0
lazyfreed_objects:1375772
To reproduce
Unknown
Expected behavior
Correct values reported
Additional information
Any additional information that is relevant to the problem.
The text was updated successfully, but these errors were encountered: