Giter Club home page Giter Club logo

async-file-benchmark's Introduction

async-file-benchmark

⚠ WARNING: UNMAINTAINED PROJECT ⚠

This project is no longer maintained. In addition to the caveats listed below, it has not been updated for the latest versions of packages and has some known problems such as #6.

Preface

This benchmark should not be used as-is as a performance comparision between async-std and tokio. It was designed to highlight certain pathological cases and does not reflect a realistic or recommended usage pattern.

There are several issues with using this as a direct comparative benchmark:

  • The number of tasks and buffer size are unrealistic, and adjusting them can affect results dramatically.
  • It uses default configurations of both libraries. These default configurations might not actually be suitable for this workload, and even under default operating system configurations this benchmark will not run.

The benchmark is most useful for tracking changes in executors, e.g. "did change X really improve Y, as measured by this benchmark", and as a stress test.

Setup

You'll need a file.dat. For example, 256KiB of random data:

dd if=/dev/urandom of=file.dat count=256 bs=1024

You will probably need to raise your open files limit to run this:

ulimit -n unlimited

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

async-file-benchmark's People

Contributors

frol avatar jebrosen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

async-file-benchmark's Issues

Running on Mac OS X tests panic

Running on OSX 10.15.1, initially tests were failing:

thread 'main' panicked at 'failed to time: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:1165:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

after creating file.dat via touch file.dat tests failing complaining on too manu open files. I had to change system parameters to fix that:

ulimit -S -n 10000

The benchmark is inconsistent

Hey, I have just swapped the order of executions (async-std goes first and tokio is second):

runtime         time per
async-std       6.134
tokio           3.256

async-std is now twice as slow. Yet, when I run it in the order it is in this repo:

runtime         time per
tokio           4.094
async-std       1.138

I have isolated tokio and async-std (commented away one of the two) and run separately:

runtime         time per
tokio           4.026
runtime         time per
async-std       5.345

I have even caught an outlier once with async-std:

runtime         time per
async-std       8.808

My environment:

  • Arch Linux x64
  • CPU: Intel Core i7-4710HQ
  • rustc 1.39.0 (4560ea788 2019-11-04) (I have also tested with Nightly 1.40.0 from 2019-11-05)
  • SSD Samsung MZ7TE512HMHP
  • File 256kb (generated as stated in the README)

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.