https://github.com/cgcl-codes/gengar

Gengar, a distributed shared hybrid memory pool with RDMA support. Gengar allows applications to access remote DRAM/NVM in a large and global memory space through a client/server model.

https://github.com/cgcl-codes/gengar

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: ieee.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.0%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Gengar, a distributed shared hybrid memory pool with RDMA support. Gengar allows applications to access remote DRAM/NVM in a large and global memory space through a client/server model.

Basic Info
  • Host: GitHub
  • Owner: CGCL-codes
  • Language: JavaScript
  • Default Branch: master
  • Homepage:
  • Size: 4.08 MB
Statistics
  • Stars: 23
  • Watchers: 2
  • Forks: 11
  • Open Issues: 1
  • Releases: 0
Created about 7 years ago · Last pushed about 4 years ago
Metadata Files
Readme

README.md

Gengar:Distributed Hybrid Memory Pool

        Gengar, a distributed shared hybrid memory pool with RDMA support. Gengar allows applications to access remote DRAM/NVM in a large and global memory space through a client/server model. We exploit the semantics of RDMA primitives at the client side to identify frequently-accessed (hot) data in the server node, and cache it in a small DRAM buffer. Also, we manage the DRAM buffer with different strategies to maximize its efficiency. To full exploit the high performance RDMA hardware, we redesign the RDMA communication protocol and RPC to multiplex registered Memory Regions, and to overlap RDMA write operations with the execution of applications.

Gengar has achieved following functions:

  • NVM Allocation and Release: The application on the Gengar's client controller can request and release NVM memory on the remote server directly through the dhmpmalloc and dhmpfree API.

  • DRAM Allocation and Release: For Gengar servers, DRAM is a scarce resource. Therefore, the client cannot apply for DRAM resources through the API, and must send a DRAM request request to the remote server through the sniffing package. The server will decide whether to agree to the client's DRAM application based on the memory stress condition.

  • Remote Read/Write: When a client allocates NVM or DRAM resources from a remote server, it can directly access remote memory resources through the dhmpread and dhmpwrite API interface. Gengar implements remote data access with one-sided RDMA Read/Write Verbs.

Citing Gengar

If you use Gengar, please cite our research paper published at ICDCS 2021. (LINK)

Zhuohui Duan, Haikun Liu, Haodi Lu, Xiaofei Liao, Hai Jin, Yu Zhang, Bingsheng He, Gengar: An RDMA-based Distributed Hybrid Memory Pool, in: Proceedings of the 41th IEEE International Conference on Distributed Computing Systems(ICDCS), 2021

javascript @inproceedings{duan2021gengar, title={Gengar: An RDMA-based Distributed Hybrid Memory Pool}, author={Duan, Zhuohui and Liu, Haikun and Lu, Haodi and Liao, Xiaofei and Jin, Hai and Zhang, Yu and He, Bingsheng}, booktitle={Proceedings of the 2021 IEEE 41st International Conference on Distributed Computing Systems (ICDCS)}, pages={92--103}, year={2021}, organization={IEEE} }

The Web Image of Gengar Servers Memory Usage

image

DRAM Used: indicates the total amount of DRAM used by the current server to all remote clients.
DRAM Unused: indicates the remaining DRAM space of the current server.
DRAM Total: indicates the total DRAM space owned by the current server.
NVM Used: indicates the total amount of NVM used by the current server to all remote clients.
NVM Unused: indicates the remaining NVM space of the current server.
NVM Total: indicates the total NVM space owned by the current server.
Action Button: shows the proportion of memory resources used by each client in the occupied server memory space.

Note:Run Gengar WebUI and Gengar

  1. Gengar.tar contains the dhmp dir(Distributed Hybrid Memory Pool=>dhmp project) and vis dir(Gengar WebUI project).
  2. You must run the Gengar WebUI before you can run Gengar(dhmp project).
  3. dhmp project needs to be built and run on each server and one watcher.
  4. Gengar WebUI project needs to be built and run on one machine.

Gengar WebUI Setup, Compiling, Configuration and How to use

1.External Dependencies
        Before run the WebUI of Gengar, it's essential that you have already install dependencies listing below. * jdk 8+ * maven 3+

2.Setup * Decompression the Gengar.tar into the dhmp dir and vis dir javascript * the dhmp dir use for running the Gengar's client, watcher and server * the vis dir use for running the Gengar's WebUI [user @node1 ~]# tar -xvf Gengar.tar

  • Modify the configuration in Gengar/vis/src/main/resources/application.properties
  • Set the web app port to be the same as the port your server is open to.
  • Set the socket port to be the same as the watcher port in the configuration file (Gengar/dhmp/bin/config.xml) javascript # set the web app port server.port=8080 # set the socket port, the socket port use for Gengar watcher connecting. netty.server.port=3333 //default

