Giter Site home page Giter Site logo

uclasystem / midas Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 0.0 7.2 MB

Midas is a memory management system that efficiently and safely harvests idle memory for applications' soft state.

License: Apache License 2.0

Makefile 0.09% C++ 9.08% Shell 0.99% Python 29.44% C 56.99% CMake 1.26% Jupyter Notebook 0.42% SWIG 0.57% Roff 0.92% JavaScript 0.12% HTML 0.04% CSS 0.04% PowerShell 0.01% GDB 0.02%
cache memory-management operating-systems runtime-system

midas's Introduction

Midas

Status Build License

Midas is a memory management system that enables applications to efficiently and safely harvest idle memory to store their soft state (e.g., caches, memoization results, etc.). It frees the developers from the burden of manually managing applications' soft state and stores the soft state that is most beneficial to each application, thereby improving both application performance and memory utilization.

Midas currently supports C and C++ applications on Linux, with several real-world applications we have ported serving as practical references to demonstrate its simplicity and effectiveness. For technical details about Midas, please refer to the NSDI'24 paper.

Getting Started

System Requirements

Midas' code base assumes an x86-64 CPU architecture and the system is designed to run on Linux. Midas has been extensively tested on Ubuntu 18.04, 20.04, and 22.04, but it should also be compatible with other Linux distributions.

Dependencies

Midas is developed in C++ and requires compilers with C++ 17 support (std=c++1z). To deploy Midas, the following dependencies are required:

  • gcc (>= 11)
  • g++ (>= 11)
  • Boost (>= 1.79.0)

Compile Midas

We have provided a push-button script to build Midas:

./scripts/build.sh

The script will build the Midas library, the Midas coordinator (daemon), and all associated unit tests. This compilation typically completes within less than one minute.

Users can also build Midas manually:

# Midas C++ static library, Midas coordinator (daemon), and unit tests.
make -j

# Midas C library and bindings
cd bindings/c
make -j
make install # this will install the lib into bindings/c/lib

Compile Ported Applications

We have also ported several applications to Midas under the apps directory. We have also offered the apps/build_all.sh script for automated compilation.

cd apps/
./build_all.sh
# The compiled executables are under each application's directory, respectively.

Run

Before running any application, one needs to start the Midas coordinator on the host machine. The coordinator is responsible for managing the memory allocation and coordinate all running applications.

./scripts/run_daemon.sh
# Example terminal outputs:
# [kInfo]: Daemon starts listening...

By default, the Midas coordinator is configured to utilize all available memory on the server. This is recommended because it maximized the utility for applications. However, for users who wish to manage system resources more conservatively, there is an option to set a hard limit on the maximum memory capacity that Midas can harvest:

./scripts/set_memory_limit.sh <memory limit in MB>

With the Midas coordinator running, users can launch applications and take advantage of soft state. Below is an example of how to start a storage server application ported to work with Midas:

cd apps/storage
./setup_disk.sh  # Setup the disk to be served.
./storage_server

Users can run more applications following a similar process.

Repo Structure

Github Repo Root
├── apps        # Ported applications.
├── bin         # Compiled unit tests.
├── bindings    # Bindings for the other languages. Currently only C is supported.
├── config      # Configuration files for the Midas coordinator(daemon).
├── daemon      # Midas coordinator that runs as a daemon process.
├── exp         # Scripts and instructions to reproduce results in the paper.
├── inc         # Midas header files.
├── koord       # Midas coordinator kernel module.
├── lib         # Compiled Midas library.
├── LICENSE     # Midas is open-sourced under the Apache-2.0 License.
├── Makefile    # For building the Midas library and unit tests.
├── scripts     # Scripts to faciliate developing and using Midas.
├── src         # Midas source code.
└── test        # Unit tests for individual Midas components.

Contact

Please contact Yifan Qiao for any questions.

midas's People

Contributors

ivanium avatar mahaoran1997 avatar

Stargazers

Li Yuhan avatar Ke Liu avatar Yupeng Tang avatar Will Chen avatar Birdium avatar  avatar i.Pear avatar JuniperPhoton avatar Harry Xu avatar

Watchers

 avatar UCLASystem avatar

midas's Issues

reproducing experiment for wiredtiger

Hi,

In the WiredTiger folder's README, it's mentioned that there is a run/run.sh. However, I couldn't find it in the current repository.
Can you point me to where that is?

Thanks!

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.