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

aerospike-SPDK patch based on 5.5.0.4 #40

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
8 changes: 7 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
url = https://github.com/aerospike/aerospike-mod-lua.git
[submodule "modules/jansson"]
path = modules/jansson
url = https://github.com/aerospike/jansson.git
url = https://github.com/akheron/jansson
ignore = dirty
[submodule "modules/luajit"]
path = modules/luajit
@@ -22,3 +22,9 @@
path = modules/jemalloc
url = https://github.com/aerospike/jemalloc.git
ignore = dirty
[submodule "modules/spdk"]
path = modules/spdk
url = https://github.com/spdk/spdk
[submodule "modules/lthread"]
path = modules/lthread
url = https://github.com/mita/lthread
59 changes: 59 additions & 0 deletions README-spdk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# How to build Aerospike with SPDK patch

The build process has been tested on Ubuntu 20.04

1. Install dependencies to build SPDK

```
git submodule update --init --recursive
sudo ./modules/spdk/scripts/pkgdep.sh
```

2. Apply Aerospike SPDK patch

```
patch -p1 < aerospike-spdk.patch
```

3. Build Aerospike with SPDK

```
make USE_SPDK=1 USE_LTHREAD=1
```

# How to setup Aerospike with SPDK

1. Create a SPDK config file for your NVMe device

```
sudo env HUGEMEM=20480 modules/spdk/scripts/setup.sh
sudo mkdir -p /usr/local/etc/spdk/
modules/spdk/scripts/gen_nvme.sh --json-with-subsystems | sudo tee /usr/local/etc/spdk/aerospike.conf
```

2. Update a Aerospike config file

The developer configuration file, `aerospike_dev.conf`, contains basic settings.
You may want to change some parameters in the file.

For example, the `service-lcores` parameter specifies a list of CPU which the lightweight threads run on.
The `device` parameter specifies a storage device such as the SPDK block device (bdev).

# How to start Aerospike with SPDK

1. setup SPDK

This script only needs to be run once the system is up.

```
sudo env HUGEMEM=20480 modules/spdk/scripts/setup.sh
```

2. start Aerospike server

```
sudo su
make init
ulimit -n 200000
make start
```
Loading