Coder Social home page Coder Social logo

pilipets / cold-objects-detection-openj9 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 7.05 MB

Identifying "cold" (rarely accessed) objects and/or memory ranges in the JVM heap ("temperature measurement")

License: MIT License

Java 0.31% Shell 0.17% Jupyter Notebook 98.62% Python 0.90%
memory-management openj9 cold-objects-identification

cold-objects-detection-openj9's Introduction

Cold-Objects-Detection-openj9

The long-term goal of this project is to reduce the memory cost of running Java applications in consolidated cloud environments.
The current project goal is identifying "cold" (rarely accessed) objects and/or memory ranges in the JVM heap ("temperature measurement").

State of the problem:

Analysis of the existing papers, the approaches they used along the results achieved - Research_JVM.pdf

Implementation in the Java interpreter only(-Xint) - without JIT compiler involved

Non-array objects: adding accessCount fields as hidden fields(like monitors) into the layout of the objects, counting each put/get/unsafe field accesses.
Array objects: adding accessCount fields into the object headers. Currently, those don't work correctly in all the cases.

All the stats like access counters/age/size/ptr are collected on GC cycles - the time period between two GC cycles is more than N seconds or more than N GC cycles passed.
Treat the first 4 bits of access counters as age(0-15) and the remaining 28 as access counters.

Picked dacapo benchmark sunflow/h2 workloads - https://github.com/dacapobench/dacapobench.

Took https://github.com/eclipse-openj9/openj9 and modified it to run with the changes above applied as https://github.com/Pilipets/openj9-omr/tree/research_jvm, https://github.com/Pilipets/openj9/tree/research_jvm.
More details regarding running the setup and dumps analysis are in the notes folder or the next chapter.

Post-results analysis

Visuals available at https://github.com/Pilipets/Pilipets-Cold-Objects-Detection-openj9/blob/master/scripts/results.ipynb
Clean code from ipynb - https://github.com/Pilipets/Pilipets-Cold-Objects-Detection-openj9/blob/master/scripts/results.py

There are 3 types of graphs:

  • histogram with total size of objects for bins with access counts;
  • age distribution of objects per bins above;
  • cumulative size of objects for a given access count and multiple ages;

Access count bin selection is the following - take 10 percentiles of the access count distribution, then split the last bin to take 10 more percentiles.
Did the snapshot dumps if the timing between two GC cycles is more than 5 seconds or more than 5 GC cycles passed.

PDF results can be viewed at https://github.com/Pilipets/Pilipets-Cold-Objects-Detection-openj9/blob/master/results/final_results/h2_no_decay.pdf

TODO:

Look for the TODO.md of the repo for the details and thoughts regarding the steps below.

  • Add more representative workloads;
  • Define object decay/coldness metric formula;
  • Implement the logic for JIT;
  • Measure performance overhead;

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.