Configure a Redis instance

Memorystore for Redis supports a subset of thenative Redis configurationparameters that you can modify to customize thebehavior of your Redis instance. Other Redis configuration parameters are setto default values andcannot be modified.Configuration changes take place immediately, don't require a restart of theinstance, and are saved if the instance restarts. You can update modifiableconfiguration parameters after instance creation.

For tables showing acceptable values for modifiable parametersand default values for unmodifiable parameters, see theRedis configurationsreference page.

Viewing and updating configurations in the Google Cloud console

Note: You can only modify themaxmemory-gb configuration using thegcloud CLI. The configuration is not available in theGoogle Cloud console
  1. Go to theMemorystore for Redis page in the Google Cloud console.
    Memorystore for Redis
  2. Click the Instance ID of the instance.
  3. ClickEdit.
  4. TheConfigurations section is now visible. Click the trash bin to theright of a configuration to delete it, or clickAdd Configuration to adda new configuration.

Setting and updating configuration parameters with the Google Cloud CLI

Note: Make sure that you have installed the latest version of the Google Cloud CLIby runninggcloud components update.

You can set modifiable configuration parameters when creating or updating aninstance. To set a configuration parameter during creation, enter the followingcommand, replacing thehighlighted-variables with the appropriatevalues:

gcloud redis instances createinstance-id --size=size --region=region-id --zone=zone --redis-config maxmemory-policy=policy

To change a configuration parameter for an existing instance, enter thefollowing command:

gcloud redis instances updateinstance-id --update-redis-config maxmemory-policy=policy

Viewing current configuration parameters with the Google Cloud CLI

To view configuration parameters that you set when creating or updating an instance,enter thedescribe command for the instance:

gcloud redis instances describeinstance-id --region=region-id

You won't see configuration parameters when runningdescribe unless you have changed a configuration from its default value.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.