Git Product home page Git Product logo

docker's Introduction

Docker Memory Test

Docker Memory Test is a Java Application for test memory inside a Docker container

After starting, the program consumes memory, simulating the work until it runs out.

Installation

Use Docker hub:

docker pull wmgpznj4/mem-test
Or use Maven command to build a jar file and to create a docker image:
mvn clean package

Usage

simple run image:
docker run wmgpznj4/mem-test
or run with memory and CPUs limitations:
docker run --memory=100m --memory-swap=100m --cpus 2 wmgpznj4/mem-test
Show how memory usage increases:
docker stats

For example

With JVM parameters in the Dockerfile:

-XX:+UseContainerSupport -Xmx10g -Xms10g

type in bash:
docker run --memory=100m --memory-swap=100m --cpus 2 wmgpznj4/mem-test
output:
System resources available to the JVM
Total available processors(CPUs): 2
Total available memory: 100 mb
Total used memory: 9898 mb
Maximum reserved memory: 9898 mb
Free memory: 9680 mb

Total system processors(CPUs): 6
Total system memory: 16007 mb
Total system used memory: 5379 mb
Total system free memory: 5131 mb
Total system shared memory: 191 mb
Total system buff/cache memory: 5496 mb
Total system available memory: 10132 mb
Total system swap: 2046 mb
Total system used swap: 0 mb
Total system free swap: 2046 mb
Total system shared swap: 0 mb
Total system buff/cache swap: 0 mb
Total system available swap: 0 mb
File system root: /
Total space: 184 gb
Free space: 169500 mb
Usable space: 159836 mb 
docker stats
CONTAINER ID   NAME              CPU %     MEM USAGE / LIMIT   MEM %     NET I/O      BLOCK I/O   PIDS
0fe0b7a59fe7   objective_brown   4.87%     55.09MiB / 100MiB   55.09%    2.8kB / 0B   0B / 0B     16

docker's People

Contributors

lozitsky avatar

Watchers

James Cloos avatar  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.