Skip to content

pepsi7959/tsunami

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tsunami

It's load generator platform designed to test performance of system. In case of tuning system or finding limitation of a system, we need a comfortable and stable tool. It've been developed by Golang, which uses less memory footprint.


System Architecture

There are three components.

  1. Web Control, It's rich and simple user interface which helps an user to control Tsunami. It provides several commands including start, restart, stop, metrics and so on.
  2. Ocean, It's master node that be used to receive command from an user and control Tsunami(woker node)
  3. Tsunami, It's worker node that generates load requests to target

Ocean Blueprint(Master node)

Tsunami Blueprint(Worker node)

Prerequisite for a client

For linux, there are limitations or security that must be unlocked before testing, such as open file, tcp_fin_timeout, tcp_tw_recycle and tcp_tw_reuse

  • Open file ,

    check number of open files by using ulimit -n

    setting open files

    ulimit -n 65536

    Setting open files permanently

    open /etc/security/limits.conf add add the below config.

    *               soft    nofile           65536
    *               hard    nofile           65536
  • tcp configuration

    checking config

    cat /etc/sysctl.conf |grep "net.ipv4.tcp_fin_timeout"
    cat /etc/sysctl.conf |grep "net.ipv4.tcp_tw_recycle"
    cat /etc/sysctl.conf |grep "net.ipv4.tcp_tw_reuse"

    setting tcp configuration

    echo 5 > /proc/sys/net/ipv4/tcp_fin_timeout
    echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
    echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
    

    Note: Not recommend for server side


Installation

  • Prerequisite for building Tsunami

    apt install make
    
    cd /tmp
    wget https://dl.google.com/go/go1.11.linux-amd64.tar.gz
    
    sudo tar -xvf go1.11.linux-amd64.tar.gz
    sudo mv go /usr/local
  • Setting Environment

    export GOROOT=/usr/local/go
    export GOPATH=$HOME/go
    export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
    
    
  • external library

    go get github.com/valyala/fasthttp
    
  • source code check out source from github.com

    git clone https://github.com/pepsi7959/tsunami.git
  • build

    cd tsunami/clients
    make && make install
  • set ENV

    vim ~/.bash_profile
    # if /user/local/bin doesn't exist, than add the /usr/local/bin to .bash_profile
    export PATH=/user/local/bin:$PATH
  • run

    tsunami --url [url]

Features

  • Realtime Monitoing, There monitoring channel to monitor real-time statistics.
  • Stand Alone, Use only single binary.
  • master node, The master will control all of the workers.
  • Independently scaling workers, The workers, which are cloud sources, will be scaling independently.
  • Support various protocols, The protocols includes http/https and ldap.