This is an automated email from the ASF dual-hosted git repository. liurui pushed a commit to branch change-default-resource-limit in repository https://gitbox.apache.org/repos/asf/rocketmq-operator.git
commit 21eb243cf5efd70b79dcf469578e5afe96fa9b4b Author: liuruiyiyang <[email protected]> AuthorDate: Mon Aug 24 17:17:56 2020 +0800 docs(README): change default memory resource limit config to avoid broker pod OOMKilled error --- README.md | 4 +++- example/rocketmq_v1alpha1_broker_cr.yaml | 2 +- example/rocketmq_v1alpha1_rocketmq_cluster.yaml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a181604..ff844ef 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,7 @@ spec: memory: "2048Mi" cpu: "250m" limits: - memory: "4096Mi" + memory: "12288Mi" cpu: "500m" # allowRestart defines whether allow pod restart allowRestart: true @@ -252,6 +252,8 @@ spec: which defines the RocketMQ name server cluster and the broker cluster scale, the [ip:port] list of name service and so on. By default, the nameServers is an empty string which means it is automatically obtained by the operator. +> Notice: Currently the broker image use the formula ```max(min(1/2 ram, 1024MB), min(1/4 ram, 8GB))``` to calculate JVM Xmx size in which ```ram``` is the host memory size. If the memory resource limit is lower than the container requirement, it may occur the ```OOMkilled``` error. + ### Create RocketMQ Cluster 1. Deploy the RocketMQ name service cluster by running: diff --git a/example/rocketmq_v1alpha1_broker_cr.yaml b/example/rocketmq_v1alpha1_broker_cr.yaml index 1de157e..ff7ec72 100644 --- a/example/rocketmq_v1alpha1_broker_cr.yaml +++ b/example/rocketmq_v1alpha1_broker_cr.yaml @@ -37,7 +37,7 @@ spec: memory: "2048Mi" cpu: "250m" limits: - memory: "4096Mi" + memory: "12288Mi" cpu: "500m" # allowRestart defines whether allow pod restart allowRestart: true diff --git a/example/rocketmq_v1alpha1_rocketmq_cluster.yaml b/example/rocketmq_v1alpha1_rocketmq_cluster.yaml index f464b67..f39a2f3 100644 --- a/example/rocketmq_v1alpha1_rocketmq_cluster.yaml +++ b/example/rocketmq_v1alpha1_rocketmq_cluster.yaml @@ -37,7 +37,7 @@ spec: memory: "2048Mi" cpu: "250m" limits: - memory: "4096Mi" + memory: "12288Mi" cpu: "500m" # allowRestart defines whether allow pod restart allowRestart: true