3.Running There are two ways of running the WebUI. * The first way of running by JAVA. javascript [user @node1 ~]# cd Gengar/vis/ [user @node1 vis]# mvn package [user @node1 vis]# cd target [user @node1 target]# java -jar vis-1.0.0.jar

  • The second way of running by Maven. javascript # use the maven running [user @node1 ~]# cd Gengar/vis/ [user @node1 vis]# mvn spring-boot:run

4.Usage * Enter your server ip and listen port in the browser address bar (this port is the server.port abovementioned) * eg:http://ip:port * If the screenshot below appears, it means the operation is successful. image

At this point, the basic Web UI interface has been deployed. If you need Web SSH functionality, please see below.

**4.Web SSH (Optional) * Install GateOne * Certified GateOne: * When you run GateOne for the first time, it creates a default configuration file /gateone/settings/10server.conf, where you can find the port number port it listens on. * Assume that the IP address of the installed machine node is machine_ip. * Then enter https://machine_ip:port in the browser address bar. * If the screenshot below appears, it proves that the GateOne installation is successful. image * After GateOne has been successfully run, configure the address of GateOne in the vis/src/main/resources/static/pages/terminal/terminal.js file: javascript 1.8 function initWebShell() { GateOne.init({ url: "https://machine_ip:port" }); } * Then re-execute according to the compilation and operation of Step 3. * After successful operation, the browser will display a home page. There will be a Terminal button at the top of the home page, click this button to enter the Web SSH interface. * Note: If an authentication failure error occurs, please enter https://machine_ip:port in the address bar of the browser, and then try again.

Gengar Setup,Compiling,Configuration and How to use

1.External Dependencies
        Before run hybrid memory pool Gengar, it's essential that you have already install dependencies listing below. * gcc(>=4.6) * numactl-devel * libxml2

2.Compiling

First, Compiling the Gengar's project. The compile process of client, watcher and server is the same.

javascript [user @node1 Gengar]# cd dhmp [user @node1 dhmp]# mkdir build && cd build [user @node1 build]# cmake .. && make //will generate three executable files(client\watcher\server) on the Gengar/dhmp/bin

  • Update configuration to your Gengar's server configuration through Gengar/dhmp/bin/config.xml ```javascript [Client Log Level] 4 //ERROR:0; WARN:1; INFO:2; DEBUG:3; TRACE:4;

[Watcher Configuration] 127.0.0.1 //connect to the webui. if vis run the machine same as the watcher, this can use the addr "127.0.0.1" 3333 //connect to the webui socket port

Note:Each pair of labels represents a server. Each Server must be running.

[Server Configuration] ib0 //RDMA Card Name,through ifconfig look up xxx.xxx.xxx.xxx //Server's RDMA Card Address 39300 //Server's listen port 200 //express the read latency of server's NVM is 200ns 800 //express the write latency of server's NVM is 800ns 1 //express the CPU parallelism of server is 1 ```

3. Running

Make sure your server configuration is correct.

First, running all your server according to the Gengar/dhmp/bin/config.xml configuration. javascript [user @server Gengar]# cd dhmp/bin [user @server bin]# ./server

Second, running the watcher. javascript [user @watcher Gengar]# cd dhmp/bin [user @watcher bin]# ./watcher

Finally, you can write client programs using the Gengar API.
How to use Gengar API ```javascript

include

/** * dhmpmalloc: remote alloc the size of length region */ void *dhmpmalloc(size_t length);

/** * dhmpread:read the data from dhmpaddr, write into the localbuf */ int dhmpread(void *dhmpaddr, void * localbuf, size_t count);

/** * dhmpwrite:write the data in local buf into the dhmpaddr position */ int dhmpwrite(void *dhmpaddr, void * localbuf, sizet count);

/** * dhmpfree:release remote memory */ void dhmpfree(void dhmp_addr); ``` *Sample code** ```javascript

include

include

int main(int argc,char *argv[]) { void *addr; int size=65536; char *str;

str=malloc(size);
snprintf(str, size, "hello world");

dhmp_client_init();

addr=dhmp_malloc(size);

dhmp_write(addr, str, size);

dhmp_read(addr, str, size);

dhmp_free(addr);

dhmp_client_destroy();

return 0;

} ```

4. How to test Gengar API

Benchmark: We allocate 30,000 objects of size 512KB and perform 100,000 reads and 100,000 writes to the remote server. javascript [user @client Gengar]# cd dhmp/bin [user @client bin]# ./test.sh

Owner

  • Name: CGCL-codes
  • Login: CGCL-codes
  • Kind: organization

CGCL/SCTS/BDTS Lab

GitHub Events

Total
  • Watch event: 4
Last Year
  • Watch event: 4

Dependencies

vis/pom.xml maven
  • io.netty:netty-all 4.1.33.Final
  • org.projectlombok:lombok
  • org.springframework.boot:spring-boot-devtools
  • org.springframework.boot:spring-boot-starter
  • org.springframework.boot:spring-boot-starter-thymeleaf
  • org.springframework.boot:spring-boot-starter-web
  • org.springframework.boot:spring-boot-starter-websocket
  • org.springframework.boot:spring-boot-starter-test test