Skip to content

Commit

Permalink
[PPML] Branch 2.1 PPML Occlum remove maxmetaspace limit (#7175)
Browse files Browse the repository at this point in the history
* update k8s

* update docker
  • Loading branch information
hzjane authored Jan 5, 2023
1 parent 16761c1 commit 70ab45c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 deletions.
11 changes: 0 additions & 11 deletions ppml/trusted-big-data-ml/scala/docker-occlum/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" && \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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" \
Expand Down Expand Up @@ -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 \
Expand All @@ -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" \
Expand Down Expand Up @@ -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" \
Expand Down Expand Up @@ -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" \
Expand Down Expand Up @@ -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" \
Expand Down

0 comments on commit 70ab45c

Please sign in to comment.