Redis Sizing Guidelines

Redis stores two types of data: application state and user state.

Application state typically can take up a few MB and is not a factor when making sizing considerations. Session state grows linearly with the number of concurrent users in your system. Since Redis stores session data for the duration of active sessions, if you have session duration set to 90 minutes, at any given point in time, Redis stores session for any user with activity in the last 90 minutes.

As a best practice, calculate how much Redis memory you need by figuring out the maximum number of users in any time window equivalent to a session duration, and then multiply it by 10 MB. That covers in the majority of the cases. If this proves to be insufficient, proceed with the process below in order to measure actual memory consumption

The size needed for each system can vary depending on your content and the particular page and activity users are performing. Measure your own specific load to estimate the sizing numbers. Use the measurements below to calculate what kind of Redis memory your Cherwell server farm requires, and, if necessary, increase the memory of your server.

To measure sizing numbers:

  1. For the purposes of sizing Redis, set up a farm with a single server.
  2. Load into the system 10 users, and then measure the load in Redis.
  3. Load into the system 20 users, and then measure the load in Redis.
  4. Load into the system 100 users, and then measure the load in Redis.

With the data points, compute the average Redis load per user expressed in KB. Multiply that number by the peak (or total) number of users.

Retrieving the Size of Redis Memory

When Redis is installed, you can open a client window and send Redis commands. One of those commands is INFO, which shows the current memory size occupied by the Redis database. The sample output of the command shows the peak usage of Redis. This is the number needed to calculate how much memory each user needs.