Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V5.4.6 ocssd #4

Open
wants to merge 7 commits into
base: v5.4.6_ocssd
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ tags:
dev: clean configure make

rocks:
#cd .. && make release -j$(expr `nproc` - 2)
cd .. && make release -j8
cd .. && make release -j$(expr `nproc` - 2)
#cd .. && make release -j8

.PHONY: hash
hash:
Expand Down
3 changes: 2 additions & 1 deletion nvm/env_nvm_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ NvmFile::NvmFile(
stripe_nbytes_(), blk_nbytes_(), blks_(), lu_bound_(8) {
NVM_DBG(this, "mpath_:" << mpath_);

struct nvm_dev *dev = env_->store_->GetDev();
const struct nvm_geo *geo = nvm_dev_get_geo(env_->store_->GetDev());

if (env_->posix_->FileExists(mpath_).ok()) { // Read meta from file
Expand Down Expand Up @@ -76,7 +77,7 @@ NvmFile::NvmFile(

buf_nbytes_ = 0; // Setup buffer
buf_nbytes_max_ = lu_bound_ * stripe_nbytes_;
buf_ = (char*)nvm_buf_alloc(geo, buf_nbytes_max_);
buf_ = (char*)nvm_buf_alloc(dev, buf_nbytes_max_, NULL);
if (!buf_) {
NVM_DBG(this, "FAILED: allocating buffer");
throw std::runtime_error("FAILED: allocating buffer");
Expand Down
14 changes: 10 additions & 4 deletions nvm/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env bash

RBENCH_DEV_NAME="nvme0n1"
RBENCH_BENCHMARKS="fillrandom, stats"
RBENCH_DEV_MODE="nvm"

if [ $UID != 0 ]; then
echo "You don't have sufficient privileges to run this script."
exit 1
Expand Down Expand Up @@ -84,14 +89,15 @@ RBENCH_TARGET_FILE_SIZE_BASE=$((2000 * MB))
RBENCH_MAX_BYTES_FOR_LEVEL_BASE=$((4000 * MB))
RBENCH_CACHE_NUMSHARDBITS=4
RBENCH_COMPRESSION_RATIO=1
RBENCH_COMPRESSION_TYPE=snappy
RBENCH_COMPRESSION_TYPE=none
RBENCH_DELETE_OBSOLETE_FILES_PERIOD_MICROS=300000000
RBENCH_DISABLE_SEEK_COMPACTION=1
RBENCH_DISABLE_WAL=1
RBENCH_DISABLE_WAL=0
RBENCH_LEVEL0_FILE_NUM_COMPACTION_TRIGGER=1
RBENCH_LEVEL0_SLOWDOWN_WRITES_TRIGGER=8
RBENCH_LEVEL0_STOP_WRITES_TRIGGER=12
RBENCH_MAX_BACKGROUND_COMPACTIONS=20
RBENCH_MAX_BACKGROUND_FLUSHES=20
RBENCH_MIN_LEVEL_TO_COMPRESS=2
RBENCH_MMAP_READ=0
RBENCH_NUM_LEVELS=6
Expand All @@ -100,8 +106,8 @@ RBENCH_STATISTICS=1
RBENCH_STATS_INTERVAL=100000
RBENCH_STATS_PER_INTERVAL=1
RBENCH_SYNC=0
#RBENCH_THREADS=1
RBENCH_THREADS=$(nproc)
RBENCH_THREADS=1
#RBENCH_THREADS=$(nproc)
RBENCH_VERIFY_CHECKSUM=1

source rbench.sh
Expand Down
1 change: 0 additions & 1 deletion src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ LIB_SOURCES = \
nvm/env_nvm_file.cc \
port/stack_trace.cc \
port/port_posix.cc \
port/stack_trace.cc \
table/adaptive_table_factory.cc \
table/block.cc \
table/block_based_filter_block.cc \
Expand Down