Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ If you do not have a cluster that supports Redis Query Engine, [install Redis En

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.

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

## Calculate performance factor
## Calculate query performance factor

### CPUs for query performance factor

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

## Configure query performance factor
## Configure query performance factor manually

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

### Create new database
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.

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.

### Configure query performance factor parameters in the Cluster Manager UI {#config-db-ui}

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.

1. In the **Capabilities** section of the database configuration screen, click **Parameters**.

1. If you are creating a new database, select **Search and query**.

1. Adjust the **RediSearch** parameters to include:

`MT_MODE MT_MODE_FULL WORKER_THREADS <NUMBER_OF_THREADS>`

See [Calculate query performance factor](#calculate-query-performance-factor) to determine the minimum CPUs required to use for `<NUMBER_OF_THREADS>`.

1. Expand the **Query Performance Factor** section and enter the following values:

- `mnp` for **Connections routing**

- `32` for **Connections limit**

{{<image filename="images/rs/screenshots/databases/rs-config-query-performance-factor.png" alt="Configure search parameters and query performance factor.">}}

1. Click **Done** to close the parameter editor.

1. Click **Create** or **Save**.

### Restart shards {#restart-shards}

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.

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:

```sh
rladmin status shards db db-name
```

Example output:

```sh
SHARDS:
DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS
db:2 db-name redis:1 node:1 master 0-16383 1.95MB OK
db:2 db-name redis:2 node:2 slave 0-16383 1.95MB OK
```

Note the following fields for the next steps:
- `ID`: the Redis shard's ID.
- `NODE`: the node on which the shard currently resides.
- `ROLE`: `master` is a primary shard; `slave` is a replica shard.

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:

```sh
rladmin migrate shard <shard_id> target_node <node_id>
```

1. After you migrate the replica shards, migrate the original primary shards.

1. Rerun `rladmin status shards db <db-name>` to verify the shards migrated to different nodes:

```sh
rladmin status shards db db-name
```

Example output:

```sh
SHARDS:
DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS
db:2 db-name redis:1 node:2 master 0-16383 1.95MB OK
db:2 db-name redis:2 node:1 slave 0-16383 1.95MB OK
```

## Configure query performance factor with the REST API

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">}}).

### Create new database with the REST API {#create-db-rest-api}

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:

Expand Down Expand Up @@ -126,7 +207,7 @@ The following [cURL](https://curl.se/docs/) request creates a new database from
curl -k -u "<user>:<password>" https://<host>:9443/v1/bdbs -H "Content-Type:application/json" -d @scalable-search-db.json
```

### Update existing database
### Update existing database with the REST API {#update-db-rest-api}

To configure the query performance factor for an existing database, use the following REST API requests:

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading