Memorystore for Memcached supports a subset of [native Memcached configuration parameters](https://manpages.debian.org/unstable/memcached/memcached.1.en.html)
that you can modify. You should use the same configurations for all nodes in
your cluster. This page describes how to:

- View instance configurations.
- Modify instance configurations by:
  - Staging instance configuration changes.
  - Updating node configuration changes.

Memorystore for Memcached requires you to update the configurations first, and then
apply the changes to the nodes in your cluster. Applying a parameter update to
a node causes a full cache flush on that node.

The advantage to being able to apply parameter updates to individual nodes is
that you can roll out changes on a node-by-node basis. Doing so keeps your
instance online and functional while you update configurations.

For a full list of the modifiable and unmodifiable parameters, see [Memcached configuration parameters](https://docs.cloud.google.com/memorystore/docs/memcached/memcached-configs).

## Viewing configurations

### Console

1. Go to the **Memorystore for Memcached** page in the Google Cloud console.   
   [Memorystore for Memcached](https://console.cloud.google.com/memorystore/memcached/instances)
2. Click the ID of the instance to view the **Instance details** page.
3. View your settings in the **Configuration** section.

### Gcloud

To view configuration parameters using the Google Cloud CLI, enter
the `describe` command for the instance replacing <var translate="no">variables</var>
with appropriate values:

```
gcloud memcache instances describe instance-id --region=region
```

> [!NOTE]
> **Note:** You won't see configuration parameters when running `describe` unless you have changed a configuration from its default value.

For a list of modifiable configuration parameters and their default values,
see [Memcached configuration parameters.](https://docs.cloud.google.com/memorystore/docs/memcached/memcached-configs)

## Modifying configuration parameters

### Console

1. Go to the **Memorystore for Memcached** page in the Google Cloud console.   
   [Memorystore for Memcached](https://console.cloud.google.com/memorystore/memcached/instances)
2. Click the ID of the instance.
3. Click **Edit Configuration**.
4. Adjust the value of any parameter that you want to change.
5. Click the **Continue** button to stage the configuration updates.
6. Select a node, and click **Update Selected Nodes** one at a time for
   each node, or in batches of nodes.

   > [!NOTE]
   > **Note:** Updating node configurations one at a time, or in batches, helps you avoid instance unavailability and reduces data loss.

### Gcloud

1. Update the configuration parameters by running the following command:

   ```
   gcloud memcache instances update instance-id --region=region --parameters=parameter=value,parameter=value
   ```
2. List and take note of all node IDs for your instance by running the
   following command:

   ```
   gcloud memcache instances describe instance-id --region=region --format="value(memcacheNodes.nodeId.list())"
   ```
3. Apply the parameters one by one, or in batches, to nodes in your cluster
   by running the following command:

   > [!NOTE]
   > **Note:** Updating node configurations one at a time, or in batches, helps you avoid instance unavailability and reduces data loss.

   ```
   gcloud memcache instances apply-parameters instance-id --region=region --node-ids=node-1-id,node-2-id
   ```

   Alternatively, you can apply the parameters for all nodes at once by
   using the following command, but we don't recommend it:

   ```
   gcloud memcache instances apply-parameters instance-id --region=region --apply-all
   ```

You cannot simultaneously run the`--parameters` flag with any other flags
when using the Memorystore for Memcached `update` command.

## Configuring parameters using gcloud during instance creation

To set configuration parameters during creation, enter the following command
replacing variables with appropriate values:

```
gcloud memcache instances create instance-name --size=size --region=region --parameters=parameter=value,parameter=value
```

You can simultaneously run the `--parameters` flag with all other flags when
using the Memorystore for Memcached `create` command.

## Clearing configuration parameters to default values using the Google Cloud console

1. Go to the **Memorystore for Memcached** page in the Google Cloud console.   
   [Memorystore for Memcached](https://console.cloud.google.com/memorystore/memcached/instances)
2. Click the ID of the instance.
3. Click **Edit Configuration**.
4. Delete the value of any parameter that you want to reset to default, and leave the field blank.
5. Click the **Continue** button to stage the configuration updates.
6. Select a node, and click **Update Selected Nodes** one at a time for each
   node, or in batches of nodes.

   > [!NOTE]
   > **Note:** Updating node configurations one at a time, or in batches, helps you avoid instance unavailability and reduces data loss.

## What's next

- Review the available [Memcached configurations](https://docs.cloud.google.com/memorystore/docs/memcached/memcached-configs).
- Learn how to [scale your Memcached instances](https://docs.cloud.google.com/memorystore/docs/memcached/scaling-instances).