From 70ab45c54a5f2bb0887cf92b1ae8bb5a7f263efd Mon Sep 17 00:00:00 2001 From: Wang Jian <61138589+hzjane@users.noreply.github.com> Date: Thu, 5 Jan 2023 11:08:01 +0800 Subject: [PATCH] [PPML] Branch 2.1 PPML Occlum remove maxmetaspace limit (#7175) * update k8s * update docker --- .../scala/docker-occlum/entrypoint.sh | 11 ----------- .../docker-occlum/run_spark_on_occlum_glibc.sh | 18 +++++------------- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/ppml/trusted-big-data-ml/scala/docker-occlum/entrypoint.sh b/ppml/trusted-big-data-ml/scala/docker-occlum/entrypoint.sh index f2680332791..7e51d8e8292 100644 --- a/ppml/trusted-big-data-ml/scala/docker-occlum/entrypoint.sh +++ b/ppml/trusted-big-data-ml/scala/docker-occlum/entrypoint.sh @@ -58,13 +58,6 @@ if [ -n "$SPARK_EXTRA_CLASSPATH" ]; then SPARK_CLASSPATH="$SPARK_CLASSPATH:$SPARK_EXTRA_CLASSPATH" fi -if [[ -z "$META_SPACE" ]]; then - echo "META_SPACE not set, using default value 256m" - META_SPACE=256m -else - echo "META_SPACE=$META_SPACE" -fi - echo "SGX_LOG_LEVEL $SGX_LOG_LEVEL" && \ echo "SGX_DRIVER_JVM_MEM_SIZE $SGX_DRIVER_JVM_MEM_SIZE" && \ echo "SGX_EXECUTOR_JVM_MEM_SIZE $SGX_EXECUTOR_JVM_MEM_SIZE" && \ @@ -91,7 +84,6 @@ case "$SPARK_K8S_CMD" in -Divy.home="/tmp/.ivy" \ -Dos.name="Linux" \ -XX:-UseCompressedOops \ - -XX:MaxMetaspaceSize=$META_SPACE \ -Djdk.lang.Process.launchMechanism=posix_spawn \ -cp "$SPARK_CLASSPATH" \ -Xmx$DRIVER_MEMORY \ @@ -109,7 +101,6 @@ case "$SPARK_K8S_CMD" in -Divy.home="/tmp/.ivy" \ -Dos.name="Linux" \ -XX:-UseCompressedOops \ - -XX:MaxMetaspaceSize=$META_SPACE \ -Djdk.lang.Process.launchMechanism=posix_spawn \ -cp "$SPARK_CLASSPATH" \ -Xmx$SGX_DRIVER_JVM_MEM_SIZE \ @@ -134,7 +125,6 @@ case "$SPARK_K8S_CMD" in /usr/lib/jvm/java-8-openjdk-amd64/bin/java \ "${SPARK_EXECUTOR_JAVA_OPTS[@]}" \ -XX:-UseCompressedOops \ - -XX:MaxMetaspaceSize=$META_SPACE \ -XX:ActiveProcessorCount=$SPARK_EXECUTOR_CORES \ -Divy.home=/tmp/.ivy \ -Xms$SPARK_EXECUTOR_MEMORY \ @@ -156,7 +146,6 @@ case "$SPARK_K8S_CMD" in /usr/lib/jvm/java-8-openjdk-amd64/bin/java \ "${SPARK_EXECUTOR_JAVA_OPTS[@]}" \ -XX:-UseCompressedOops \ - -XX:MaxMetaspaceSize=$META_SPACE \ -XX:ActiveProcessorCount=$SPARK_EXECUTOR_CORES \ -Divy.home=/tmp/.ivy \ -Xms$SGX_EXECUTOR_JVM_MEM_SIZE \ diff --git a/ppml/trusted-big-data-ml/scala/docker-occlum/run_spark_on_occlum_glibc.sh b/ppml/trusted-big-data-ml/scala/docker-occlum/run_spark_on_occlum_glibc.sh index 6341fde8308..a9f40cab62f 100644 --- a/ppml/trusted-big-data-ml/scala/docker-occlum/run_spark_on_occlum_glibc.sh +++ b/ppml/trusted-big-data-ml/scala/docker-occlum/run_spark_on_occlum_glibc.sh @@ -60,13 +60,6 @@ init_instance() { echo "${edit_json}" > Occlum.json fi - if [[ -z "$META_SPACE" ]]; then - echo "META_SPACE not set, using default value 256m" - META_SPACE=256m - else - echo "META_SPACE=$META_SPACE" - fi - if [[ -z "$SGX_MEM_SIZE" ]]; then sed -i "s/SGX_MEM_SIZE/20GB/g" Occlum.json else @@ -197,7 +190,7 @@ run_spark_pi() { build_spark echo -e "${BLUE}occlum run spark Pi${NC}" occlum run /usr/lib/jvm/java-8-openjdk-amd64/bin/java \ - -XX:-UseCompressedOops -XX:MaxMetaspaceSize=$META_SPACE \ + -XX:-UseCompressedOops \ -XX:ActiveProcessorCount=4 \ -Divy.home="/tmp/.ivy" \ -Dos.name="Linux" \ @@ -225,7 +218,6 @@ run_spark_unittest_only() { -Divy.home="/tmp/.ivy" \ -Dos.name="Linux" \ -Djdk.lang.Process.launchMechanism=posix_spawn \ - -XX:MaxMetaspaceSize=$META_SPACE \ -Dspark.testing=true \ -Dspark.test.home=/opt/spark-source \ -Dspark.python.use.daemon=false \ @@ -246,7 +238,7 @@ run_spark_lenet_mnist(){ echo -e "${BLUE}occlum run BigDL lenet mnist{NC}" echo -e "${BLUE}logfile=$log${NC}" occlum run /usr/lib/jvm/java-8-openjdk-amd64/bin/java \ - -XX:-UseCompressedOops -XX:MaxMetaspaceSize=256m \ + -XX:-UseCompressedOops \ -XX:ActiveProcessorCount=4 \ -Divy.home="/tmp/.ivy" \ -Dos.name="Linux" \ @@ -274,7 +266,7 @@ run_spark_resnet_cifar(){ build_spark echo -e "${BLUE}occlum run BigDL Resnet Cifar10${NC}" occlum run /usr/lib/jvm/java-8-openjdk-amd64/bin/java \ - -XX:-UseCompressedOops -XX:MaxMetaspaceSize=$META_SPACE \ + -XX:-UseCompressedOops \ -XX:ActiveProcessorCount=4 \ -Divy.home="/tmp/.ivy" \ -Dos.name="Linux" \ @@ -302,7 +294,7 @@ run_spark_tpch(){ build_spark echo -e "${BLUE}occlum run BigDL spark tpch${NC}" occlum run /usr/lib/jvm/java-8-openjdk-amd64/bin/java \ - -XX:-UseCompressedOops -XX:MaxMetaspaceSize=$META_SPACE \ + -XX:-UseCompressedOops \ -XX:ActiveProcessorCount=4 \ -Divy.home="/tmp/.ivy" \ -Dos.name="Linux" \ @@ -341,7 +333,7 @@ run_spark_xgboost() { build_spark echo -e "${BLUE}occlum run BigDL Spark XGBoost${NC}" occlum run /usr/lib/jvm/java-8-openjdk-amd64/bin/java \ - -XX:-UseCompressedOops -XX:MaxMetaspaceSize=$META_SPACE \ + -XX:-UseCompressedOops \ -XX:ActiveProcessorCount=4 \ -Divy.home="/tmp/.ivy" \ -Dos.name="Linux" \