Giter Site home page Giter Site logo

memory-consumption's Introduction

memory-consumption

Simple simulation of memory-intensive programs to perform frequent memory operations.

Memory operations with 1 : 1 read-write ratio. mem_cons_type_one is an operation on a double type array of size n, and mem_cons_type_two is a memory operation on a buffer of size n. When some machines run mem_cons_type_one across numa nodes( For example, the cpu core is in numa 0 and the memory is in numa 1), the read-write ratio of memory operations may not be 1:1. It may be a problem caused by the architecture of the machine.

The cpu core distribution in numa nodes of different machines may be different, and the numa_node_cpu array in the code needs to be changed.

You can use Intel's PCM to check memory consumption:

sudo pcm-memory

Compilation

make

Running

./mem_cons_type_one -h
Usage: 
 -s   <array_size>  array size, default is 100000000
 -t   <threads>  number of threads, default is 1
 -nt  <numa_of_threads>  numa of threads, default is 0
 -nm  <numa_of_memory>  numa of memory, default is 0
 -h   display the help information

./mem_cons_type_two -h
Usage: 
 -s   <buf_size>  buffer size, default is 104857600
 -t   <threads>  number of threads, default is 1
 -nt  <numa_of_threads>  numa of threads, default is 0
 -nm  <numa_of_memory>  numa of memory, default is 0
 -h   display the help information

memory-consumption's People

Contributors

huangxiaok 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.