{"id":22777849,"url":"https://github.com/a1exwang/bartender","last_synced_at":"2026-01-08T16:06:14.504Z","repository":{"id":95285036,"uuid":"115093764","full_name":"a1exwang/bartender","owner":"a1exwang","description":"A distributed NVRAM-based memory allocator. A related programming language \"adonis\" is at https://github.com/a1exwang/adonis-lang","archived":false,"fork":false,"pushed_at":"2017-12-28T08:00:04.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T15:28:16.037Z","etag":null,"topics":["allocator","distributed-memory-management","malloc","nvram","persistent-data-structure"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a1exwang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-22T08:18:55.000Z","updated_at":"2019-08-28T16:29:12.000Z","dependencies_parsed_at":"2023-04-21T11:46:45.388Z","dependency_job_id":null,"html_url":"https://github.com/a1exwang/bartender","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a1exwang%2Fbartender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a1exwang%2Fbartender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a1exwang%2Fbartender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a1exwang%2Fbartender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a1exwang","download_url":"https://codeload.github.com/a1exwang/bartender/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246326598,"owners_count":20759436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["allocator","distributed-memory-management","malloc","nvram","persistent-data-structure"],"created_at":"2024-12-11T19:17:28.925Z","updated_at":"2026-01-08T16:06:14.463Z","avatar_url":"https://github.com/a1exwang.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# bartender\nA high performance distributed guaranteed failure-atomic NVRAM-based memory allocator.\n\n# What is \"bartender\"?\n\"bartender\" is a distributed NVRAM-based memory allocator, with a traditional C-like memory management interface(malloc/free) and can be deployed on a cluster of host machines connected by InfiniBand or Ethernet\nto provide a transparent memory allocation API for the clients.\n\n# Features\n- NVRAM-based\n  - Guaranteed failure-atomic\n  - Failure recovery\n  - Transaction\n- Distributed clusters\n  - Transparent\n- Concurrency\n  - Cache locality\n  - Contention\n- Auto defragmentation\n\n# Challenges\n- For NVRAM\n  1. Memory leak on NVRAM.\n  1. Data consistency and its overhead\n- For distributed memory allocators\n  1. Consistency\n  1. Latency and throughput\n  1. Locality\n  1. Fragmentation\n- For concurrent systems\n  1. Consistency\n  1. Contention\n  1. Memory blowup\n\n# Requirements\n### For development\n- Hardware\n  - PC\n- Software\n  - VirtualBox\n  - rustc\n\n### For production\nTODO\n\n# Setup\n### Single node\n- This repository\n- rust\n- gcc\n\n### Multiple nodes on single machine\nTODO\n\n# Usage\n\n```c\n#include \u003cbartender.h\u003e\n\nstruct btd_config btd_config;\nbtd_config.single_node = 1;\n\nstruct btd_cluster *p_cluster = btd_cluster_create(\u0026btd_config);\nconst char *s = \"123\";\nchar *p_data = btd_malloc(p_cluster, 100);\nbtd_memcpy(p_data, s, strlen(s));\nbtd_free(p_data);\n```\n\n# Benchmark\n- nvm_malloc benchmark https://github.com/IMCG/nvm-malloc/tree/master/benchmark\n\n# Design\nTODO\n\n\n# TODOs\n1. Malaku\n    - Features\n        - NVRAM-based memory allocator\n        - Support for more familiar C-like malloc/free interface\n        - Decrease latency by lazily persisting non-core metadata\n        - Post-failure GC for data consistency\n\n1. Hoard\n    - [Hoard GitHub](https://github.com/emeryberger/Hoard)\n    - Address following issues\n        - Contention\n        - False Sharing\n        - Memory Blowup\n\n1. Fast Cluster Communication\n    - [Accelio](https://github.com/accelio/accelio)\n    - or write a custom IB/RDMA-based high speed RPC/data transfer library\n\n1. Distributed Memory Management\n  - e.g. maybe CEPH, ZFS or GFS for consistency, performance, fragmentation\n1. Benchmark tools or methods\n  - nvm_malloc benchmarks\n1. IB, NVRAM Emulator\n  - Use RAM disk + mmap to emulate NVRAM\n  - Use local RAM to emulate remote memory or Ethernet-based RDMA?\n1. GitBooks\n  - Try GitBooks for our documentation\n1. Easy LaTeX editor or transformer\n  - maybe pandoc + vim?\n\n1. New programming language with NVM variable support?\n\n# References\n- [1] Bhandari K, Chakrabarti D R, Boehm H. Makalu: fast recoverable allocation of non-volatile memory[J]. Acm Sigplan Notices, 2016, 51(10):677-694.\n- [2] Mellanox, http://www.mellanox.com/related-docs/prod_software/RDMA_Aware_Programming_user_manual.pdf\n- [3] Berger E D, Mckinley K S, Blumofe R D, et al. Hoard: a scalable memory allocator for multithreaded applications[C]// International Conference on Architectural Support for Programming Languages and Operating Systems. ACM, 2000:117-128.\n- [4] Volos H, Tack A J, Swift M M. Mnemosyne:lightweight persistent memory[J]. Acm Sigarch Computer Architecture News, 2011, 47(4):91-104.\n- [5] Coburn J, Caulfield A M, Akel A, et al. NV-Heaps: making persistent objects fast and safe with next-generation, non-volatile memories[C]// Sixteenth International Conference on Architectural Support for Programming Languages and Operating Systems. ACM, 2011:105-118.\n- [6] Christopher Mitchell, Yifeng Geng, Jinyang Li. Using one-sided RDMA reads to build a fast, CPU-efficient key-value store[C]// Usenix Conference on Technical Conference. USENIX Association, 2013:103-114.\n- [7] Kalia A, Kaminsky M, Andersen D G. Using RDMA efficiently for key-value services[C]// ACM Conference on SIGCOMM. ACM, 2014:295-306.\n- [8] Megalloc: Fast Distributed Memory Allocator for NVM-Based Cluster\n- [9] BDWGC, A garbage collector used in Makalu, https://github.com/ivmai/bdwgc.git\n- [10] [pmem](http://pmem.io/) pmem, Intel's NVM Programming library\n- [11] [pmem valgrind](https://github.com/pmem/valgrind.git) Enhanced Valgrind for Persistent Memory\n- [12] [NVL-C](http://ft.ornl.gov/research/nvl-c) A extended C for NVM\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa1exwang%2Fbartender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa1exwang%2Fbartender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa1exwang%2Fbartender/lists"}