You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| <spantitle="Supported">✅ Standard</span><br /><spantitle="Supported"><nobr>✅ Active-Active</nobr></span> | <spantitle="Supported">✅ Standard</span><br /><spantitle="Supported"><nobr>✅ Active-Active</nobr></span> | In Redis Enterprise, `INFO` returns a different set of fields than Redis Community Edition.<br />Not supported for [scripts]({{<relref "/develop/interact/programmability">}}). |
524
524
525
-
Note: memory usage for JSON keys will be reported differently on Redis Software or Redis Cloud active-active databases than on non-active-active databases.
525
+
Note: key memory usage will be reported differently on Redis Software or Redis Cloud active-active databases than on non-active-active databases. This is because memory usage includes some amount of CRDB overhead.
526
526
527
-
RedisJSON implements a “shard string” mechanism to save memory when the same JSON field names are used more than once (inter-key or intra-key).
528
-
In such cases, instead of storing the field name many times, Redis stores it only once. This mechanism is not in place for active-active databases.
527
+
Additionally, for JSON keys, Redis implements a “shared string” mechanism to save memory when the same JSON field names or field values of type string are used more than once (either inter-key or intra-key).
528
+
In such cases, instead of storing the field names or values many times, Redis stores them only once. This mechanism is not in place for active-active databases.
529
529
530
-
On non-active-active databases, `INFO` (Memory > used_memory) reports that the shared memory is counted, but only once for all keys. On active-active databases, the shared memory is counted for all keys.
530
+
On non-active-active databases, `INFO` (Memory > used_memory) reports that the shared memory is counted, but only once for all keys. On active-active databases, there is no shared memory, so if strings are repeated, they are stored multiple times.
531
531
532
532
**Example**
533
533
534
534
Suppose you have ten JSON keys, and each key has 5KB of unique content and 5KB of shared content.
535
535
536
-
For non-active-active databases, `INFO` (used_memory) would report (10 keys * 5KB) + 5KB ~= 55KB.
536
+
For non-active-active databases, `INFO` (used_memory) would report (10 keys * 5KB) + 5KB ~= 55KB. The last term, "+ 5KB", is the size of the shared content.
537
537
538
538
For active-active databases, `INFO` (used_memory) would report 10 keys * 20KB ~= 200KB. This number includes some amount of CRDB overhead per JSON key.
|<spantitle="Supported">✅ Standard</span><br /><spantitle="Supported"><nobr>✅ Active-Active</nobr></span> | <spantitle="Supported">✅ Standard</span><br /><spantitle="Supported"><nobr>✅ Active-Active</nobr></span> | Not supported for [scripts]({{<relref "/develop/interact/programmability">}}) in Redis versions earlier than 7. |
96
96
97
-
Note: memory usage for JSON keys will be reported differently on Redis Software or Redis Cloud active-active databases than on non-active-active databases. This is because memory usage includes some amount of CRDB overhead.
97
+
Note: key memory usage will be reported differently on Redis Software or Redis Cloud active-active databases than on non-active-active databases. This is because memory usage includes some amount of CRDB overhead.
0 commit comments