Hitachi

In-Memory Data Grid Hitachi Elastic Application Data Store


4.1.3 Estimating the explicit heap size

The following shows the formula for estimating the explicit heap size.

The explicit heap size is the size of the area for storing the value part of key-value pairs plus the size of the area for storing the history of update operations. In addition, three percent of the explicit heap is used as a management area.

Specify the obtained value in the eads.java.external.heapsize parameter in the shared properties.

Explicit heap size (megabytes) =

(a [Figure] 1,0242 + b [Figure] 1,0242#) [Figure] 0.97

Explanation of the variables

a: Size of the area for storing the value part

b: Size of the area for storing the history of update operations

#

If you will be using the total data restriction function, round up the value of a [Figure] 1,0242 to the next multiple of the number of redundant copies of data plus the original (megabytes).

The formula for estimating the size of each area is shown below.

Organization of this subsection

(1) Size of the area for storing the value part

The following shows the formula for estimating the size of the area for storing the value part of key-value pairs. If values are not stored in the explicit heap (a disk cache only is used), specify 0.

Size of the area for storing the value part (bytes) =

(size of the value per item that is stored in a memory cache or a two-way cache#1 (bytes)

+ 2 (bytes))#2

[Figure] (sum of the number of data items to be stored per range in memory caches or the number of data items to be stored per range in two-way caches [Figure] data multiplicity

+ sum of the number of memory caches and the number of two-way caches

[Figure] data multiplicity + 500)

#1

For details about the value size, see 15.2.2(3) Data types that can be specified as values.

#2

Round up the value in the parentheses to a multiple of 16 bytes.

Data multiplicity:

eads.replication.factor parameter value in the shared properties

(2) Size of the area for storing the history of update operations

The formula for estimating the size of the area for storing the history of update operations is shown below.

Round up the obtained value up to the closest megabyte, and then specify the value for the eads.replication.external.heapsize parameter in the shared properties.

Size of the area for storing the history of update operations (bytes) =

{ (data multiplicity [Figure] 2 - 1) [Figure] numbers of caches [Figure] maximum value for the history of update operations + 500 }

[Figure] (maximum size of the history of update operations (bytes) + 1,024) + 1,048,576

Note:

Round up the decimal places to the closest whole number.

Data multiplicity:

eads.replication.factor parameter value in the shared properties

Maximum value for the history of update operations:

The following shows the formula for estimating the maximum value for the history of update operations.

Maximum value for the history of update operations =

maximum number of items that can be retained in the history of update operations + maximum number of consensus processes that can be executed simultaneously

Maximum number of items that can be retained in the history of update operations:

The following shows the formula for estimating the maximum number of items that can be retained in the history of update operations:

Maximum number of items that can be retained in the history of update operations =

(heartbeat timeout value [Figure] 1,000)

[Figure] throughput of data update operations on one EADS server (in operations/second)#

Heartbeat timeout value:

eads.failureDetector.heartbeat.timeout parameter value in the server properties

#

If the throughput varies greatly from one cache to another, determine the throughput for each cache and then specify the largest such value.

Maximum number of consensus processes that can be executed simultaneously:

eads.replication.preparations parameter value in the shared properties

Maximum size of the history of update operations (bytes):

The following shows the formula for estimating the maximum size of the history of update operations.

Maximum size of the history of update operations (bytes) =

maximum key size that can be stored in the cluster + maximum value size [Figure] MAX(2, maximum number of data items that can be updated simultaneously)

Maximum key size that can be stored in the cluster:

eads.cache.key.maxsize parameter value in the shared properties

Maximum value size:

Maximum size that can be specified when put, create, update, or replace processing is performed.

MAX:

Choose the largest value in the parentheses that follow MAX.

Example: For MAX(2, 10), the calculation result is 10.

Maximum number of data items that can be updated simultaneously:

If you will be performing batch data operations using a memory cache, specify 10. Otherwise, specify 1.

Important note
  • If the size estimated for the explicit heap is not accurate enough and there is not enough space in the explicit heap, values and the history of update operations might be fragmented, resulting in poor performance. If the total data restriction function is not used and the explicit heap runs out of space for storing values, EADS servers will be isolated.

  • If the explicit heap runs out of space for storing the history of update operations, the EADS servers attempt to obtain more explicit heap by deleting existing update operations history information. As a result, complementary processing of the history of update operations between EADS servers might fail. For details about complementary processing of the history of update operations, see 9.3.2(7) Complementary processing of the history of update operations.