Hitachi

In-Memory Data Grid Hitachi Elastic Application Data Store


4.1.2 Estimating the Java heap size

The following subsections show the formulas for estimating the Java heap size.

Organization of this subsection

(1) Estimating the Java heap size per EADS server

The tenured area size per one EADS server times three equals the Java heap size.

Specify the obtained value in the eads.java.heapsize parameter in the shared properties. The default is 3 gigabytes.

Reference note

When you create a cache on disk, add to the Java heap size the memory size used by that cache per EADS server. For details about estimating the size, see 4.1.2(2) Estimating the Java heap size used by a cache on disk.

Java heap size (megabytes) =

{ (maximum key size that can be stored in the cluster (bytes) + 850 bytes)

[Figure] number of data items stored per EADS server

+ (maximum key size that can be stored in the cluster (bytes) + 250 bytes)

[Figure] number of group names#

+ maximum number of simultaneous connections to EADS server

[Figure] (14 + data transmit and receive buffer size (bytes) [Figure] 3)

+ number of EADS servers [Figure] 409,600 bytes

+ Java heap area used for managing the history of update operations (bytes)

+ Java heap area used for isolation, restoration, and scale-out processing (bytes) }

[Figure] 3 [Figure] 1,0242

#

If the groups are arranged hierarchically, the number of group names of the first group is used.

Maximum key size that can be stored in the cluster (bytes):

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

Number of data items stored per EADS server

The following shows the formula for estimating the number of data items stored per EADS server:

Number of data items stored per EADS server =

number of data items per range [Figure] data multiplicity

Number of data items per range:

The formulas for estimating the number of data items per range are shown below.

If you will be using the total data restriction function, specify the estimated value in the eads.cache.keyCount shared property parameter.

Number of data items per range =

(number of data items stored per range in a memory cache

+ number of data items stored per range in a two-way cache

+ number of data items stored per range in a disk cache)

Number of data items stored per range in a memory cache:

The following shows the formula for estimating the number of data items stored per range in a memory cache:

Number of data items stored per range in a memory cache =

number of data items stored in cluster's memory cache

[Figure] number of EADS servers in the cluster

+ number of data items to be added to the memory cache for the total data restriction function

Number of data items to be added to the memory cache for the total data restriction function:

The formula for estimating the number of data items to be added to the memory cache for the total data restriction function is shown below.

If you will not be using the total data restriction function, specify 0.

If you will be using only a memory cache, add this value. If you will be using a two-way cache or a disk cache, specify 0.

Number of data items to be added to the memory cache for the total data restriction function =

maximum number of simultaneous connections to EADS server [Figure] maximum number of data items that can be updated simultaneously

Maximum number of simultaneous connections to EADS server:

eads.server.maxConnections parameter value in the server properties

Maximum number of data items that can be updated simultaneously:

If you will be performing batch data operations, specify 10. Otherwise, specify 1.

Number of data items stored per range in a two-way cache:

The following shows the formula for estimating the number of data items stored per range in a two-way cache:

Number of data items stored per range in a two-way cache =

number of data items to be stored in the cluster's two-way cache

[Figure] number of EADS servers in the cluster

+ number of two-way cache data items to be added for the total data restriction function

Number of two-way cache data items to be added for the total data restriction function:

The formula for estimating the number of two-way cache data items to be added for the total data restriction function is shown below.

If you will not be using the total data restriction function, specify 0.

Add this value if you will be using only two-way caches or if you will be using memory caches, disk caches, and two-way caches together. If you will be using only memory caches or only disk caches, specify 0.

Number of two-way cache data items to be added for the total data restriction function =

maximum number of simultaneous connections to EADS server [Figure] maximum number of data items that can be updated simultaneously

Maximum number of simultaneous connections to EADS server:

eads.server.maxConnections parameter value in the server properties

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.

Number of data items stored per range in a disk cache:

The following shows the formula for estimating the number of data items stored per range in a disk cache:

