Coder Social home page Coder Social logo

naive-ioping's Introduction

ko-fi

naive-IOping

This is a simple tool (and munin plugin) to measure HDD latency with high accuracy.

Features:

  • Direct I/O to bypass any caching (only on Linux (?))
  • clock_gettime(CLOCK_MONOTONIC, ...) for nano-second accuracy (depending on platform)
  • munin compatible output
  • no external dependencies

How it works:

Pretty simple stuff:

  • The tool sets up and aligns a hardcoded 1MB buffer
  • measures the current timestamp as described by clock_gettime(CLOCK_MONOTONIC, ...)
    • creates & opens a file for direct I/O
    • writes the buffer & closes the file
  • creates a second timestamp and displays the difference between the two (the elapsed time)

Configuring:

ioping.c offers minimal configuration using the #define's at the beginning of the file.

#define NUM_IOPING_RUNS 3 // number of times ioping writes to disk, results will be averaged
#define SLEEP_BETWEEN_RUNS 1 // in seconds
#define PING_PATH "/var/tmp/test.ping" // file path to write to

Using /tmp for PING_PATH is discouraged since some servers mount a ramdisk/tmpfs on that path.

Compiling:

I personally use CMake but you are free to use your own build system or directly invoke gcc:

mkdir build
cmake ..
make
# run with:
./ioping

Munin support:

Simply drop the binary in your plugins directory and restart munin-node:

cp -v ioping /etc/munin/plugins/
systemctl restart munin-node

Tips:

ko-fi

naive-ioping's People

Contributors

sharkyrawr avatar

Watchers

 avatar  avatar

naive-ioping's Issues

How to contact you?

Sorry this is unrelated to your native-ioping project, but I was wondering how I can email you? I am trying to build OBS for M1 but I cannot figure out how you did it? What files do I need to change to build the dependencies for Apple Silicon?

Thank you and sorry for hijacking a repo :)

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.