Learning-based memory allocation for C++ server workloads summary

  1. assign each active huge page with lifetime classes, seperated by at least an order of magnitude. So we can give a prediction of the lifetime of allocation object.
  2. huge page management.
    each page has 3 states: open, active, free. The first allocation into a huge page makes it open and determines its LC and the allocation of the following object on this page will have the same LC.
    each page is divided into multiple blocks 8kb size.
  3. limiting fragmentation by recycling blocks.
    prefers to use free blocks from a longer-lived active huge page. because if the predicator is accurate or overestimates the lifetime class, the program with high probability will free shorter-lived objects onrecycled blocks before it frees residual blocks with the same LC as the huge page. the allocator may reuse these blocks many times while the longer lived objects on the huge page are in use, reducing the maximum heap footprint. If the predicator underestimates lifetime, the objects will have more time to be freed.
  4. tolerating prediction errors.
    llama tolerates mispredictions by tracking block and huge page lifetime using deadlines. It promotes huge pages with under-predicted objects lifetime to the next longer LC and huge pages with over-predicted objects to the next shorter lifetime class.
  1. any good points
    shed some light on how to integrate ML method into the memory allocation algorithm to reduce memory fragmentation. How we can tolerate misprediction.
    based on the frequency of access of the KV pair in the LSM tree. when we do KV substitution in the merging process. we can use neural network to help us determine which one will be move down to the next level? naive and make no sense.
  2. any shortages
    we can use some other ML methods to do the prediction. like GCN to capture graph information.

--

--

--

master of SYSU, do research on computer system software

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

DS & A Series — Graphs, BFS, DFS: Implementation & Insights

Elements of a graphical dweet: d/23835

Abstract image with two vertical blue stripes surrounded by pink-purple and greenish white. There is a roughly hexagonal white shape in the middle, surrounded vertically by pink-purple bowtie shapes. The white-and-purple pattern is partially repeated on either edge.

From APIStrat to ASC: A New Chapter in API Community Building

Augmentors prelude — Part 5 — The Grid — community update, June 15th 2018

A-Z of Database Transactions (Part-2)

Learning Flutter….

Go Deep on iOS Packet Analysis

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
BilyZ

BilyZ

master of SYSU, do research on computer system software

More from Medium

Quick Tips #1: How to obtain environment information using PyTorch

Dive into basics of GPU, CUDA & Accelerated programming using Numba in Python

Predict material properties from an image using a neural net in 50 lines of code with Pytorch