GithubHelp home page GithubHelp logo

autotune.docker's Introduction

autotune.docker

๐Ÿ”ง autotune is a MUST HAVE (2MB) system tuner for ALL your docker hosts

Sceptic? See it with your own eyes:

rancher-host-stats-autotune-launch

# The image upwards showns stats from one host while receiving a deployment
# of the autotune.docker. Here is the configuration used on the deployment:

# docker-compose.yml 
autotune:
  environment:
    docker_remove_containers: '0'
    docker_remove_images: '1'
    net__ipv4__tcp_fin_timeout: '30'
    net__ipv4__tcp_max_orphans: '40000'
  tty: true
  image: cusspvz/autotune:1.1.1
  privileged: true
  volumes:
  - /var/run/docker.sock:/var/run/docker.sock
  stdin_open: true
  net: host

Most Linuxes available over there aren't tuned to be high performance network servers, thats why every tech company needs an Ops or Sysadmin guy.

Well, this docker image won't replace that role on your company, but will make Ops easier for those who work with Containers and lots, Lots or LOTS of machines!

What does it do?

It has built-in configurable tuners that handles minor settings, such as:

  • CACHE - drops kernel's cache
    • Linux ate your RAM? This reduces linux fs cache footprint
    • This isn't One Shot, it will act every 60 secs (interval also configurable)
  • TCP - sets up best tcp settings for high performance servers
    • Replaces hand sysctl ... configurations
    • Tunes settings every hour
    • This isn't One Shot, it will act every hour (interval also configurable)
  • Docker
    • Removes all images that are not being used. Option enable by default docker_remove_images=1 in Dockerfile
    • Removes all stoped containers. Option enable by default docker_remove_containers=1 in Dockerfile.
    • Removes all dangling volume. Option enable by default docker_remove_volumes=1 in Dockerfile.

Deploying

docker run -d \
    --privileged \ # to tune kernel settings
    --net host \ # to tune host network
    --volume /var/run/docker.sock:/var/run/docker.sock \
    cusspvz/autotune

FAQ

###ย I'm getting an error stating the docker Cli and the API have different versions.

You can set the DOCKER_API_VERSION with the running API server and it should work fine.

Motivation

During our firsts cluster deployments we encountered various issues regarding providers (Azure and AWS) default Linux configurations.

Since isn't handy to do those kind of jobs, I've decided to create something easy to manage over Environment Variables.

Plans for the future

It would be nice to have automation based on server's current state.

Developing

make test

autotune.docker's People

Contributors

fernandoneto avatar franciscofsales avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

autotune.docker's Issues

repo image gives errors

Using the run command line, the container fails with
{"log":"/tunesys/run: .: line 2: common: not found\n","stream":"stderr","time":"2020-09-23T16:21:26.672268281Z"}

docker run -d --privileged --net host --volume /var/run/docker.sock:/var/run/docker.sock cusspvz/autotune
eced9cbcc88dfd49175b57f76740a0f9095b3ca3bbeb29ea164bbea2f4c3dadc

Doesn't work always work out of the box

I really liked the idea behind this project and tried it out "as is" on our Jenkins build server under actual production work load. Some tests all of a sudden started failing; some test cases with assertion errors and some with tcp connection reset errors.

Some tuning is necessary before using it.

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.