You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking at setting up an AWS environment (spun up on demand only) that will run tests in a fast and automated fashion, using my personal Jenkins host to trigger it when commits are pushed.
Work progress:
Create an r3.large instance with ephemeral storage and assigned benchmarking-specific IAM role
Create setup script that installs docker, xz, git, starts docker, and pulls the ubuntu-16 allthelanguages docker image
Create and attach policy to IAM role for benchmarking that allows read of the dataset S3 bucket, and write of the results bucket
Compress huwiki, huwikisource, cleaned huwiki with xz -9 (smallest size) and upload to new S3 buckets (data is a private bucket, benchmark results is initially private, but later public).
Add script commands to setup script that will download data from S3 and decompress it
Set the AWS host to use ephemeral (instance) storage for /tmp folder
Create scripting to grab instance + package info to metadata file
Git hash used in build
Timestamp
Host type, from aws cli
Hash of input file
Timeouts and resource limits on individual runs (Node.js for example hung on the instance, and needed to be manually killed, another one ran out of RAM and broke the Docker session)
Create scripting to name results by run/host info individually
Jenkins: job to run tests (inside a resource-limited container) against main wordcount branch + PRs
Jenkins - role or similar to allow control of benchmarking host?
Public view-only access to builds now enabled on dynamic.codeablereason.com/jenkins
HTTPS access added to dynamic.codeablereason.com (with LetsEncrypt)
Enforce HTTPS for all but badges/static resources on Jenkins (for performance/access reasons)
Enable limited-access users for wordcount use
Jenkins - job to fire benchmarks (github triggering)
Hardware/specs:
Storage: use SSD instance storage to benchmark (limits instance types). General purpose EBS SSD storage is generally slower and would run out of I/O credits after 1/2 hour (benchmarks need several hours).
Memory: either 7 GB (small datasets or where memory is not needed) or 15 GB (large or high-memory datasets).
CPUs: 2 or 4 core.
Instance types: m3.large (2-core, 7. 5GB RAM) for the small datasets, and r3.large (2-core, 15.25 GB ram) for big. If we do lots of parallelized implementations, add m3.xlarge (4-core, 15 GB RAM).
Cost: I am not spending more than $10-15/month on it, beyond my existing Jenkins host (reserved t2.micro) and domain/S3 hosting. Instances will be created to run a set of benchmarks and then terminated, with frequency to keep costs within limits.
Architecture:
Instances are spun up by my Jenkins host, with an appropriate IAM role or credentials to do this in a limited way.
Benchmark datasets will be self-hosted to not hit their sources hard. They won't be fully public unless small.
Instance gets an IAM role that allows uploading to a public (?) S3 results bucket.
Instance runs benchmarks on instance storage
Instance will upload each result to the S3 bucket as it completes, stamped with the git commit hash, timestamp run, language, etc.
All testing will use a reasonable timeout for both individual tests and the whole test set, if it hangs it is killed or skipped.
All testing uses the docker image, for reproducibility across hardware.
Two options for how to set it up:
EBS based & on-demand instaces:
Use an EBS volume containing benchmark data and preconfigured system, and just start/stop the instance.
When run, the git repo is cloned, the dataset is copied to the data folder, and tests are run & uploaded.
Easier to set up and run, but more expensive.
S3 based/spot instances:
cheaper (1/4 the instance price) but more maintenance.
Submit spot bids, instances are configured using the "user data" field to submit a startup script which sets up and runs benchmarks.
Private S3 buckets host compressed corpus data, these are fetched and decompressed.
Open questions:
What to use for controlling instances?
AWS CLI is easy
Jenkins AWS EC2 plugin will spin jenkins agents in EC2 (far easier to generate and report results from this), but comes with performance overheads
Ansible is kind of amazing and easy to work with
Yesterday I had good results tinkering with a spot-purchased c3.large instance for benchmarking, doing all I/O to the /media/ephemeral0 instance store. Pricing was only about $0.04/hour for the spot buy (purchased at 2x current spot price to prevent it being terminated after exceeding the price).
I am looking at setting up an AWS environment (spun up on demand only) that will run tests in a fast and automated fashion, using my personal Jenkins host to trigger it when commits are pushed.
Work progress:
Hardware/specs:
Architecture:
Two options for how to set it up:
Open questions:
Yesterday I had good results tinkering with a spot-purchased c3.large instance for benchmarking, doing all I/O to the /media/ephemeral0 instance store. Pricing was only about $0.04/hour for the spot buy (purchased at 2x current spot price to prevent it being terminated after exceeding the price).