Skip to content

Commit

Permalink
rdma: make the mempool size configurable (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymjiang authored Oct 28, 2019
1 parent 862f8a6 commit 35e3d13
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rdma_van.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ class SimpleMempool {
std::lock_guard<std::mutex> lk(mu_);
pd_ = pd;
struct ibv_mr *mr;

// set init mempool size
auto val = Environment::Get()->find("BYTEPS_RDMA_MEMPOOL_SIZE");
size = val ? atoi(val) : size;
PS_VLOG(1) << "RDMA initial mempool size set to " << size;

char *p = reinterpret_cast<char *>(aligned_alloc(kAlignment, size));
total_allocated_size += size;
CHECK(p);
Expand Down

0 comments on commit 35e3d13

Please sign in to comment.