Docker and getting started with RubyBench

Hey, folks. I’ve made a few attempts at getting Rails Ruby Bench (GitHub - noahgibbs/rails_ruby_bench: A Rails-based benchmark for Ruby development) to run properly in RubyBench.org, and I’m now trying to buckle down and make it happen.

I’ve been mostly not using Docker properly for this, partly because I’m new to it, so I’m not sure what to do with a bunch of the errors I’m seeing. So, some questions:

  1. It looks like most of the Dockerfiles build based on “rubybench/ruby_releases_base:20170213.1”, and it looks like that isn’t pushed. So I basically need to build something named that and hope it’s similar enough, or I need to modify the Dockerfiles to use rubybench/ruby_releases_base:latest. I say it isn’t pushed because I can’t seem to pull it. Am I doing something wrong? I’ve also had that just fail to build, probably because of transient apt package problems, though it’s building again now. As I recall from long, painful Puppet and Vagrant experience, sometimes your upstream dependencies are just currently busted – and in the case of Ubuntu “apt-get update”, they’re also not effectively versioned. So if they’re currently broken you just lose.

  2. It looks like most people wouldn’t usually have this problem because they would use scripts/XXXX/releases.sh, which pulls an existing container which is built on rubybench.org or similar. That’s cool. And once my new container is working right, that should be fine for me too. But I’m guessing that means the intermediate containers (e.g. rubybench/ruby_releases_base:20170213.1) just don’t get pushed, since it’s assumed other people aren’t building containers. Is that right?

  3. ruby-bench-docker’s README.md is terrible about telling you what directory to be in for running the commands. I’m new enough to Docker that this was actually a significant obstacle for me, though I think I understand now – keeping in mind that if I’m completely wrong I wouldn’t know, because it’s expected that building the containers doesn’t work, since the required intermediate containers don’t exist.

These may be intentional – for instance, this keeps you from having to be Docker tech support, which would be totally fair.

But am I missing something major? Or doing something seriously wrong? I’m new to Docker, and I could believe these things are happening because of something I messed up.

2 Likes

So you want to have your suite run on rubybench bare metal server right?

Okay, then maybe the best way would be to make new directory and place your Dockerfile in ruby-bench-docker repo against which we can make further discussion (on pull request)?

If I am getting this correctly, suite is intended to run against specific Discourse version, specific Ruby version and specific Rails version. Therefore you want these three to be configurable – later we can make script which would run container by passing versions.

Once we have Dockerfile on ruby-bench-docker repo, we can easily push it to dockerhub and pull it on bare metal server for running.

Hope it helps,
Cheers :beer:

What I’m mostly trying to do right now is debug locally. The benchmark in question has a lot of configuration, and putting up a broken PR is a recipe for wasting a lot of your time with back-and-forth.

The Rails version is set by Discourse’s Gemfile. So mostly I’m looking to set up a current version of Discourse (right now 1.8.0beta13) and just run against Ruby versions as they come out to check for Ruby’s speed, as measured with Discourse.

Okay. I’ll play with the Dockerfile and use a latest build on my local machine, get it basically working and then submit a PR and we’ll figure it out from there.

Thanks!

1 Like