#community-help

Understanding Cluster Metrics in Typesense

TLDR Sergio requested for more information on Cluster Metrics such as typesense_memory_mapped_bytes and typesense_memory_metadata_bytes. Jason and Kishore Nallan provided details on the intended use and meaning of these metrics.

Powered by Struct AI
8
12mo
Solved
Join the chat
Oct 05, 2022 (12 months ago)
Sergio
Photo of md5-19856b8e92142bdd0747d7a3706736c8
Sergio
04:07 PM
Do you have documented details regarding Cluster Metrics? Gathered from /metrics.json?
04:07
Sergio
04:07 PM
For example typesense_memory_mapped_bytes or typesense_memory_metadata_bytes
04:28
Sergio
04:28 PM
And also, understand which is the optimal values for such, or warning ones
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:59 PM
Those are mainly for debugging purposes, so we haven’t yet documented it
07:00
Jason
07:00 PM
You generally want to be looking at typesense_memory_active_bytes (IIRC) for the actual RAM + Swap that typesense is using, and make sure it never exceeds the total system memory
Sergio
Photo of md5-19856b8e92142bdd0747d7a3706736c8
Sergio
07:01 PM
Thought metadata_bytes where related to collection usage
07:02
Sergio
07:02 PM
And called my attention that fragmentation_ratio is not like documented in Redis. Even if apparently you use same logic.
> A fragmentation ratio less than 1.0 means that Redis requires more memory than is available on the system and so it has resorted to using swap memory resources.
https://www.dynatrace.com/news/blog/introducing-redis-server-monitoring/
Oct 06, 2022 (12 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
03:34 PM
Some of these metrics are jemalloc metrics, see stats.mapped etc. on this page: https://manpages.ubuntu.com/manpages/jammy/man3/jemalloc.3.html

Fragmentation ratio is defined as memory allocated divided by memory active. It reflects the additional memory wasted during allocations by the allocator (jemalloc).