Giter Site home page Giter Site logo

core.matrix.bench's Introduction

core.matrix Benchmark Scripts

A Makefile to benchmark core.matrix.

More concretely, this program spawns an AWS Ubuntu 14.04 cloud instance, prepare the environment (insalling Java, lein etc.) and run the core.matrix benchmarks, which are defined in the clojure.core.matrix.docgen.bench namespace (view code).

There are several configuration options (instance type, SSH keys and bucket name).

Example

http://core.matrix.bench-t2.large.s3-website-eu-west-1.amazonaws.com/

I ran the benchmarks using a t2.large instance.

Dependencies

  • awk version 20070501
  • perl v5.18.2
  • GNU Make 3.81

Clojure / Java is not included in the dependency list as you'd not require it on the machine running this Makefile. It is required in the instance running the test bench, but the script will handle the relevant installations.

Usage

Firstly, you will have to configure the following environment variables in your shell startup files (eg: zshrc for zsh, bashrc for bash).

The access key must belong to a user who can:

  • Create EC2 instances
  • Create S3 buckets
export AWS_ACCESS_KEY_ID='AWS_ACCESS_KEY_ID'
export AWS_SECRET_ACCESS_KEY='AWS_SECRET_ACCESS_KEY'
export AWS_DEFAULT_REGION='AWS_DEFAULT_REGION'

Then, you may start running the various make scripts.

cd /path/to/bench/mark/repo

# 1. Configure the ssh keys, instance types and bucket name
make configure

# 2. (Optional) If you want to benchmark your results in a public domain, run
# the following
make public

# 3. Run the benchmark! This will generate a file called instance.json
# It contains the output of running aws ec2 run-instances
# That json file is not used in any of the scripts
# The instance will run for at least a few hours. You can safely
# let it run on its own - it will terminate once the benchmark is done.
make

# 4. When the benchmark finishes, you can view it easily by: (Assuming it is public)
make view

Configuration

Option Description
Instance type The type of instance. Refer AWS docs for more information about the type of instances available. Note: If you are benchmarking a GPU implementation, you'd need to spawn an instance which supports GPU.
Key Pair A pre-configured SSH key pair in AWS S3 for you to access the instance while it is running the test bench.
Bucket name The name of the bucket where the information will be stored.

Testing

This script has been tested on a Darwin machine.

Todos

  • Some way to track the progress of the benchmark (a way to "tail" the standard output and standard error of the script)
  • Some fallback mechanism in case the server fails to send the results to S3. Eg: we would not want to terminate in that case.
  • Some way to patch some other benchmark in (eg: the results from benchmarking numpy / vanilla Java etc.) the reports
  • A better access key management scheme (AWS specifically discourages the usage of permanent keys)
  • A better way to manage configurations. Right now, instance-type, key pair and bucket names are stored in .txt files. (I am comfortable with that, but there just might be a better way.)
  • Rewrite perl scripts in awk (Some Unix distros (eg: FreeBSD) do not ship perl)
  • Rewrite the scripts to be sh-friendly, so that it runs happily on distros like FreeBSD. Right now it is only bash friendly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.