Skip to content

Commit 4b578e3

Browse files
authored
RS: Configure query performance factor with CM UI (#711)
* DOC-4276 RS: Configure query performance factor with CM UI * DOC-4276 RS: Edits for configure query performance factor with CM UI * DOC-4276 Remove restart proxies step from query performance factor CM UI config method
1 parent 768b874 commit 4b578e3

File tree

2 files changed

+87
-6
lines changed

2 files changed

+87
-6
lines changed

content/operate/oss_and_stack/stack-with-enterprise/search/query-performance-factor.md

Lines changed: 87 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ If you do not have a cluster that supports Redis Query Engine, [install Redis En
3434

3535
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.
3636

37-
1. Create a new Redis database with the number of CPUs configured for the Query performance factor.
37+
1. Create a new Redis database with the number of CPUs configured for the query performance factor.
3838

39-
## Calculate performance factor
39+
## Calculate query performance factor
4040

4141
### CPUs for query performance factor
4242

@@ -73,11 +73,92 @@ The following table shows the number of CPUs required for each performance facto
7373
| Scale factor | 4x |
7474
| Minimum CPUs required for scale factor | 6 |
7575

76-
## Configure query performance factor
76+
## Configure query performance factor manually
7777

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+
To manually configure the query performance factor in Redis Enterprise Software:
7979

80-
### Create new database
80+
1. [Configure query performance factor parameters](#config-db-ui) when you create a new database or edit an existing database's configuration in the Cluster Manager UI.
81+
82+
1. If you configure the query performance factor for an existing database, you also need to [restart shards](#restart-shards). Newly created databases can skip this step.
83+
84+
### Configure query performance factor parameters in the Cluster Manager UI {#config-db-ui}
85+
86+
You can use the Cluster Manager UI to configure the query performance factor when you [create a new database]({{<relref "/operate/rs/databases/create">}}) or [edit an existing database]({{<relref "/operate/rs/databases/configure#edit-database-settings">}}) with search enabled.
87+
88+
1. In the **Capabilities** section of the database configuration screen, click **Parameters**.
89+
90+
1. If you are creating a new database, select **Search and query**.
91+
92+
1. Adjust the **RediSearch** parameters to include:
93+
94+
`MT_MODE MT_MODE_FULL WORKER_THREADS <NUMBER_OF_THREADS>`
95+
96+
See [Calculate query performance factor](#calculate-query-performance-factor) to determine the minimum CPUs required to use for `<NUMBER_OF_THREADS>`.
97+
98+
1. Expand the **Query Performance Factor** section and enter the following values:
99+
100+
- `mnp` for **Connections routing**
101+
102+
- `32` for **Connections limit**
103+
104+
{{<image filename="images/rs/screenshots/databases/rs-config-query-performance-factor.png" alt="Configure search parameters and query performance factor.">}}
105+
106+
1. Click **Done** to close the parameter editor.
107+
108+
1. Click **Create** or **Save**.
109+
110+
### Restart shards {#restart-shards}
111+
112+
After you update the query performance factor for an existing database, restart all shards to apply the new settings. You can migrate shards to restart them. Newly created databases can skip this step.
113+
114+
1. Use [`rladmin status shards db <db-name>`]({{<relref "/operate/rs/references/cli-utilities/rladmin/status#status-shards">}}) to list all shards for your database:
115+
116+
```sh
117+
rladmin status shards db db-name
118+
```
119+
120+
Example output:
121+
122+
```sh
123+
SHARDS:
124+
DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS
125+
db:2 db-name redis:1 node:1 master 0-16383 1.95MB OK
126+
db:2 db-name redis:2 node:2 slave 0-16383 1.95MB OK
127+
```
128+
129+
Note the following fields for the next steps:
130+
- `ID`: the Redis shard's ID.
131+
- `NODE`: the node on which the shard currently resides.
132+
- `ROLE`: `master` is a primary shard; `slave` is a replica shard.
133+
134+
1. For each replica shard, use [`rladmin migrate shard`]({{<relref "/operate/rs/references/cli-utilities/rladmin/migrate">}}) to move it to a different node and restart it:
135+
136+
```sh
137+
rladmin migrate shard <shard_id> target_node <node_id>
138+
```
139+
140+
1. After you migrate the replica shards, migrate the original primary shards.
141+
142+
1. Rerun `rladmin status shards db <db-name>` to verify the shards migrated to different nodes:
143+
144+
```sh
145+
rladmin status shards db db-name
146+
```
147+
148+
Example output:
149+
150+
```sh
151+
SHARDS:
152+
DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS
153+
db:2 db-name redis:1 node:2 master 0-16383 1.95MB OK
154+
db:2 db-name redis:2 node:1 slave 0-16383 1.95MB OK
155+
```
156+
157+
## Configure query performance factor with the REST API
158+
159+
You can configure the query performance factor when you [create a new database](#create-db-rest-api) or [update an existing database](#update-db-rest-api) using the Redis Enterprise Software [REST API]({{<relref "/operate/rs/references/rest-api">}}).
160+
161+
### Create new database with the REST API {#create-db-rest-api}
81162
82163
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:
83164
@@ -126,7 +207,7 @@ The following [cURL](https://curl.se/docs/) request creates a new database from
126207
curl -k -u "<user>:<password>" https://<host>:9443/v1/bdbs -H "Content-Type:application/json" -d @scalable-search-db.json
127208
```
128209
129-
### Update existing database
210+
### Update existing database with the REST API {#update-db-rest-api}
130211
131212
To configure the query performance factor for an existing database, use the following REST API requests:
132213
112 KB
Loading

0 commit comments

Comments
 (0)