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

Add: eBPF profiling #35

Open
wants to merge 3 commits into
base: main-dev
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ code-review*.bak
*.exe
*.out
*.app

**/__pycache__/
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ add_executable(ucsb_bench ./src/bench.cxx)

if(${UCSB_BUILD_USTORE})
# Choose engine. Available engines: UCSET, ROCKSDB, LEVELDB, UDISK
set(USTORE_ENGINE_NAME UCSET)
set(USTORE_ENGINE_NAME UCSET)

include("${CMAKE_MODULE_PATH}/ustore.cmake")
list(APPEND UCSB_DB_LIBS "ustore")
target_compile_definitions(ucsb_bench PUBLIC UCSB_HAS_USTORE=1)
target_compile_definitions(ucsb_bench PUBLIC UCSB_HAS_USTORE=1)
endif()

if(${UCSB_BUILD_ROCKSDB})
Expand Down
22 changes: 10 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,34 @@ MAINTAINER [email protected]

WORKDIR ./

RUN apt-get update
RUN apt update
ENV DEBIAN_FRONTEND noninteractive

# Install tools
RUN apt install -y python3-pip
RUN pip3 install cmake
RUN pip3 install conan
RUN apt install -y gcc-10
RUN apt install -y g++-10
RUN apt-get install -y libexplain-dev
RUN apt-get install -y libsnappy-dev
RUN apt-get install -yq pkg-config
RUN apt-get install -y git
RUN apt install -y libexplain-dev
RUN apt install -y libsnappy-dev
RUN apt install -y pkg-config
RUN apt install -y git

# Build WiredTiger (latest)
RUN git clone git://github.com/wiredtiger/wiredtiger.git
RUN git clone --depth 1 git@github.com:wiredtiger/wiredtiger.git
RUN mkdir ./wiredtiger/build
WORKDIR "./wiredtiger/build"
RUN cmake ../.
RUN cmake ..
RUN make install

WORKDIR /

# Build UCSB
RUN git clone https://github.com/unum-cloud/ucsb.git
RUN git clone --depth 1 git@github.com:unum-cloud/ucsb.git
WORKDIR "./ucsb/"
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
RUN bash -i setup.sh
RUN bash -i build_release.sh
RUN rm -rf ./bench
RUN rm -rf ./bench/results

ENTRYPOINT ["./build_release/bin/ucsb_bench"]
ENTRYPOINT ["./build_release/build/bin/ucsb_bench"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ The outputs will be placed in the `bench/results/` folder.
git clone https://github.com/unum-cloud/ucsb.git && cd ucsb && ./run.py
```

### eBPF

There is an optional eBPF-based profiling, which can be enabled with `--with-ebpf` and `--with-ebpf-memory` flags,
before execution make sure you have `bcc` [installed](https://github.com/iovisor/bcc/blob/master/INSTALL.md) at least version 0.21.0.


## Supported Databases

Key-Value Stores and NoSQL databases differ in supported operations.
Expand Down
2 changes: 2 additions & 0 deletions cmake/leveldb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ if(NOT leveldb_POPULATED)
add_subdirectory(${leveldb_SOURCE_DIR} ${leveldb_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()

add_compile_options(-g)

include_directories(${leveldb_SOURCE_DIR}/include)
Loading