Number of data items stored per range in a disk cache =

number of data items stored in the cluster's disk cache

[Figure] number of EADS servers in the cluster

+ number of disk cache data items to be added for the total data restriction function

Number of disk cache data items to be added for the total data restriction function:

The formula for estimating the number of disk cache data items to be added for the total data restriction function is shown below.

If you will not be using the total data restriction function, specify 0.

Add this value if you will be using only a disk cache. If you will be using a memory cache or a two-way cache, specify 0.

Number of disk cache data items to be added for the total data restriction function =

maximum number of simultaneous connections to EADS server [Figure] maximum number of data items that can be updated simultaneously

Maximum number of simultaneous connections to EADS server:

eads.server.maxConnections parameter value in the server properties

Maximum number of data items that can be updated simultaneously:

Specify 1.

Maximum number of simultaneous connections to EADS server:

eads.server.maxConnections parameter value in the server properties

Data multiplicity:

eads.replication.factor parameter value in the shared properties

Data transmit and receive buffer size (bytes):

eads.server.connection.buffersize parameter value in the server properties

Java heap area used for managing the history of update operations (bytes):

The following shows the formula for estimating the Java heap area used for managing the history of update operations:

Java heap area used for managing the history of update operations (bytes) =

3,584 [Figure] (maximum number of items that can be retained in the history of update operations

+ maximum number of consensus processes that can be executed simultaneously)

[Figure] (data multiplicity [Figure] 2 - 1) [Figure] numbers of caches

+ 16 [Figure] length of the queue for sending consensus messages [Figure] (number of EADS servers - 1)

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

Data multiplicity:

eads.replication.factor parameter value in the shared properties

Length of the queue for sending consensus messages:

eads.replication.sendQueue.length parameter value in the server properties

Java heap area used for isolation, restoration, and scale-out processing (bytes):

Estimate the maximum sizes of the Java heap areas used for isolation, restoration, and scale-out processing and specify the largest such value.

Java heap area used for isolation processing (bytes) =

(maximum number of consensus processes that can be executed simultaneously [Figure] 2

[Figure] maximum size of the history of update operations (bytes)

[Figure] (maximum number of simultaneous threads for processing performed for caches

+ numbers of caches) + (data multiplicity - 1) [Figure] numbers of caches

[Figure] size of data sent for complementary processing of the history of update operations (bytes))

[Figure] MIN(4 [Figure] (data multiplicity - 1), number of EADS servers - 1)

Java heap area used for restoration and scale-out processing (bytes) =

size of area for storing the history of update operations (megabytes) [Figure] 1,0242

[Figure] (data multiplicity [Figure] 2 - 1)

+ size of data transmitted during restoration processing and scale-out processing (bytes)

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 within 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.

Maximum number of simultaneous threads for processing performed for caches:

Number of redundant copies of data plus the original - 1 (use 1 if the number of redundant copies of data plus the original is 1)

Data multiplicity:

eads.replication.factor parameter value in the shared properties

Size of data sent for complementary processing of the history of update operations (bytes):

eads.replication.fillgap.copy.datasize parameter value in the server properties

MIN:

Selects the smaller value of the calculation results.

Example: For MIN(3 [Figure] 6, 4 + 7), the calculation result is 11.

Size of area for storing the history of update operations:

eads.replication.external.heapsize parameter value in the shared properties

For details about how to estimate this value, see 4.1.3(2) Size of the area for storing the history of update operations.

Size of data transmitted during restoration processing and scale-out processing:

Estimate the size of data transmitted during restoration processing and scale-out processing for each cache and specify the largest such value.

(2) Estimating the Java heap size used by a cache on disk

If you will be using a disk caches or a two-way cache, determine the Java heap size used by the cache.

The formulas for estimating the Java heap size for a disk cache and for a two-way cache are shown below. After estimating the sizes, obtain the sum of the obtained values, and then add that sum to the Java heap size estimated in 4.1.2(1) Estimating the Java heap size per EADS server.