12G内存分配给BE 经常会报错

Viewed 84

如下错误:
process memory used 4.92 GB exceed limit 10.80 GB or sys available memory 1.19 GB less than low water mark 1.20 GB

请问一下可以 调整 sys available memory 或者说是 low water mark的值吗?

使用 镜像信息如下:

  1. selectdb/doris.k8s-operator:1.5.2
  2. selectdb/doris.be-ubuntu:2.1.3
  3. selectdb/doris.fe-ubuntu:2.1.3
2 Answers

看看 BE resource的 CR 怎么配置的,方便的话贴一下的

如下是 DorisCluster 配置

apiVersion: doris.selectdb.com/v1
kind: DorisCluster
metadata:
  labels:
    app.kubernetes.io/name: doriscluster
    app.kubernetes.io/instance: doriscluster-sample
    app.kubernetes.io/part-of: doris-operator
  name: doriscluster-sample
  namespace: doris
spec:
  feSpec:
    affinity:
      nodeAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
          nodeSelectorTerms:
            - matchExpressions:
                - key: kubernetes.io/arch
                  operator: In
                  values:
                    - arm64
                - key: node-lifecycle
                  operator: In
                  values:
                    - spot
    replicas: 2
    limits:
      cpu: 2058m
      memory: 10Gi
    requests:
      cpu: 2058m
      memory: 10Gi
    configMapInfo:
      configMapName: fe-configmap
      resolveKey: fe.conf
    persistentVolumes:
      - mountPath: /opt/apache-doris/fe/doris-meta
        name: fetest
        persistentVolumeClaimSpec:
          storageClassName: ebs-sc-retain
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 10Gi
      - mountPath: /opt/apache-doris/fe/log
        name: felog
        persistentVolumeClaimSpec:
          storageClassName: ebs-sc-retain
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 10Gi
    image: xxx.dkr.ecr.cn-northwest-1.amazonaws.com.cn/selectdb/doris.fe-ubuntu:2.1.3
    systemInitialization:
      initImage: xxx.dkr.ecr.cn-northwest-1.amazonaws.com.cn/selectdb/alpine:latest
  beSpec:
    affinity:
      nodeAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
          nodeSelectorTerms:
            - matchExpressions:
                - key: kubernetes.io/arch
                  operator: In
                  values:
                    - arm64
                - key: node-lifecycle
                  operator: In
                  values:
                    - spot
    replicas: 2
    limits:
      cpu: 2059m
      memory: 12Gi
    requests:
      cpu: 2059m
      memory: 12Gi
    configMapInfo:
      configMapName: be-configmap
      resolveKey: be.conf
    persistentVolumes:
      - mountPath: /opt/apache-doris/be/storage
        name: betest
        persistentVolumeClaimSpec:
          storageClassName: ebs-sc-retain
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 100Gi
      - mountPath: /opt/apache-doris/be/log
        name: belog
        persistentVolumeClaimSpec:
          storageClassName: ebs-sc-retain
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 10Gi
    image: xxx.dkr.ecr.cn-northwest-1.amazonaws.com.cn/selectdb/doris.be-ubuntu:2.1.3
    systemInitialization:
      initImage: xxx.dkr.ecr.cn-northwest-1.amazonaws.com.cn/selectdb/alpine:latest

如下是: BE ConfigMap

apiVersion: v1
kind: ConfigMap
metadata:
  name: be-configmap
  namespace: doris
data:
  be.conf: |
    CUR_DATE=`date +%Y%m%d-%H%M%S`
    PPROF_TMPDIR="$DORIS_HOME/log/"
    JAVA_OPTS="-Xmx8024m -DlogPath=$DORIS_HOME/log/jni.log -Xloggc:$DORIS_HOME/log/be.gc.log.$CUR_DATE -Dsun.java.command=DorisBE -XX:-CriticalJNINatives -DJDBC_MIN_POOL=1 -DJDBC_MAX_POOL=100 -DJDBC_MAX_IDLE_TIME=300000 -DJDBC_MAX_WAIT_TIME=5000"
    JAVA_OPTS_FOR_JDK_9="-Xmx8024m -DlogPath=$DORIS_HOME/log/jni.log -Xlog:gc:$DORIS_HOME/log/be.gc.log.$CUR_DATE -Dsun.java.command=DorisBE -XX:-CriticalJNINatives -DJDBC_MIN_POOL=1 -DJDBC_MAX_POOL=100 -DJDBC_MAX_IDLE_TIME=300000 -DJDBC_MAX_WAIT_TIME=5000"
    JEMALLOC_CONF="percpu_arena:percpu,background_thread:true,metadata_thp:auto,muzzy_decay_ms:15000,dirty_decay_ms:15000,oversize_threshold:0,lg_tcache_max:20,prof:false,lg_prof_interval:32,lg_prof_sample:19,prof_gdump:false,prof_accum:false,prof_leak:false,prof_final:false"
    JEMALLOC_PROF_PRFIX=""
    enable_fqdn_mode = true
    sys_log_level = INFO
    be_port = 9060
    webserver_port = 8040
    heartbeat_service_port = 9050
    brpc_port = 8060
    enable_https = false
    ssl_certificate_path = "$DORIS_HOME/conf/cert.pem"
    ssl_private_key_path = "$DORIS_HOME/conf/key.pem"
    enable_auth = false
    disable_mem_pools=true