increase execution time, lift cpu cap, updated docs

This commit is contained in:
Brian Seymour 2018-09-21 23:42:27 -05:00
parent 35ddde0106
commit eec7ec26fa
9 changed files with 10 additions and 14 deletions

View File

@ -1,10 +1,5 @@
#!/usr/bin/env bash
#docker run --rm -it piston /usr/bin/python -V
#docker run --rm -it piston /usr/bin/python3 -V
#docker run --rm -it piston /usr/bin/ruby --version
#docker run --rm -it piston /usr/bin/nodejs --version
dir="$( cd "$( dirname "$0" )" && pwd )"
if [ -z "$1" ]; then
@ -51,7 +46,6 @@ esac
docker run \
-m 64m \
--network none \
--cpus=".2" \
--rm \
--log-driver none \
-v $filepath:/$file:ro \

View File

@ -1,4 +1,4 @@
#!/bin/sh
gcc -o binary -x c $1
timeout -s KILL 2 ./binary
timeout -s KILL 3 ./binary

View File

@ -1,4 +1,4 @@
#!/bin/sh
g++ -o binary -x c $1
timeout -s KILL 2 ./binary
timeout -s KILL 3 ./binary

View File

@ -6,4 +6,4 @@ go build $file
file=${file%%.*}
timeout -s KILL 2 ./$file
timeout -s KILL 3 ./$file

View File

@ -1,3 +1,3 @@
#!/bin/sh
timeout -s KILL 2 nodejs $*
timeout -s KILL 3 nodejs $*

View File

@ -1,3 +1,3 @@
#!/bin/sh
timeout -s KILL 2 python2 $*
timeout -s KILL 3 python2 $*

View File

@ -1,3 +1,3 @@
#!/bin/sh
timeout -s KILL 2 python3.6 $*
timeout -s KILL 3 python3.6 $*

View File

@ -1,3 +1,3 @@
#!/bin/sh
timeout -s KILL 2 ruby $*
timeout -s KILL 3 ruby $*

View File

@ -38,7 +38,9 @@ various privilege escalation, denial-of-service, and resource saturation threats
#### Performance
One thing that needs investigation is how to spawn containers faster. The Docker daemon is synchronous in its
container spawning. This means the bottleneck for code execution is how fast containers can start. Environments
vary, but, in ours they start at a rate of no more than 1 per second.
vary, but, in ours they start at a rate of no more than 1 per second. One possibility is Docker in Docker where by
X number of containers stay running all the time and then requests are delivered to each in a round robin and spawn
new Piston containers.
#### License
Piston is licensed under the MIT license.