alibaba / PhotonLibOS

Probably the fastest coroutine lib in the world!

Home Page:https://PhotonLibOS.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is the minimum working Linux kernel version

autopear opened this issue · comments

commented

I tried to build and test db_bench from https://github.com/data-accelerator/rocksdb/tree/photon-with-tests, which links to PhotonLibOS 0.5.3.

Building is fine, but when I run db_bench, it gives an error during run time iouring: required feature not supported from iouringEngine::init(). After debugging, I figured out that IORING_FEAT_EXT_ARG is not available.

My question is, what is the minimum required Linux kernel version for PhotonLibOS to run? My test OS is Debian 10: 5.10.90.bsk.2-sign-amd64.

Also, is there a way to run without sudo/root permission to bypass the MEMLOCK limit?

Strange. I was running the program on CentOS 8 with RHEL-kernel 5.8, and IORING_FEAT_EXT_ARG exists. Could you upgrade your kernel a little bit higher?

You can set permanently different limits in /etc/security/limits.conf, for current user.

BTW, db_bench is only one part of the tests, the results didn't vary too much when compared with the original multi-thread RocksDB.

I can add the network test code for (high concurrency RPC read/write + Photon/original RocksDB) if you need. That's where the differences start to emerge.

commented

Strange. I was running the program on CentOS 8 with RHEL-kernel 5.8, and IORING_FEAT_EXT_ARG exists. Could you upgrade your kernel a little bit higher?

You can set permanently different limits in /etc/security/limits.conf, for current user.

BTW, db_bench is only one part of the tests, the results didn't vary too much when compared with the original multi-thread RocksDB.

I can add the network test code for (high concurrency RPC read/write + Photon/original RocksDB) if you need. That's where the differences start to emerge.

From lib_uring's comment

 * For kernels without IORING_FEAT_EXT_ARG (5.10 and older), if 'ts' is
 * specified, the application need not call io_uring_submit() before
 * calling this function, as we will do that on its behalf. From this it also
 * follows that this function isn't safe to use for applications that split SQ
 * and CQ handling between two threads and expect that to work without
 * synchronization, as this function manipulates both the SQ and CQ side.

It seems at least kernel 5.11+ is needed to have this feature. I tested on a virtual machine with kernel 6.4.0 and RocksDB + PhotonLibOS works fine. Is RHEL-kernel 5.8 different from a standard Linux kernel?

Is RHEL-kernel 5.8 different from a standard Linux kernel?

Probably. And if you are not able to upgrade the kernel version, we have other solutions for you. The IORING_FEAT_EXT_ARG is required by the io_uring_submit_and_wait_timeout API, that's where we need the timeout. But we also have some code using the liburing internal io_uring_prep_timeout approach. Even though it's less performant, it only requires kernel 5.4.

I can add the network test code for (high concurrency RPC read/write + Photon/original RocksDB) if you need. That's where the differences start to emerge.

I forgot that I already added these code. https://github.com/data-accelerator/rocksdb/tree/photon-with-tests/examples/perf
Just try cmake --build build -j -t perf-server perf-client

Is RHEL-kernel 5.8 different from a standard Linux kernel

Yes, Redhat backports a lot of new features to their kernels.