Coder Social home page Coder Social logo

Comments (8)

brian-bates avatar brian-bates commented on May 4, 2024 1

We could probably get the best of both worlds (free shared hardware + short runs) by normalizing the run with a fixed control. For example, say that our control takes 5 seconds to run on ideal hardware. Suppose we then run the benchmark on shared hardware alongside the control and it takes 10 seconds. We can then normalize the benchmark by multiplying by current_execution_time / execution_time_on_ideal_hardware or 10 seconds / 5 seconds. What do you guys think?

from sanic.

ludovic-gasc avatar ludovic-gasc commented on May 4, 2024

I'm fully agree for this idea, but, the main issue is travis-ci: Based on my experience to validate techempower framework benchmarks, I never have two times the same timing between each run, even if I change nothing, because the tests run in a container, executed in a VM: You can't predict the load average of others containers and VMs.

To have a predictable test, you need to use hardware without virtualization and follow the good practices from @Haypo with perf: http://perf.readthedocs.io/en/latest/
Moreover, you need to test always on the same hardware, to enable you to compare between two executions.

Is it a travis-ci like service proposes a service like that ?

from sanic.

channelcat avatar channelcat commented on May 4, 2024

Agreed, we need a standard way of doing this. My tests on AWS are not stable and involve me running them over a long period of time until I get consistent results. Even the m4 instances which aren't supposed to burst fluctuate in performance about 1-3k req/sec.

It seems to me like we have 2 options:

  1. Dedicated hardware - Currently AWS charges $2/hr + fees for dedicated hardware. Unless we can come up with a cheaper solution, I think we'd have to resort to running it less often. Maybe once a week or before releases.
  2. Shared hardware + long-running tests - Since we're just looking for relative difference in speed between 2 branches, we could just run the tests and compare averages/best run/top percentile results (whichever is most telling). My guess is we'd have to run tests for about 5 minutes to get some consistent results. This may not be that bad, but would definitely be annoying to wait for if the committer is relying on travis to check if if their pull request passed.

I'm inclined to go with option #2, unless there's a solution that lets us spin up dedicated hardware cheaply. What do you guys think?

from sanic.

ludovic-gasc avatar ludovic-gasc commented on May 4, 2024

option 2 seems to be more realistic.
Nevertheless, we might have a new business model just here to launch a new company ;-)
More seriously, it might be a question I could raise to PSF, because they have dedicated hardware to test and benchmark CPython. I'll try to take the temperature.

from sanic.

katlol avatar katlol commented on May 4, 2024

@channelcat you can use Scaleway.com for cheap dedicated hardware; they have €3/month ARM dedicated servers (basically a hosted RPi alternative), or the cheap dedicated servers offered by Kimsufi.com / Online.net.

from sanic.

jpiasetz avatar jpiasetz commented on May 4, 2024

profile (and cProfile) might be useful. Could look at changes in number of calls or percentage of time in sanic files relative to overall.

from sanic.

seemethere avatar seemethere commented on May 4, 2024

@brian-bates I definitely think that, that idea maybe mixed with @jpiasetz idea could really be helpful for completing this.

from sanic.

sjsadowski avatar sjsadowski commented on May 4, 2024

Closing due to no follow-up in 2 years. There are discussions on benchmarking in the current community forums (https://community.sanicframework.org)

from sanic.

Related Issues (20)

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.