Code Monkey home page Code Monkey logo

benchmarking's Introduction

Role Name

This roles uses various tools for benchmarking linux system for cpu, memory ,iops, network io

Requirements

Ubuntu

Role Variables

All configured variable are define in vars/main.yml.

Dependencies

ansible and package defined in playbook

IOPS Benchmarking:

For IOPS benchmark we are using fio and sysbench tool to calculate the Input/Output operation par second,

Following basic command used and this will create a 4 GB file, and perform 4KB reads and writes using a 75%/25% (ie 3 reads are performed for every 1 write) split within the file, with 64 operations running at a time. The 3:1 ratio is a rough approximation of your typical database. You can change it as per your need.

fio -randrepeat=1 -ioengine=libaio -direct=1 -gtod_reduce=1 -name=test -filename=test -bs=4k -iodepth=64 -size=10M -readwrite=randrw -rwmixread=75 --group-reporting

We can change file size, block size,read write ratio from ansible configurable parameters.

IOPS_FILESIZE: 10M IOPS_RW : 75

CPU Benchmarking:

For Cpu benchmark we are using sysbench and openssl speed commad

When running with the CPU workload, sysbench will verify prime numbers by doing standard division of the number by all numbers between 2 and the square root of the number. If any number gives a remainder of 0, the next number is calculated.Following command is used

sysbench --test=cpu --cpu-max-prime=20000 --num-threads=2 run

We can change cpu max prime parameter from ansible configurable parameters.

CPU_PRIME: 2000

While benchmarking cpu though openssl speed rsa commmand

Memory Benchmarking:

For memory benchmark we are using sysbench command

When using the memory workload, sysbench will allocate a buffer (provided through the --memory-block-size parameter, defaults to 1kbyte) and each execution will read or write to this memory (--memory-oper, defaults to write) in a random or sequential manner (--memory-access-mode, defaults to sequential).

sysbench memory --memory-block-size={{MEM_BLK_SIZE}} --memory-total-size={{MEM_TOT_SIZE}} --memory-access-mode={{MEM_ACC_MODE}} --threads={{ansible_processor_vcpus}} run

We can change memory block size ,memory total size, memory access mode from ansible configurable parameter

MEM_BLK_SIZE : 4K

MEM_TOT_SIZE : 100M

MEM_ACC_MODE: rnd

Network Benchmarking:

Netperf is a benchmark that can be used to measure various aspects of networking performance. Currently, its focus is on bulk data transfer and request/response performance usingeither TCP or UDP, and the Berkeley Sockets interface.Other tool we can use are iperf

Following command is used to find the network performace of local network transfer.

netperf -c -f G

We can change Output unit in following format

NET_UNIT: G (Possible values are G|M|K|g|m|k)

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: server
  roles:
     - benchmarking

License

BSD

Author Information

An optional section for the role authors to include contact information, or a website (HTML is not allowed).

benchmarking's People

Contributors

rajeshm9 avatar

Watchers

 avatar

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.