Giter Site home page Giter Site logo

idlememstat's Introduction

idlememstat

This is a simple utility for estimating idle memory size. A memory page is considered idle if it has not been accessed for more than the given amount of time. Knowing a workload's idle memory size can be used for estimating its working set size (wss).

idlememstat will scan memory periodically, count pages that has not been touched since the previous scan, and print this information to stdout. To ease estimating the idle memory size of a particular workload, this information is gathered and reported per memory cgroup so that one can put the workload of interest to a memory cgroup and filter the output of idlememstat accordingly. To avoid CPU bursts, each scan performed by idlememstat is evenly distributed in time.

Note, idlememstat does not consider unused mlocked pages as idle.

Prerequisites

  1. Linux kernel with CONFIG_IDLE_PAGE_TRACKING set (4.3+ required)
  2. g++ with c++11 support
  3. python-2.7 + devel package
  4. memory cgroup controller must be mounted under /sys/fs/cgroup/memory (this is what systemd normally does)

Installation

python setup.py install

Usage

idlememstat [delay]

delay (equals 300 if omitted) is time, in seconds after which a page will be considered idle if not accessed by a userspace process.

Output format

Example:

cgroup                   total      idle      anon anon_idle      file file_idle
/                       166436    117720     78772     51728     87664     65992
/test                   114072     85084      5152         0    108920     85084
/                       166488    158916     78824     63596     87664     95320
/test                   114072    114072      5152      5152    108920    108920
  • cgroup - relative path to memory cgroup
  • total - user memory size, in kB
  • idle - idle user memory size, in kB
  • anon - anonymous memory size, in kB
  • anon_idle - idle anonymous memory size, in kB
  • file - file memory size (both mapped and unmapped), in kB
  • file_idle - idle file memory size (both mapped and unmapped), in kB

idlememstat's People

Contributors

carverdamien avatar

Watchers

 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.