RubyBench was born out from Sam Saffron's call for a long running Ruby benchmark.
Ruby Scripts: https://github.com/ruby/ruby/tree/master/benchmark
Discourse Scripts: https://github.com/discourse/discourse/tree/master/script
The scripts are executed in a bare metal server using Docker containers to ensure consistent results. To view how the scripts are executed, head over to https://github.com/ruby-bench/ruby-bench-docker.
Our current bare metal server is sponsored by the team over at RubyTune.com.
All benchmarks are run on a bare metal server in order to achieve consistent and repeatable results. We will not publish CPU results gathered on virtual hosts where we can not control our CPU allocation. The only results published are run on production level bare metal servers.
The bare metal server is purchased from Hetzner Online and has the following configurations:
System | Type Component |
---|---|
Operating System | Ubuntu-1404-trusty-64-minimal |
RAM | 4 x 8GB Micron ECC, Part Number: 18KSF1G72AZ-1G6E1 |
Processor | 3.6GHz Intel® Xeon® E3-1270 v3 Quad-Core Haswell incl. Hyper-Threading Technology |
Hard Drive | 2 x Samsung SSD 845DC EVO - 240 GB - 2,5" SATA III |
Motherboard | Intel Coporation S1200RP |
- PostgreSQL 9.x in order to enable the hstore extension.
- Redis
- PhantomJS
redis-server
# Make sure that the current user has a Postgres account
# If not run : sudo -u postgres createuser <username> -s
bundle exec rake db:setup
unicorn -c config/unicorn.rb
Install PhantomJS
Note: you can use directory other than $HOME
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $HOME/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar -xvf $HOME/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $HOME/phantomjs
export PATH=$HOME/phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
# Check version installed
phantomjs -v
redis-server
bundle exec rake test
Discuss features and direction of project: http://community.rubybench.org
This section describes how to operate the server hosting this application.
Use Admin Console:
https://rubybench.org/admin/repos/ruby
Pattern: "all" is replaced with "", and any other string can filter benchmarks.
docker exec -it [container-id] sudo -E -u rubybench bundle exec rake oneshot:xxx
docker exec -it [container-id] sudo -E -u rubybench bundle exec rails c
docker exec -it [container-id] bash -c 'redis-cli KEYS "charts:*" | xargs redis-cli DEL'
docker exec -it [container-id] sudo -E -u postgres bash -c "pg_dump rubybench_production > /tmp/dump.sql"
docker cp [container-id]:/tmp/dump.sql /tmp/dump.sql
zip /tmp/dump.zip /tmp/dump.sql
scp ruby-bench-server:/tmp/dump.zip /tmp/dump.zip
unzip /tmp/dump.zip -d /
bundle exec rake db:drop db:create RAILS_ENV=development DISABLE_DATABASE_ENVIRONMENT_CHECK=1
cat /tmp/dump.sql | psql -U rubybench ruby-bench-web_development
/var/docker/launcher rebuild rubybench
git push origin master:production
and wait for TravisCI...