Skip to content

Commit

Permalink
In order to support Debian/Bullseye, we know require minimal kernel v…
Browse files Browse the repository at this point in the history
…ersion - 5.10
  • Loading branch information
romange committed May 26, 2022
1 parent 6e7d3d2 commit 4a2e84b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ TODO.
## Running the server

Dragonfly runs on linux. It uses relatively new linux specific [io-uring API](https://github.com/axboe/liburing)
for I/O, hence it requires Linux version 5.11 or later.
Ubuntu 20.04.4 or 22.04 fit these requirements.
for I/O, hence it requires Linux version 5.10 or later.
Debian/Bullseye, Ubuntu 20.04.4 or later fit these requirements.


### With docker:
Expand All @@ -26,10 +26,10 @@ Ubuntu 20.04.4 or 22.04 fit these requirements.
docker pull ghcr.io/dragonflydb/dragonfly:latest && \
docker tag ghcr.io/dragonflydb/dragonfly:latest dragonfly

docker run --network=host --rm dragonfly
docker run --network=host --ulimit memlock=-1 --rm dragonfly
```

Some hosts may require adding `--ulimit memlock=-1` to `docker run` options.
*You need `--ulimit memlock=-1` because some Linux distros configure the default memlock limit for containers as 64m and Dragonfly requires more.*

### Building from source

Expand All @@ -46,7 +46,7 @@ sudo apt install ninja-build libunwind-dev libboost-fiber-dev libssl-dev \
./helio/blaze.sh -release

# Build
cd build-opt && ninja dragonfly
cd build-opt && ninja dragonfly

# Run
./dragonfly --alsologtostderr
Expand Down
2 changes: 1 addition & 1 deletion helio
Submodule helio updated 1 files
+8 −9 cmake/third_party.cmake
8 changes: 4 additions & 4 deletions src/server/dfly_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ int main(int argc, char* argv[]) {
base::sys::KernelVersion kver;
base::sys::GetKernelVersion(&kver);

if (kver.major < 5 || (kver.major == 5 && kver.minor < 11)) {
LOG(ERROR) << "Kernel 5.11 or later is supported. Exiting...";
if (kver.kernel < 5 || (kver.kernel == 5 && kver.major < 10)) {
LOG(ERROR) << "Kernel 5.10 or later is supported. Exiting...";
return 1;
}

Expand All @@ -93,8 +93,8 @@ int main(int argc, char* argv[]) {
return 1;
}

CHECK_LT(kver.minor, 99u);
dfly::kernel_version = kver.major * 100 + kver.minor;
CHECK_LT(kver.major, 99u);
dfly::kernel_version = kver.kernel * 100 + kver.major;

if (FLAGS_maxmemory == 0) {
LOG(INFO) << "maxmemory has not been specified. Deciding myself....";
Expand Down

0 comments on commit 4a2e84b

Please sign in to comment.