此内容没有您所选择的语言版本。

Chapter 1. Capacity planning


Data in Red Hat Data Grid is either stored as plain Java objects or in a serialized form, depending on operating mode (embedded or server) or on specific configuration options such as store-as-binary. Data size can be estimated using sophisticated tools like Java Object Layout and the total amount of required memory can be roughly estimated using the following formulas:

Equation 1.1. Total Data Set in library mode

Total Data Set = Number Of Entries * (Key Size + Value Size + 200 b (Overhead))

Equation 1.2. Total Data Set in server mode

Total Data Set = Number Of Entries * (Serialized Key Size + Serialized Value Size + 200 b (Overhead))

Term overhead is used here as an average amount of additional memory (e.g. expiration or eviction data) needed for storing an Entry in a Cache.

In case of Local or Replicated mode, all data needs to fit in memory, so calculating the amount of required memory is trivial.

Calculating memory requirements for Distributed mode is slightly more complicated and requires using the following:

Equation 1.3. Required memory in Distributed mode

Required Memo ry = Total Data Set*(Node Failures + 2)/(Nodes - Node Failures)

Where:

  • Total Data Set - Estimated size of all data
  • Nodes - The number of nodes in the cluster
  • Node Failures - Number of possible failures (also number of owners - 1)

Calculated amount of memory should be used for setting Xmx and Xms parameters.

JVM as well as Red Hat Data Grid require additional memory for other tasks like searches, allocating network buffers etc. It is advised to allocate no more than 50% of memory with living data when using Red Hat Data Grid solely as a caching data store, and no more than 33% of memory with living data when using Red Hat Data Grid to store and analyze the data using querying, distributed execution or distributed streams.

When considering large heaps, make sure there’s enough CPU to perform garbage collection efficiently.

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.