You can define a maximum capacity for each data grid in
a collective. Configuring a maximum capacity limits the amount of
data storage that a particular data grid can use. The capacity limit
ensures that the available storage capacity for the collective is
used in a predictable manner.
Before you begin
- Create the data grids for your configuration. By default, data
grids do not have a configured maximum capacity limit. You can configure
a maximum capacity for any data grid type: simple data grids, session
data grids, or dynamic cache data grids.
About this task
After you configure maximum capacity limits on each data
grid in the collective, the capacity limit is enforced by comparing
the total size of all primary data in the data grid to the configured
capacity limit for the data grid. The capacity used by replica copies
of data is not counted when the data grid is measured against the
configured capacity limit.
The maximum capacity limit is a maximum
amount of data that can be inserted into the data grid. The limit
is not a guarantee of an allocated amount of space for the data grid.
Therefore, a data grid might not be able to reach its configured capacity
limit if the collective does not have the capacity to store the data.
Reasons for insufficient capacity in the collective might be a high
capacity limit on the data grid, or capacity that is consumed by other
data grids in the collective.
When the capacity limit for a
particular data grid is breached, the grid handles insert operations
in one of the following ways:
- By default, insert operations that would breach the grid limit
capacity are rejected. Client processes receive an exception in response
to insert requests. Read, update, and delete operations succeed even
if the data grid is exceeding its capacity limit. With these limited
operations, the data grid can run at a minimum level of function but
additional growth of the data grid is prevented.
- Available only on a simple data grid, you can override this default
behavior by selecting the Use least recently used (LRU)
eviction for this data grid option. Selecting this option
accommodates new inserts into a simple data grid and maintains the
capacity limit by removing the least recently used data entry. Setting
the maximum capacity on a data grid does not require a restart, however
if you have selected the LRU option on a simple grid, then the grid
will automatically be restarted for changes to take affect. This is
also the case if you decide to turn off the LRU option on a simple
grid.
Procedure
- In the user interface, click .
- Select Limit the amount of capacity for this
data grid.
- If you are setting the maximum capacity for a simple data
grid and want the grid to accept new insert operations (instead of
rejecting them) at the expense of least recently used data entries,
then select Use least recently used (LRU) eviction for
this data grid. Click Apply Changes to
save. You are warned that the data in the grid will be lost in order
to complete the restart.
- View the current capacity consumption to determine the
maximum capacity to define for the selected data grid. You can also
ensure that you are not exceeding the total capacity of the collective.
In
this chart, the current data grid that is being configured, MyGrid,
is currently using 900 megabytes of capacity. It has a currently
configured capacity limit of 2000 megabytes. At the collective level,
the total capacity of the collective is 4000 megabytes. In addition,
the total of all the configured limits on the capacity-limited data
grids is 3400 megabytes. Those grids are currently using 2900 megabytes.
Finally, there is at least one data grid in the collective that does
not have a capacity limit defined. These data grids without defined
capacity limits are consuming approximately 900 megabytes.
- Enter a value for the limit of primary data consumption
in MB. When you press enter, the potential maximum capacity
consumption of the primary and replica data displays. This number
varies based on the number of replicas that you have defined. However,
remember that the number of replicas is limited by the number of appliances
in the collective. If you have four replicas defined, and three appliances
in the collective, your collective contains one primary and two replicas.
- Click Apply changes to save the
configuration. You do not need to restart your data grid to activate
the new limit.
Example
Capacity limit example: Multiple data grids
Data
grids A, B, and C are defined in a collective with a total capacity
of 600 gigabytes of storage. No replicas are defined on any of the
data grids. Data grid A has a capacity limit of 100 gigabytes. Data
grid B has a capacity limit of 50 gigabytes. Data grid C has a capacity
limit of 200 gigabytes. In this scenario, at least 250 gigabytes
of unused capacity are always available in the collective. The total
size of the three data grids cannot grow beyond 350 gigabytes.
Capacity
limit example: Replicas
Data grid A is defined in a collective
of two appliances. Data grid A has one synchronous and two asynchronous
replicas, for a total of three replicas. The grid capacity limit
is defined as 100 megabytes. Initially the maximum capacity consumption
of this grid is 200 megabytes. Because the collective has only two
appliances, one primary and one replica copy of the data exist. The
primary data grid can use up to 100 megabytes. The replica grows at
the same rate as the primary data grid, resulting in a maximum total
consumed capacity of 200 megabytes. If a third appliance is added
to the collective, a second replica copy of the data is placed. The
maximum consumption of the grid becomes 300 megabytes, from the one
primary plus two replicas.
Capacity limit example: Data grids
with no capacity limit
Data grids A, B, and C are defined
in a collective with a total capacity of 600 gigabytes of storage.
Data grid A has a limit of 100 gigabytes. Data grid B has a limit
of 50 gigabytes. Data grid C has no capacity limit. No replicas
are defined for any of the three grids. Because data grid C has no
limit, the data grid could potentially consume the entire 600 gigabytes
of available capacity. As a result, data grid A and data grid B would
not be able to insert any data. Any data that data grid A or data
grid B inserted remains, but the data grids are not guaranteed to
be able reach their capacity limits. Data grid C is guaranteed to
have at least 450 gigabytes available to consume because the only
other data grids on the system cannot consume more than a total of
150 gigabytes out of the 600 gigabytes of capacity. This 450 gigabyte
calculation ignores any capacity that is consumed by the replica data.
If two or more unlimited data grids exist in the collective, the potential
capacity of any specific data grid is not guaranteed.