Update demos to enable EDMM features
This commit is contained in:
parent
6bf849634d
commit
b7d23c4203
@ -16,7 +16,8 @@ pushd occlum_instance
|
|||||||
rm -rf image
|
rm -rf image
|
||||||
copy_bom -f $bomfile --root image --include-dir /opt/occlum/etc/template
|
copy_bom -f $bomfile --root image --include-dir /opt/occlum/etc/template
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "600MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "600MB" |
|
||||||
.resource_limits.kernel_space_stack_size ="2MB" ' Occlum.json)" && \
|
.resource_limits.kernel_space_stack_size ="2MB" ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
|
@ -25,7 +25,8 @@ function build_occlum_instance()
|
|||||||
pushd ${name}
|
pushd ${name}
|
||||||
copy_bom -f ../iperf2.yaml --root image --include-dir /opt/occlum/etc/template
|
copy_bom -f ../iperf2.yaml --root image --include-dir /opt/occlum/etc/template
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "1000MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "1000MB" |
|
||||||
.resource_limits.max_num_of_threads = 64 ' Occlum.json)" && \
|
.resource_limits.max_num_of_threads = 64 ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
|
@ -26,7 +26,8 @@ function build_occlum_instance()
|
|||||||
pushd ${name}
|
pushd ${name}
|
||||||
copy_bom -f ../iperf3.yaml --root image --include-dir /opt/occlum/etc/template
|
copy_bom -f ../iperf3.yaml --root image --include-dir /opt/occlum/etc/template
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "1000MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "1000MB" |
|
||||||
.resource_limits.max_num_of_threads = 64 ' Occlum.json)" && \
|
.resource_limits.max_num_of_threads = 64 ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
|
@ -8,7 +8,8 @@ cd occlum_instance
|
|||||||
rm -rf image
|
rm -rf image
|
||||||
copy_bom -f ../sysbench.yaml --root image --include-dir /opt/occlum/etc/template
|
copy_bom -f ../sysbench.yaml --root image --include-dir /opt/occlum/etc/template
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "800MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "800MB" |
|
||||||
.resource_limits.max_num_of_threads = 256 ' Occlum.json)" && \
|
.resource_limits.max_num_of_threads = 256 ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
|
@ -9,8 +9,10 @@ init_instance() {
|
|||||||
cd flink
|
cd flink
|
||||||
# Init Occlum instance
|
# Init Occlum instance
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "7000MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size="64MB" |
|
.resource_limits.user_space_max_size = "7000MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size="64MB" |
|
||||||
.resource_limits.max_num_of_threads = 72 |
|
.resource_limits.max_num_of_threads = 72 |
|
||||||
.process.default_heap_size = "128MB" |
|
.process.default_heap_size = "128MB" |
|
||||||
.entry_points = [ "/usr/lib/jvm/java-11-openjdk-amd64/bin" ] |
|
.entry_points = [ "/usr/lib/jvm/java-11-openjdk-amd64/bin" ] |
|
||||||
|
@ -8,8 +8,10 @@ rm -rf occlum-instance
|
|||||||
occlum new occlum-instance
|
occlum new occlum-instance
|
||||||
cd occlum-instance
|
cd occlum-instance
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "512MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size = "64MB" |
|
.resource_limits.user_space_max_size = "512MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size = "1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size = "64MB" |
|
||||||
.env.default = [ "OCCLUM=yes", "HOME=/root" ]' Occlum.json)" && \
|
.env.default = [ "OCCLUM=yes", "HOME=/root" ]' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
|
@ -10,8 +10,10 @@ rm -rf occlum-test
|
|||||||
occlum new occlum-test && cd occlum-test
|
occlum new occlum-test && cd occlum-test
|
||||||
|
|
||||||
# Set process memory space size to very small values and will fail when running target script using default configuration
|
# Set process memory space size to very small values and will fail when running target script using default configuration
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "512MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size= "64MB" |
|
.resource_limits.user_space_max_size = "512MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size= "1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size = "64MB" |
|
||||||
.process.default_stack_size = "1MB" |
|
.process.default_stack_size = "1MB" |
|
||||||
.process.default_heap_size = "1MB" |
|
.process.default_heap_size = "1MB" |
|
||||||
.env.default = [ "OCCLUM=yes", "HOME=/root" ]' Occlum.json)" && \
|
.env.default = [ "OCCLUM=yes", "HOME=/root" ]' Occlum.json)" && \
|
||||||
|
@ -15,10 +15,12 @@ init_instance() {
|
|||||||
rm -rf occlum_instance_$postfix && mkdir occlum_instance_$postfix
|
rm -rf occlum_instance_$postfix && mkdir occlum_instance_$postfix
|
||||||
cd occlum_instance_$postfix
|
cd occlum_instance_$postfix
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "5500MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "5500MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size="64MB" |
|
||||||
.resource_limits.max_num_of_threads = 64 |
|
.resource_limits.max_num_of_threads = 64 |
|
||||||
.process.default_heap_size = "128MB" |
|
.process.default_heap_size = "128MB" |
|
||||||
.resource_limits.kernel_space_heap_size="64MB" |
|
|
||||||
.entry_points = [ "/usr/lib/jvm/java-11-openjdk-amd64/bin" ] |
|
.entry_points = [ "/usr/lib/jvm/java-11-openjdk-amd64/bin" ] |
|
||||||
.env.default = [ "LD_LIBRARY_PATH=/usr/lib/jvm/java-11-openjdk-amd64/lib/server:/usr/lib/jvm/java-11-openjdk-amd64/lib:/usr/lib/jvm/java-11-openjdk-amd64/../lib:/lib" ]' Occlum.json)" && \
|
.env.default = [ "LD_LIBRARY_PATH=/usr/lib/jvm/java-11-openjdk-amd64/lib/server:/usr/lib/jvm/java-11-openjdk-amd64/lib:/usr/lib/jvm/java-11-openjdk-amd64/../lib:/lib" ]' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
@ -18,8 +18,10 @@ init_instance() {
|
|||||||
rm -rf occlum_instance && mkdir occlum_instance
|
rm -rf occlum_instance && mkdir occlum_instance
|
||||||
cd occlum_instance
|
cd occlum_instance
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "1400MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size="64MB" |
|
.resource_limits.user_space_max_size = "1400MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size="64MB" |
|
||||||
.resource_limits.max_num_of_threads = 64 |
|
.resource_limits.max_num_of_threads = 64 |
|
||||||
.process.default_heap_size = "256MB" |
|
.process.default_heap_size = "256MB" |
|
||||||
.entry_points = [ "/usr/lib/jvm/java-11-alibaba-dragonwell/jre/bin" ] |
|
.entry_points = [ "/usr/lib/jvm/java-11-alibaba-dragonwell/jre/bin" ] |
|
||||||
|
@ -16,8 +16,10 @@ occlum-go build -o simple_demo simple_demo.go
|
|||||||
rm -rf simple_demo_instance && mkdir simple_demo_instance
|
rm -rf simple_demo_instance && mkdir simple_demo_instance
|
||||||
cd simple_demo_instance
|
cd simple_demo_instance
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "2560MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size="320MB" |
|
.resource_limits.user_space_max_size = "2560MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size="320MB" |
|
||||||
.resource_limits.kernel_space_stack_size="10MB" |
|
.resource_limits.kernel_space_stack_size="10MB" |
|
||||||
.process.default_stack_size = "40MB" |
|
.process.default_stack_size = "40MB" |
|
||||||
.process.default_heap_size = "320MB" ' Occlum.json)" && \
|
.process.default_heap_size = "320MB" ' Occlum.json)" && \
|
||||||
|
@ -42,7 +42,8 @@ rm -rf occlum_server && mkdir occlum_server
|
|||||||
rm -rf occlum_client && mkdir occlum_client
|
rm -rf occlum_client && mkdir occlum_client
|
||||||
cd occlum_client
|
cd occlum_client
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "2048MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "2048MB" |
|
||||||
.resource_limits.max_num_of_threads = 96 ' Occlum.json)" && \
|
.resource_limits.max_num_of_threads = 96 ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
@ -54,7 +55,8 @@ occlum build
|
|||||||
|
|
||||||
cd ../occlum_server
|
cd ../occlum_server
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "2048MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "2048MB" |
|
||||||
.resource_limits.max_num_of_threads = 96 ' Occlum.json)" && \
|
.resource_limits.max_num_of_threads = 96 ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
|
@ -16,8 +16,10 @@ fi
|
|||||||
rm -rf occlum_ping_instance && mkdir occlum_ping_instance
|
rm -rf occlum_ping_instance && mkdir occlum_ping_instance
|
||||||
cd occlum_ping_instance
|
cd occlum_ping_instance
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "800MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size="40MB" |
|
.resource_limits.user_space_max_size = "800MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size="40MB" |
|
||||||
.resource_limits.kernel_space_stack_size="1MB" |
|
.resource_limits.kernel_space_stack_size="1MB" |
|
||||||
.process.default_stack_size = "1MB" |
|
.process.default_stack_size = "1MB" |
|
||||||
.process.default_heap_size = "20MB" ' Occlum.json)" && \
|
.process.default_heap_size = "20MB" ' Occlum.json)" && \
|
||||||
|
@ -16,8 +16,10 @@ fi
|
|||||||
rm -rf occlum_pong_instance && mkdir occlum_pong_instance
|
rm -rf occlum_pong_instance && mkdir occlum_pong_instance
|
||||||
cd occlum_pong_instance
|
cd occlum_pong_instance
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "800MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size="40MB" |
|
.resource_limits.user_space_max_size = "800MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size="40MB" |
|
||||||
.resource_limits.kernel_space_stack_size="1MB" |
|
.resource_limits.kernel_space_stack_size="1MB" |
|
||||||
.process.default_stack_size = "1MB" |
|
.process.default_stack_size = "1MB" |
|
||||||
.process.default_heap_size = "20MB" ' Occlum.json)" && \
|
.process.default_heap_size = "20MB" ' Occlum.json)" && \
|
||||||
|
@ -16,9 +16,12 @@ fi
|
|||||||
rm -rf occlum_instance
|
rm -rf occlum_instance
|
||||||
occlum new occlum_instance
|
occlum new occlum_instance
|
||||||
cd occlum_instance
|
cd occlum_instance
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "2560MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size="320MB" |
|
.resource_limits.user_space_max_size = "2560MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size="320MB" |
|
||||||
.resource_limits.kernel_space_stack_size="10MB" |
|
.resource_limits.kernel_space_stack_size="10MB" |
|
||||||
|
.resource_limits.max_num_of_threads=64 |
|
||||||
.process.default_stack_size = "40MB" |
|
.process.default_stack_size = "40MB" |
|
||||||
.process.default_heap_size = "320MB" ' Occlum.json)" && \
|
.process.default_heap_size = "320MB" ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
@ -16,7 +16,8 @@ fi
|
|||||||
rm -rf occlum_instance && mkdir occlum_instance
|
rm -rf occlum_instance && mkdir occlum_instance
|
||||||
cd occlum_instance
|
cd occlum_instance
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "1000MB" ' Occlum.json)" && \
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "1000MB" ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
# 2. Copy program into Occlum Workspace and build
|
# 2. Copy program into Occlum Workspace and build
|
||||||
|
@ -24,8 +24,10 @@ init_instance() {
|
|||||||
rm -rf occlum_instance && mkdir occlum_instance
|
rm -rf occlum_instance && mkdir occlum_instance
|
||||||
cd occlum_instance
|
cd occlum_instance
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "1680MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size="64MB" |
|
.resource_limits.user_space_max_size = "1680MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size="64MB" |
|
||||||
.resource_limits.max_num_of_threads = 64 |
|
.resource_limits.max_num_of_threads = 64 |
|
||||||
.process.default_heap_size = "256MB" |
|
.process.default_heap_size = "256MB" |
|
||||||
.entry_points = [ "/usr/lib/jvm/java-11-alibaba-dragonwell/jre/bin" ] |
|
.entry_points = [ "/usr/lib/jvm/java-11-alibaba-dragonwell/jre/bin" ] |
|
||||||
@ -85,7 +87,8 @@ build_processBuilder() {
|
|||||||
rm -rf image
|
rm -rf image
|
||||||
copy_bom -f ../process_builder.yaml --root image --include-dir /opt/occlum/etc/template
|
copy_bom -f ../process_builder.yaml --root image --include-dir /opt/occlum/etc/template
|
||||||
# Need bigger user space size for multiprocess
|
# Need bigger user space size for multiprocess
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "6000MB"' Occlum.json)" && \
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "6000MB"' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
occlum build
|
occlum build
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,10 @@ cd ltp_instance
|
|||||||
rm -rf image
|
rm -rf image
|
||||||
copy_bom -f ../ltp.yaml --root image --include-dir /opt/occlum/etc/template
|
copy_bom -f ../ltp.yaml --root image --include-dir /opt/occlum/etc/template
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "3000MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size ="1024MB" |
|
.resource_limits.user_space_max_size = "3000MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size ="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size ="1024MB" |
|
||||||
.resource_limits.kernel_space_stack_size ="4MB" |
|
.resource_limits.kernel_space_stack_size ="4MB" |
|
||||||
.resource_limits.max_num_of_threads = 96 |
|
.resource_limits.max_num_of_threads = 96 |
|
||||||
.entry_points = [ "/opt/ltp" ] |
|
.entry_points = [ "/opt/ltp" ] |
|
||||||
|
@ -14,8 +14,10 @@ MYSQLD=mysqld
|
|||||||
rm -rf occlum_instance && occlum new occlum_instance
|
rm -rf occlum_instance && occlum new occlum_instance
|
||||||
pushd occlum_instance
|
pushd occlum_instance
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "8000MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size ="1000MB" |
|
.resource_limits.user_space_max_size = "8000MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size ="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size ="1000MB" |
|
||||||
.resource_limits.max_num_of_threads = 96' Occlum.json)" && \
|
.resource_limits.max_num_of_threads = 96' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
|
@ -17,8 +17,10 @@ init_instance() {
|
|||||||
# Init Occlum instance
|
# Init Occlum instance
|
||||||
rm -rf occlum_netty_ut_instance && occlum new occlum_netty_ut_instance
|
rm -rf occlum_netty_ut_instance && occlum new occlum_netty_ut_instance
|
||||||
cd occlum_netty_ut_instance
|
cd occlum_netty_ut_instance
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "4680MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size="64MB" |
|
.resource_limits.user_space_max_size = "4680MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size="64MB" |
|
||||||
.resource_limits.max_num_of_threads = 128 |
|
.resource_limits.max_num_of_threads = 128 |
|
||||||
.process.default_heap_size = "512MB" |
|
.process.default_heap_size = "512MB" |
|
||||||
.entry_points = [ "/usr/lib/jvm/java-11-openjdk-amd64/bin" ] |
|
.entry_points = [ "/usr/lib/jvm/java-11-openjdk-amd64/bin" ] |
|
||||||
|
@ -18,7 +18,9 @@ cpu_cc=`cat /proc/cpuinfo | grep processor | wc -l`
|
|||||||
# .process.default_stack_size = "8MB" |
|
# .process.default_stack_size = "8MB" |
|
||||||
# .process.default_heap_size = "32MB" |
|
# .process.default_heap_size = "32MB" |
|
||||||
# .metadata.debuggable = false ' Occlum.json)" && \
|
# .metadata.debuggable = false ' Occlum.json)" && \
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "320MB"' Occlum.json)" && \
|
new_json="$(jq '.resource_limits.max_num_of_threads = 64 |
|
||||||
|
.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "600MB"' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
# 2. Copy files into Occlum Workspace and Build
|
# 2. Copy files into Occlum Workspace and Build
|
||||||
|
@ -15,8 +15,10 @@ if [ ! -d $python_dir ];then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "6000MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size = "256MB" |
|
.resource_limits.user_space_max_size = "6000MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size = "1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size = "256MB" |
|
||||||
.resource_limits.max_num_of_threads = 64 |
|
.resource_limits.max_num_of_threads = 64 |
|
||||||
.env.default += ["PYTHONHOME=/opt/python-occlum"]' Occlum.json)" && \
|
.env.default += ["PYTHONHOME=/opt/python-occlum"]' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
@ -16,8 +16,10 @@ if [ ! -d $python_dir ];then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "640MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size = "256MB" |
|
.resource_limits.user_space_max_size = "640MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size = "1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size = "256MB" |
|
||||||
.env.default += ["PYTHONHOME=/opt/python-occlum"]' Occlum.json)" && \
|
.env.default += ["PYTHONHOME=/opt/python-occlum"]' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
occlum build
|
occlum build
|
||||||
|
@ -17,8 +17,10 @@ if [ ! -d $python_dir ];then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "640MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size = "300MB" |
|
.resource_limits.user_space_max_size = "640MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size = "1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size = "300MB" |
|
||||||
.env.default += ["PYTHONHOME=/opt/python-occlum"]' Occlum.json)" && \
|
.env.default += ["PYTHONHOME=/opt/python-occlum"]' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
occlum build
|
occlum build
|
||||||
|
@ -20,8 +20,10 @@ cd occlum_instance
|
|||||||
if [ ! -d "image/lib/python3.7" ];then
|
if [ ! -d "image/lib/python3.7" ];then
|
||||||
rm -rf image
|
rm -rf image
|
||||||
copy_bom -f ../python_musl.yaml --root image --include-dir /opt/occlum/etc/template
|
copy_bom -f ../python_musl.yaml --root image --include-dir /opt/occlum/etc/template
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "320MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size = "256MB"' Occlum.json)" && \
|
.resource_limits.user_space_max_size = "320MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size = "1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size = "256MB" ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
occlum build
|
occlum build
|
||||||
fi
|
fi
|
||||||
|
@ -34,8 +34,10 @@ function build_instance()
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "4000MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size = "400MB" |
|
.resource_limits.user_space_max_size = "4000MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size = "1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size = "400MB" |
|
||||||
.resource_limits.max_num_of_threads = 64 |
|
.resource_limits.max_num_of_threads = 64 |
|
||||||
.env.untrusted += [ "MASTER_ADDR", "MASTER_PORT", "WORLD_SIZE", "RANK", "OMP_NUM_THREADS", "HOME" ] |
|
.env.untrusted += [ "MASTER_ADDR", "MASTER_PORT", "WORLD_SIZE", "RANK", "OMP_NUM_THREADS", "HOME" ] |
|
||||||
.env.default += ["GLOO_DEVICE_TRANSPORT=TCP_TLS"] |
|
.env.default += ["GLOO_DEVICE_TRANSPORT=TCP_TLS"] |
|
||||||
|
@ -15,8 +15,10 @@ if [ ! -d $python_dir ];then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "6000MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size = "256MB" |
|
.resource_limits.user_space_max_size = "6000MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size = "1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size = "256MB" |
|
||||||
.resource_limits.max_num_of_threads = 64 |
|
.resource_limits.max_num_of_threads = 64 |
|
||||||
.env.default += ["PYTHONHOME=/opt/python-occlum"]' Occlum.json)" && \
|
.env.default += ["PYTHONHOME=/opt/python-occlum"]' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
@ -8,7 +8,8 @@ bomfile=${SCRIPT_DIR}/redis.yaml
|
|||||||
rm -rf occlum_instance
|
rm -rf occlum_instance
|
||||||
occlum new occlum_instance
|
occlum new occlum_instance
|
||||||
cd occlum_instance
|
cd occlum_instance
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "320MB" ' Occlum.json)" && \
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "320MB" ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
# 2. Copy files into Occlum Workspace and Build
|
# 2. Copy files into Occlum Workspace and Build
|
||||||
|
@ -8,7 +8,8 @@ bomfile=${SCRIPT_DIR}/redis_glibc.yaml
|
|||||||
rm -rf occlum_instance
|
rm -rf occlum_instance
|
||||||
occlum new occlum_instance
|
occlum new occlum_instance
|
||||||
cd occlum_instance
|
cd occlum_instance
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "320MB" ' Occlum.json)" && \
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "320MB" ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
rm -rf image
|
rm -rf image
|
||||||
|
@ -17,8 +17,10 @@ function build() {
|
|||||||
|
|
||||||
rm -rf image
|
rm -rf image
|
||||||
copy_bom -f $bomfile --root image --include-dir /opt/occlum/etc/template
|
copy_bom -f $bomfile --root image --include-dir /opt/occlum/etc/template
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "600MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size = "128MB"' Occlum.json)" && \
|
.resource_limits.user_space_max_size = "600MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size = "1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size = "128MB"' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
occlum build
|
occlum build
|
||||||
|
@ -49,8 +49,10 @@ function build_client_instance()
|
|||||||
# In our case, client and server use the same sign-key thus also the same mrsigner
|
# In our case, client and server use the same sign-key thus also the same mrsigner
|
||||||
occlum build
|
occlum build
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "600MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size = "128MB" |
|
.resource_limits.user_space_max_size = "600MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size = "1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size = "128MB" |
|
||||||
.resource_limits.max_num_of_threads = 32 |
|
.resource_limits.max_num_of_threads = 32 |
|
||||||
.metadata.debuggable = true |
|
.metadata.debuggable = true |
|
||||||
.metadata.enable_kss = true |
|
.metadata.enable_kss = true |
|
||||||
@ -102,7 +104,8 @@ function build_server_instance()
|
|||||||
.sgx_mrs[0].config_svn = 1234 |
|
.sgx_mrs[0].config_svn = 1234 |
|
||||||
.sgx_mrs[0].debuggable = true ' ../ra_config_template.json > dynamic_config.json
|
.sgx_mrs[0].debuggable = true ' ../ra_config_template.json > dynamic_config.json
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "500MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "500MB" |
|
||||||
.metadata.debuggable = true ' Occlum.json)" && \
|
.metadata.debuggable = true ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
|
@ -18,7 +18,8 @@ function build_bash_demo()
|
|||||||
rm -rf image
|
rm -rf image
|
||||||
copy_bom -f ../bash.yaml --root image --include-dir /opt/occlum/etc/template
|
copy_bom -f ../bash.yaml --root image --include-dir /opt/occlum/etc/template
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "600MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "600MB" |
|
||||||
.resource_limits.kernel_space_stack_size ="2MB" ' Occlum.json)" && \
|
.resource_limits.kernel_space_stack_size ="2MB" ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
@ -44,8 +45,10 @@ function build_and_gen_rootfs()
|
|||||||
rm -rf gen_rootfs_instance && occlum new gen_rootfs_instance
|
rm -rf gen_rootfs_instance && occlum new gen_rootfs_instance
|
||||||
pushd gen_rootfs_instance
|
pushd gen_rootfs_instance
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "1000MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size= "512MB" |
|
.resource_limits.user_space_max_size = "1000MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size= "1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size= "512MB" |
|
||||||
.resource_limits.kernel_space_stack_size= "16MB" ' Occlum.json)" && \
|
.resource_limits.kernel_space_stack_size= "16MB" ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
@ -69,7 +72,8 @@ function build_boot_template()
|
|||||||
rm -rf boot_instance && occlum new boot_instance
|
rm -rf boot_instance && occlum new boot_instance
|
||||||
pushd boot_instance
|
pushd boot_instance
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "600MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "600MB" |
|
||||||
.resource_limits.kernel_space_stack_size ="2MB" ' Occlum.json)" && \
|
.resource_limits.kernel_space_stack_size ="2MB" ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
|
@ -17,8 +17,10 @@ init_instance() {
|
|||||||
# Init Occlum instance
|
# Init Occlum instance
|
||||||
rm -rf occlum_instance && occlum new occlum_instance
|
rm -rf occlum_instance && occlum new occlum_instance
|
||||||
cd occlum_instance
|
cd occlum_instance
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "1680MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size="64MB" |
|
.resource_limits.user_space_max_size = "1680MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size="64MB" |
|
||||||
.resource_limits.max_num_of_threads = 64 |
|
.resource_limits.max_num_of_threads = 64 |
|
||||||
.process.default_heap_size = "256MB" |
|
.process.default_heap_size = "256MB" |
|
||||||
.entry_points = [ "/usr/lib/jvm/java-11-alibaba-dragonwell/jre/bin" ] |
|
.entry_points = [ "/usr/lib/jvm/java-11-alibaba-dragonwell/jre/bin" ] |
|
||||||
|
@ -17,8 +17,10 @@ init_instance() {
|
|||||||
# Init Occlum instance
|
# Init Occlum instance
|
||||||
rm -rf occlum_instance && occlum new occlum_instance
|
rm -rf occlum_instance && occlum new occlum_instance
|
||||||
cd occlum_instance
|
cd occlum_instance
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "1680MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size="64MB" |
|
.resource_limits.user_space_max_size = "1680MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size="64MB" |
|
||||||
.resource_limits.max_num_of_threads = 64 |
|
.resource_limits.max_num_of_threads = 64 |
|
||||||
.process.default_heap_size = "256MB" |
|
.process.default_heap_size = "256MB" |
|
||||||
.entry_points = [ "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/" ] |
|
.entry_points = [ "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/" ] |
|
||||||
|
@ -18,8 +18,10 @@ rm -rf occlum_instance
|
|||||||
mkdir occlum_instance
|
mkdir occlum_instance
|
||||||
cd occlum_instance
|
cd occlum_instance
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "7000MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size="384MB" |
|
.resource_limits.user_space_max_size = "7000MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size="384MB" |
|
||||||
.process.default_heap_size = "128MB" |
|
.process.default_heap_size = "128MB" |
|
||||||
.resource_limits.max_num_of_threads = 64 |
|
.resource_limits.max_num_of_threads = 64 |
|
||||||
.env.default = [ "OMP_NUM_THREADS=8", "KMP_AFFINITY=verbose,granularity=fine,compact,1,0", "KMP_BLOCKTIME=20", "MKL_NUM_THREADS=8"]' Occlum.json)" && \
|
.env.default = [ "OMP_NUM_THREADS=8", "KMP_AFFINITY=verbose,granularity=fine,compact,1,0", "KMP_BLOCKTIME=20", "MKL_NUM_THREADS=8"]' Occlum.json)" && \
|
||||||
|
@ -19,8 +19,10 @@ cd occlum_instance
|
|||||||
if [ ! -L "image/bin/python3" ];then
|
if [ ! -L "image/bin/python3" ];then
|
||||||
rm -rf image
|
rm -rf image
|
||||||
copy_bom -f ../tensorflow_training.yaml --root image --include-dir /opt/occlum/etc/template
|
copy_bom -f ../tensorflow_training.yaml --root image --include-dir /opt/occlum/etc/template
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "5400MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size = "512MB" |
|
.resource_limits.user_space_max_size = "5400MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size = "1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size = "512MB" |
|
||||||
.resource_limits.max_num_of_threads = 64 |
|
.resource_limits.max_num_of_threads = 64 |
|
||||||
.env.default += ["PYTHONHOME=/opt/python-occlum", "OMP_NUM_THREADS=1"]' Occlum.json)" && \
|
.env.default += ["PYTHONHOME=/opt/python-occlum", "OMP_NUM_THREADS=1"]' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
@ -54,8 +54,10 @@ function build_tf_instance()
|
|||||||
# In our case, client and server use the same sign-key thus also the same mrsigner
|
# In our case, client and server use the same sign-key thus also the same mrsigner
|
||||||
occlum build
|
occlum build
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "7000MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
.resource_limits.kernel_space_heap_size="384MB" |
|
.resource_limits.user_space_max_size = "7000MB" |
|
||||||
|
.resource_limits.kernel_space_heap_size="1MB" |
|
||||||
|
.resource_limits.kernel_space_heap_max_size="384MB" |
|
||||||
.process.default_heap_size = "128MB" |
|
.process.default_heap_size = "128MB" |
|
||||||
.resource_limits.max_num_of_threads = 64 |
|
.resource_limits.max_num_of_threads = 64 |
|
||||||
.metadata.debuggable = false |
|
.metadata.debuggable = false |
|
||||||
@ -105,7 +107,8 @@ function build_server_instance()
|
|||||||
.sgx_mrs[0].mr_signer = ''"'`get_mr tf mrsigner`'" |
|
.sgx_mrs[0].mr_signer = ''"'`get_mr tf mrsigner`'" |
|
||||||
.sgx_mrs[0].debuggable = false ' ../ra_config_template.json > dynamic_config.json
|
.sgx_mrs[0].debuggable = false ' ../ra_config_template.json > dynamic_config.json
|
||||||
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "500MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "500MB" |
|
||||||
.metadata.debuggable = false ' Occlum.json)" && \
|
.metadata.debuggable = false ' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
|
@ -13,7 +13,8 @@ function build_instance() {
|
|||||||
mkdir occlum_$postfix
|
mkdir occlum_$postfix
|
||||||
pushd occlum_$postfix
|
pushd occlum_$postfix
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "500MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1MB" |
|
||||||
|
.resource_limits.user_space_max_size = "500MB" |
|
||||||
.metadata.debuggable = false' Occlum.json)" && \
|
.metadata.debuggable = false' Occlum.json)" && \
|
||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user