Table_used_memory metric information

Hello everyone,

I’m running a Dragonfly setup on Kubernetes with a Master/Replica configuration. I’ve noticed a significant discrepancy in the memory usage between the two instances.

Specifically, the table_used_memory metric is different on the Master and the Replica, and I’m unsure of its exact meaning.

I have checked the official documentation and other online sources, but I cannot find a clear definition for table_used_memory.

Could anyone help clarify what this metric represents ?

(I’ve also opened a documentation issue here: https://github.com/dragonflydb/documentation/issues/490)

Thank you!

While I’m not sure about the exact meaning of this specific field, but in code, it is related to snapshotting.

During the initial full sync between a primary and a replica, a snapshot is needed from the primary instance. Replicas don’t need to send snapshots to others. Thus, I’d say that a higher value of table_used_memory on the primary instance is expected.

We will update the documentation to reflect this.

Recording @borys’s answer here for visibility:

table_used_memory shows total memory usage by internal hash tables. It can be different for the primary instance and replicas, because a replica is created after the primary and has more information regarding needed metadata and hash table size.

In most cases users should ignore this metric, as it was created for developers & maintainers.

1 Like