| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
With ElastiCache, you can use cache parameter groups to control the runtime parameters of your cache nodes. A cache parameter group represents a combination of specific values for each parameter that is passed to Memcached during startup. These values determine how the Memcached process on each cache node will behave at runtime. The parameter values on a specific cache parameter group apply to all cache nodes that are associated with the group, regardless of which cache cluster they belong to.
For a list of supported parameters, their default values, and which ones can be modified,
see DescribeEngineDefaultParameters in the ElastiCache API Reference.
To manage parameter groups, you can use the following API actions:
CreateCacheParameterGroup—Creates a cache parameter group.
DescribeCacheParameterGroups—Returns information about cache parameter
groups associated with your AWS account.
DescribeCacheParameters—Returns information about parameters that are
part of a cache parameter group.
ModifyCacheParameterGroup—Updates the parameters in a cache parameter
group.
DeleteCacheParameter—Deletes a named cache parameter group.
ResetCacheParameterGroup—Resets individual parameters or all parameters
in a parameter group to their default values.
You can change the parameter group associated with a cache cluster at any time (using the
ModifyCacheCluster action). The changes will not be applied to the
running cache cluster until each cache node in the cache cluster is rebooted. To reboot
one or more cache nodes in a cache cluster, you can call the
RebootCacheCluster action.
For more information on working with cache parameter groups, see Working with Cache Parameter Groups.
This section provides details about the parameters that ElastiCache makes available for your cache clusters.
The following table shows the Memcached 1.4.5 parameters that Amazon ElastiCache supports.
| Name | Default | Type | Modifiable | Description |
|---|---|---|---|---|
|
backlog_queue_limit |
1024 |
integer |
No |
The backlog queue limit. |
|
binding_protocol |
auto |
string |
No |
The binding protocol. |
|
cas_disabled |
0 (false) |
Boolean |
Yes |
If |
|
chunk_size |
48 |
integer |
Yes |
The minimum amount, in bytes, of space to allocate for the smallest item's key, value, and flags, in bytes. |
|
chunk_size_growth_factor |
1.25 |
float |
Yes |
The growth factor that controls the size of each successive memcached chunk; each chunk will be chunk_size_growth_factor times larger than the previous chunk. |
|
error_on_memory_exhausted |
0 (false) |
Boolean |
Yes |
If |
|
large_memory_pages |
0 (false) |
Boolean |
Yes |
If |
|
lock_down_paged_memory |
0 (false) |
Boolean |
Yes |
If |
|
max_item_size |
1048576 |
integer |
Yes |
The size, in bytes, of the largest item that can be stored in the cache. |
|
max_simultaneous_connections |
10000 |
integer |
No |
The maximum number of simultaneous connections. |
|
maximize_core_file_limit |
0 (false) |
Boolean |
No |
>If |
|
memcached_connections_overhead |
100 |
integer |
Yes |
The amount of memory to be reserved for memcached connections and other miscellaneous overhead. For information about this parameter, see Understanding and Tuning Memcached Connection Overhead. |
|
requests_per_event |
20 |
integer |
No |
The maximum number of requests per event for a given connection. This limit is required to prevent resource starvation. |
For Memcached 1.4.14, the following additional parameters are supported.
| Name | Default | Type | Modifiable | Description |
|---|---|---|---|---|
| config_max |
16 |
integer |
No |
The maximum number of ElastiCache configuration entries. |
| config_size_max |
65536 |
integer |
No | The maximum size of the configuration entries, in bytes. |
| hashpower_init |
16 |
integer |
No | The initial size of the ElastiCache hash table, expressed in powers of two. The default is 2^16, or 65536 keys. |
| maxconns_fast |
0 (false) |
Boolean |
Yes |
Changes the way in which new connections requests are handled when the maximum connection limit is reached. If this parameter is set to 0 (zero), new connections are added to the backlog queue and will wait until other connections are closed. If the parameter is set to 1, ElastiCache sends an error to the client and immediately closes the connection. |
| slab_automove |
0 |
integer |
Yes |
Adjust the slab automove algorithm: If this parameter is set to 0 (zero), the automove algorithm is disabled. If it is set to 1, ElastiCache takes a slow, conservative approach to automatically moving slabs. If it is set to 2, ElastiCache aggressively moves slabs whenever there is a cache eviction. (This mode is not recommended except for testing purposes.) |
| slab_reassign |
0 (false) |
Boolean |
Yes |
Enable or disable slab reassignment. If this parameter is set to 1, you can use the "slabs reassign" command to manually reassign memory. |
Note
If you do not specify a cache parameter group for your cache cluster, then a default
cache parameter group (default.memcached1.4) will be used. You
cannot change the values of any parameters in the default cache parameter
group; however, you can always create a custom cache parameter group and
assign it to your cache cluster at any time.
On each cache node, the memory made available for storing cache items is the total
available memory on that cache node (which is stored in the
max_cache_memory parameter) minus the memory used for
connections and other overhead (which is stored in the
memcached_connections_overhead parameter). For example, a
cache node of type cache.m1.small has a
max_cache_memory of 1300MB . With the default
memcached_connections_overhead value of 100MB, the
Memcached process will have 1200MB available to store cache items.
The default values for the memcached_connections_overhead parameter satisfy
most use cases; however, the required amount of allocation for connection
overhead can vary depending on multiple factors, including request rate,
payload size, and the number of connections.
You can change the value of the
memcached_connections_overhead to better suit the needs of
your application. For example, increasing the value of the
memcached_connections_overhead parameter will reduce the
amount of memory available for storing cache items and provide a larger
buffer for connection overhead, while decreasing the value of the
memcached_connections_overhead parameter will give you more
memory to store cache items, but can increase your risk of swap usage and
degraded performance. If you observe swap usage and degraded performance,
try increasing the value of the memcached_connections_overhead
parameter.
Important
For the cache.t1.micro cache node type, the value for
memcached_connections_overhead is determined as
follows:
If your cache cluster is using the default cache parameter group, ElastiCache will set
the value for memcached_connections_overhead to
13MB.
If your cache cluster is using a cache parameter group that you have created
yourself, you can set the value for
memcached_connections_overhead to a value of
your choice.
Although most parameters have a single value, some parameters have different values depending on the cache node type used. These parameters are called out separately in the tables below.
The following table shows the default values for the max_cache_memory and
num_threads parameters for each cache node type.
Note
The max_cache_memory and num_threads
parameters are not modifiable.
| Cache Node Type | max_cache_memory | num_threads |
|---|---|---|
|
cache.t1.micro |
213 |
1 |
|
cache.m1.small |
1300 |
1 |
|
cache.m1.medium |
3350 |
1 |
|
cache.m1.large |
7100 |
2 |
|
cache.m1.xlarge |
14600 |
4 |
|
cache.m3.xlarge |
14600 |
4 |
|
cache.m3.2xlarge |
29600 |
8 |
|
cache.m2.xlarge |
16600 |
2 |
|
cache.m2.2xlarge |
33800 |
4 |
|
cache.m2.4xlarge |
68000 |
8 |
|
cache.c1.xlarge |
6600 |
8 |