From 7bdcf6780b36e4acb533ff716b96d6803de8cd18 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Wed, 9 Oct 2024 09:16:16 -0700 Subject: [PATCH 1/4] DEV: doc changes per RED-137284 --- content/commands/info/index.md | 21 +++++++++++++++++++++ content/commands/memory-usage/index.md | 8 ++++++++ 2 files changed, 29 insertions(+) diff --git a/content/commands/info/index.md b/content/commands/info/index.md index 7e1db1b7c2..dee5d56089 100644 --- a/content/commands/info/index.md +++ b/content/commands/info/index.md @@ -515,3 +515,24 @@ It won't be included when `INFO` or `INFO ALL` are called, and it is returned on **A note about the word slave used in this man page**: Starting with Redis 5, if not for backward compatibility, the Redis project no longer uses the word slave. Unfortunately in this command the word slave is part of the protocol, so we'll be able to remove such occurrences only when this API will be naturally deprecated. **Modules generated sections**: Starting with Redis 6, modules can inject their information into the `INFO` command. These are excluded by default even when the `all` argument is provided (it will include a list of loaded modules but not their generated info fields). To get these you must use either the `modules` argument or `everything`. + +## Redis Software and Redis Cloud compatibility + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [INFO]({{< relref "/commands/info" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | In Redis Enterprise, `INFO` returns a different set of fields than Redis Community Edition.
Not supported for [scripts]({{}}). | + +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. + +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). +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. + +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. + +**Example** + +Suppose you have ten JSON keys, and each key has 5KB of unique content and 5KB of shared content. + +For non-active-active databases, `INFO` (used_memory) would report (10 keys * 5KB) + 5KB ~= 55KB. + +For active-active databases, `INFO` (used_memory) would report 10 keys * 20KB ~= 200KB. This number includes some amount of CRDB overhead per JSON key. \ No newline at end of file diff --git a/content/commands/memory-usage/index.md b/content/commands/memory-usage/index.md index 2ca25901f0..3fe347d99e 100644 --- a/content/commands/memory-usage/index.md +++ b/content/commands/memory-usage/index.md @@ -87,3 +87,11 @@ OK > MEMORY USAGE foo3 (integer) 160 ``` + +## Redis Software and Redis Cloud compatibility + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [MEMORY USAGE]({{< relref "/commands/memory-usage" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}) in Redis versions earlier than 7. | + +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. \ No newline at end of file From 6f163ca1afae63dadfb1547c67436823b232b302 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Wed, 9 Oct 2024 10:22:42 -0700 Subject: [PATCH 2/4] Some fine tuning --- content/commands/info/index.md | 6 +++--- content/commands/memory-usage/index.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/content/commands/info/index.md b/content/commands/info/index.md index dee5d56089..ef7d6ca3ef 100644 --- a/content/commands/info/index.md +++ b/content/commands/info/index.md @@ -518,9 +518,9 @@ It won't be included when `INFO` or `INFO ALL` are called, and it is returned on ## Redis Software and Redis Cloud compatibility -| Command | Redis
Enterprise | Redis
Cloud | Notes | -|:--------|:----------------------|:-----------------|:------| -| [INFO]({{< relref "/commands/info" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | In Redis Enterprise, `INFO` returns a different set of fields than Redis Community Edition.
Not supported for [scripts]({{}}). | +| Redis
Enterprise | Redis
Cloud | Notes | +|:----------------------|:-----------------|:------| +| ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | In Redis Enterprise, `INFO` returns a different set of fields than Redis Community Edition.
Not supported for [scripts]({{}}). | 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. diff --git a/content/commands/memory-usage/index.md b/content/commands/memory-usage/index.md index 3fe347d99e..26ea12be47 100644 --- a/content/commands/memory-usage/index.md +++ b/content/commands/memory-usage/index.md @@ -90,8 +90,8 @@ OK ## Redis Software and Redis Cloud compatibility -| Command | Redis
Enterprise | Redis
Cloud | Notes | -|:--------|:----------------------|:-----------------|:------| -| [MEMORY USAGE]({{< relref "/commands/memory-usage" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}) in Redis versions earlier than 7. | +| Redis
Enterprise | Redis
Cloud | Notes | +|:----------------------|:-----------------|:------| +|✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}) in Redis versions earlier than 7. | 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. \ No newline at end of file From 2372e2248745541f44caf5445dd2b3586bf07fe3 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Wed, 9 Oct 2024 13:28:27 -0700 Subject: [PATCH 3/4] Apply review comments --- content/commands/info/index.md | 10 +++++----- content/commands/memory-usage/index.md | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/content/commands/info/index.md b/content/commands/info/index.md index ef7d6ca3ef..6cf36ad183 100644 --- a/content/commands/info/index.md +++ b/content/commands/info/index.md @@ -522,17 +522,17 @@ It won't be included when `INFO` or `INFO ALL` are called, and it is returned on |:----------------------|:-----------------|:------| | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | In Redis Enterprise, `INFO` returns a different set of fields than Redis Community Edition.
Not supported for [scripts]({{}}). | -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. +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. -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). -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. +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). +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. -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. +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. **Example** Suppose you have ten JSON keys, and each key has 5KB of unique content and 5KB of shared content. -For non-active-active databases, `INFO` (used_memory) would report (10 keys * 5KB) + 5KB ~= 55KB. +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. For active-active databases, `INFO` (used_memory) would report 10 keys * 20KB ~= 200KB. This number includes some amount of CRDB overhead per JSON key. \ No newline at end of file diff --git a/content/commands/memory-usage/index.md b/content/commands/memory-usage/index.md index 26ea12be47..44ab836534 100644 --- a/content/commands/memory-usage/index.md +++ b/content/commands/memory-usage/index.md @@ -94,4 +94,4 @@ OK |:----------------------|:-----------------|:------| |✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}) in Redis versions earlier than 7. | -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. \ No newline at end of file +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. \ No newline at end of file From 70b4277cc2dd9914bc0efa55d134ad90aa9ecd66 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Thu, 10 Oct 2024 06:35:49 -0700 Subject: [PATCH 4/4] Apply more review feedback --- content/commands/info/index.md | 2 +- content/commands/memory-usage/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/commands/info/index.md b/content/commands/info/index.md index 6cf36ad183..7f0d494ced 100644 --- a/content/commands/info/index.md +++ b/content/commands/info/index.md @@ -522,7 +522,7 @@ It won't be included when `INFO` or `INFO ALL` are called, and it is returned on |:----------------------|:-----------------|:------| | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | In Redis Enterprise, `INFO` returns a different set of fields than Redis Community Edition.
Not supported for [scripts]({{}}). | -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. +Note: key memory usage is different 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. 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). 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. diff --git a/content/commands/memory-usage/index.md b/content/commands/memory-usage/index.md index 44ab836534..6038cc87ed 100644 --- a/content/commands/memory-usage/index.md +++ b/content/commands/memory-usage/index.md @@ -94,4 +94,4 @@ OK |:----------------------|:-----------------|:------| |✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}) in Redis versions earlier than 7. | -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. \ No newline at end of file +Note: key memory usage is different 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. \ No newline at end of file