Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
[hot-fix] increase data-node memory limits to 4Gi (#1689)
Browse files Browse the repository at this point in the history
* increate data-node memory limits to 4Gi

* increase data-node max java heapsize to 2G

* reserve more memory on PAI worker
  • Loading branch information
hao1939 committed Nov 15, 2018
1 parent 7919c50 commit 6b91254
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/hadoop-data-node/deploy/hadoop-data-node.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ spec:
periodSeconds: 3
resources:
limits:
memory: "4Gi"
requests:
memory: "1Gi"
env:
- name: HADOOP_DATANODE_OPTS
value: "-Xmx512m"
value: "-Xmx2048m"
- name: HDFS_ADDRESS
value: {{ clusterinfo[ 'hadoopinfo' ][ 'hadoop_vip' ] }}
- name: GENERATE_CONFIG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ mem_total=`cat /proc/meminfo | grep "MemTotal" | awk '{print $2}'`
# memory size to nodemanager is (mem_total - mem_reserved)
if [ $(grep 'ip:' /host-configuration/host-configuration.yaml|wc -l) -gt 1 ]
then
echo "Node role is 'Worker'. Reserve 12G for os and k8s."
let mem_reserved=12*1024
echo "Node role is 'Worker'. Reserve 16G for os and k8s."
let mem_reserved=16*1024
else
echo "Node role is 'Master & Worker'. Reserve 40G for os and k8s."
let mem_reserved=40*1024
Expand Down

0 comments on commit 6b91254

Please sign in to comment.