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
Redis Query Engine is a capability intended to increase the performance of queries, including [vector search]({{<relref "/develop/interact/search-and-query/query/vector-search">}}). When enabled, it allows you to increase a database's compute capacity and throughput by allocating more virtual CPUs per shard in addition to horizontal scaling with more shards. This document describes how to configure the Redis Query Engine.
15
+
Query performance factors are intended to increase the performance of queries, including [vector search]({{<relref "/develop/interact/search-and-query/query/vector-search">}}). When enabled, it allows you to increase a database's compute capacity and throughput by allocating more virtual CPUs per shard in addition to horizontal scaling with more shards. This document describes how to configure the query performance factor.
15
16
16
17
{{<note>}}
17
18
Some use cases might not scale effectively. Redis experts can help determine if vertical scaling with the Redis Query Engine will boost performance for your use case and guide you on whether to use vertical scaling, horizontal scaling, or both.
@@ -31,13 +32,13 @@ If you do not have a cluster that supports Redis Query Engine, [install Redis En
31
32
32
33
1. Calculate the RAM requirements using the [Index Size Calculator](https://redis.io/redisearch-sizing-calculator/). The total RAM required is the sum of the dataset and index sizes.
33
34
34
-
1.[Determine the scaling factor](#calculate-scaling-factor) you want and the required number of CPUs. Unused CPUs, above the 20% necessary for Redis, can be used for the scalable Redis Query Engine.
35
+
1.[Determine the query performance factor](#calculate-performance-factor) you want and the required number of CPUs. Unused CPUs, above the 20% necessary for Redis, can be used for the scalable Redis Query Engine.
35
36
36
-
1. Create a new Redis database with the number of CPUs configured for the scalable Redis Query Engine.
37
+
1. Create a new Redis database with the number of CPUs configured for the Query performance factor.
37
38
38
-
## Calculate scaling factor
39
+
## Calculate performance factor
39
40
40
-
### CPUs for Redis Query Engine
41
+
### CPUs for query performance factor
41
42
42
43
Vertical scaling of the Redis Query Engine is achieved by provisioning additional CPUs for the search module. At least 20% of the available CPUs must be reserved for Redis internal processing. Use the following formula to define the maximum number of CPUs that can be allocated to search.
43
44
@@ -47,9 +48,9 @@ Vertical scaling of the Redis Query Engine is achieved by provisioning additiona
47
48
| Redis internals | 20% |
48
49
| Available CPUs for Redis Query Engine | floor(0.8 * x) |
49
50
50
-
### Scale factor versus CPUs
51
+
### Query performance factor versus CPUs
51
52
52
-
The following table shows the number of CPUs required for each scale factor. This calculation is sensitive to how the search index and queries are defined. Certain scenarios might yield less throughput than the ratios in the following table.
53
+
The following table shows the number of CPUs required for each performance factor. This calculation is sensitive to how the search index and queries are defined. Certain scenarios might yield less throughput than the ratios in the following table.
@@ -63,7 +64,7 @@ The following table shows the number of CPUs required for each scale factor. Thi
63
64
| 14 | 21 |
64
65
| 16 | 24 |
65
66
66
-
### Example scale factor calculation
67
+
### Example performance factor calculation
67
68
68
69
| Variable | Value |
69
70
|----------|-------|
@@ -72,13 +73,13 @@ The following table shows the number of CPUs required for each scale factor. Thi
72
73
| Scale factor | 4x |
73
74
| Minimum CPUs required for scale factor | 6 |
74
75
75
-
## Enable scalable Redis Query Engine
76
+
## Configure query performance factor
76
77
77
-
To enable the scalable Redis Query Engine in Redis Enterprise, use the [REST API]({{<relref "/operate/rs/references/rest-api">}}) to create a new database or update an existing database.
78
+
To configure the query performance factor in Redis Enterprise, use the [REST API]({{<relref "/operate/rs/references/rest-api">}}) to create a new database or update an existing database.
78
79
79
80
### Create new database
80
81
81
-
To create a database with the scalable Redis Query Engine enabled, use the [create database REST API endpoint]({{<relref "/operate/rs/references/rest-api/requests/bdbs#post-bdbs-v1">}}) with a [BDB object]({{<relref "/operate/rs/references/rest-api/objects/bdb">}}) that includes the following parameters:
82
+
To create a database and configure the query performance factor, use the [create database REST API endpoint]({{<relref "/operate/rs/references/rest-api/requests/bdbs#post-bdbs-v1">}}) with a [BDB object]({{<relref "/operate/rs/references/rest-api/objects/bdb">}}) that includes the following parameters:
82
83
83
84
```json
84
85
{
@@ -91,11 +92,11 @@ To create a database with the scalable Redis Query Engine enabled, use the [crea
91
92
}
92
93
```
93
94
94
-
See [Calculate scaling factor](#calculate-scaling-factor) to determine the value to use for `<NUMBER_OF_CPUS>`.
95
+
See [Calculate performance factor](#calculate-performance-factor) to determine the value to use for `<NUMBER_OF_CPUS>`.
95
96
96
97
#### Example REST API request for a new database
97
98
98
-
The following JSON is an example request body used to create a new database with the scalable Redis Query Engine enabled:
99
+
The following JSON is an example request body used to create a new database with a 4x query performance factor configured:
To enable the scalable Redis Query Engine for an existing database, use the following REST API requests:
131
+
To configure the query performance factor for an existing database, use the following REST API requests:
131
132
132
133
-[Update database configuration]({{<relref "/operate/rs/references/rest-api/requests/bdbs#put-bdbs">}}) to modify the DMC proxy.
133
134
134
-
-[Upgrade module]({{<relref "/operate/rs/references/rest-api/requests/bdbs/modules/upgrade#post-bdb-modules-upgrade">}}) to set the search module’s scaling factor.
135
+
-[Upgrade module]({{<relref "/operate/rs/references/rest-api/requests/bdbs/modules/upgrade#post-bdb-modules-upgrade">}}) to set the search module’s query performance factor.
135
136
136
137
{{<note>}}
137
138
- Because this procedure also restarts the database shards, you should perform it during a maintenance period.
138
139
- This procedure overwrites any existing module configuration parameters.
139
140
{{</note>}}
140
141
141
-
The following example script uses both endpoints to configure a 4x scale factor:
142
+
The following example script uses both endpoints to configure a 4x query performance factor:
To monitor a database with the scalable Redis Query Engine enabled:
171
+
To monitor a database with a query performance factor configured:
171
172
172
173
1. Integrate your Redis Enterprise deployment with Prometheus. See [Prometheus and Grafana with Redis Enterprise]({{<relref "/integrate/prometheus-with-redis-enterprise">}}) for instructions.
173
174
174
175
1. Monitor the `redis_process_cpu_usage_percent` shard metric.
175
176
176
177
The following Prometheus UI screenshot shows `redis_process_cpu_usage_percent` spikes for a database with two shards:
177
178
178
-
- 1st 100% spike: [`memtier_benchmark`](https://github.com/RedisLabs/memtier_benchmark) search test at the default scale factor (1 CPU per shard for search).
179
+
- 1st 100% spike: [`memtier_benchmark`](https://github.com/RedisLabs/memtier_benchmark) search test at the default (no additional CPUs for search).
179
180
180
-
- 2nd 100% spike: reconfiguration and shard restart for a 4x scale factor.
181
+
- 2nd 100% spike: reconfiguration and shard restart for a 4x query performance factor.
181
182
182
-
- 3rd 600% spike: `memtier_benchmark` search test with threading at a 4x scale factor (6 CPUs per shard).
183
+
- 3rd 600% spike: `memtier_benchmark` search test with threading at a 4x query performance factor (6 CPUs per shard).
183
184
184
185
{{<imagefilename="images/rs/screenshots/monitor-rs-scalable-search-cpu-usage.png"alt="The Prometheus graph shows three spikes for redis_process_cpu_usage_percent: 100%, another 100%, then 600%.">}}
0 commit comments