Documentation #66525
openRecommended deployment values
0%
Description
crimson_seastar_num_threads is introduced in https://github.com/ceph/ceph/pull/57593 with the following docs https://github.com/ceph/ceph/pull/57352.
However, there are still missing recommended deployments values which should be based on the available resources.
1) Performance impact of Basic/Manual configuration¶
- number of nodes: 1
- number of reactors per OSD: 4
- number of OSD: See below
- number of SSD: See below
| Random Read 4k | 1 OSD/SSD | 4 OSD/SSD |
|---|---|---|
| Basic | ||
| Manual | ||
| Performance diff by % |
| Random Write 4k | 1 OSD/SSD | 4 OSD/SSD |
|---|---|---|
| Basic | ||
| Manual | ||
| Performance diff by % |
For Basic:
crimson_seastar_num_threads = 4
crimson_alien_op_num_threads = default
cpu_cores_start = crimson_seastar_num_threads * num of OSDs
cpu_cores_end = nproc - 1
For Manual:
osd.<id>
crimson_seastar_cpu_cores = <Excluded CPU set cores range> (same as vstart.sh)
crimson_alien_op_num_threads = default
crimson_alien_thread_cpu_cores = $cpu_cores_start-$cpu_cores_end (same as vstart.sh)
cpu_cores_start = The rest of the cores that weren't assigned to any OSD crimson_seastar_cpu_cores
cpu_cores_end = nproc - 1
Note: The goal is to keep the same alien store resources ratio between tests.
2) Recommended SeaStar/AlienStore Core Ratio¶
number of nodes: 1
number of reactors per OSD (R/O): 4
number of OSD: 4
number of SSD: 4
Assuming there are 32 cores available by nproc, the ratios of Seastar : AlienStore:
| Random Read 4k | 4 : 28 | 8 : 24 | 12 : 20 | 16 : 16 |
|---|---|---|---|---|
| Manual |
| Random Write 4k | 4 : 28 | 8 : 24 | 12 : 20 | 16 : 16 |
|---|---|---|---|---|
| Manual |
For Manual :
Note that the Seastar cores should be divided by each OSD to maintain excluded cores.
osd.<id>
crimson_seastar_cpu_cores = <Excluded CPU set cores range> (same as vstart.sh)
crimson_alien_op_num_threads = default
crimson_alien_thread_cpu_cores = $cpu_cores_start-$cpu_cores_end (same as vstart.sh)
cpu_cores_start = The rest of the cores that weren't assigned to any OSD crimson_seastar_cpu_cores
cpu_cores_end = nproc - 1
For example for the "8 : 24" case:
osd.0:
crimson_seastar_cpu_cores: 0-1
osd.1:
crimson_seastar_cpu_cores: 2-3
osd.2:
crimson_seastar_cpu_cores: 4-5
osd.3:
crimson_seastar_cpu_cores: 6-7
osd:
crimson_alien_thread_cpu_cores: 8-31
3) Recommended crimson_alien_op_num_threads values (OUT OF SCOPE)¶
Out of scope (We can follow up on this later to keep the scope limited).
The follow up tests can be based on test #2 results as well.
4) hyperthreading and nproc (OUT OF SCOPE)¶
Hyperthreading is by-default enabled, in that case, the isolation based on logical CPUs `0-(seastarcores-1)` and `(seastarcores)-(nproc-1)` cannot isolate seastar and alienstore threads from physical CPUs perspective, in other words, during the tests:
1. 2 seastar threads may share the same physical core.
2. 1 seastar and x alienstore threads may share the same physical core.
3. There might be unnecessarily too many seastar reactors created.
From seastar reactor non-blocking and busy-polling design, I guess for the one-reactor-thread-per-core model, the "core" probably implies "physical core".
I'm not sure how the performance can differ between physical-core and logical-core based isolation, but I'm wondering that referring to the performance of logical-core based isolation might be misleading if that difference turns out to be possibly significant.
Files
JP Updated by Jose J Palacios Perez over 2 years ago
Proposal of the test plan.
The following parameters define the test space:
- number of nodes -- we can start initially with a single node cluster.
- number of OSD -- this can be a global value for the whole cluster, or defined per node. We will start initially as a single OSD, then increase this upto a maximum of four for a single node cluster.
- number of SSD -- the SV1 machines available to us have got three SSD of 200GB size. We can start with a single OSD backed by a single SSD. Only when we increase the number of OSD we use up to three SSD.
- number of reactors per OSD -- we showed on previous experiments that for random write 4k, we can reach a single SSD performance limit with four reactors. So we might stick with this value for initial test runs.
1) We could start with a baseline configuration where the only parameter set is the number of reactors per OSD, for example:
MDS=0 MON=1 OSD=1 MGR=1 ../src/vstart.sh --new -x --localhost --without-dashboard -o timeout=10000 -o session_timeout=10000 --bluestore --redirect-output --bluestore-devs /dev/sdd --crimson --crimson-smp 4
For this baseline configuration, we can run the four typical workloads (that is, 4k random write, 4k random read, 64k sequential write, 64k sequential read).
2) Then, we recreate the cluster using the new Basic configuration (no CPU pinning, etc.) via the new crimson_seastar_num_threads argument to vstart. We run the same four workloads and compare against the baseline. We expect to identify:- whether the Linux scheduler strategy does not cause unnecessary movement of threads across the available CPU cores,
- whether different reactor threads are scheduled to the same CPU core, or alien threads and reactor threads,
- measure the contention introduced in this new Basic configuration.
3) Up to this point, the two configurations above should use the same number of Alien threads (default six), and the same core allocation range (in this example, in the baseline configuration we know that with four reactors, the alien threads should use processor id from 4 to 31). The major difference is that the new Basic configuration is more dynamic in terms of thread allocation (that is, it might be possible that the Linux scheduler allocates a reactor and an alien thread in the same CPU core). This would involve a high degree of non-determinism in this scenario, so we might need to run a high number of experiments to have enough data. Alternatively, we could try to isolate the scenario into representative cases, for example: one case would be to force a reactor thread and an alien thread on the same CPU core and measure the performance impact. Another case would be to force two reactor threads on the same CPU core.
4) Once we have a good understanding of the performance impact of the new Basic configuration (for example, on average it degrades performance by 7%) we could consider to modify a single parameter next. We have a set of choices in this point:- increase the number of OSD only,
- increase the number of SSD only -- for the same number of OSD,
- increase the number of Alien threads
- restrict the number of CPU cores for Alien threads -- by default vstart dedicates the remaining processor ids once allocated all the reactors. This might not be possible with the new Basic configuration.
The following are the details for the FIO benchmark for the execution of the four typical workloads. We might not need to change any of these.
The following are the general test steps.
We create a single RBD volume/image (immediately after the cluster is created):
bin/ceph osd pool create rbd
bin/ceph osd pool application enable rbd rbd
bin/rbd create --size 102G rbd/vol1
We prefill the image: the following runs FIO using the predefined config file, which is a sequential write workload
RBD_NAME=vol1 RBD_SIZE="64k" fio /fio/examples/rbd_prefill.fio
Then, before each of the four typical workloads, we prime the image: this is a 64k random write workload during 5 min
RBD_NAME=vol1 RBD_SIZE="64k" fio /fio/examples/rbd_prime.fio
And then, we run the actual workload:
RBD_NAME=vol1 IO_DEPTH=$io NUM_JOBS=$job taskset -ac 15-15 fio /fio/examples/rbd_${map[${WORKLOAD}]}.fio --output=fio_${TEST_NAME}.json --output-format=json
The following table show the suggested values for the FIO arguments (number of jobs and iodepth) as well as the expected performance -- these values were obtained from preliminary tests (April 2024, Build used: 3cb404b367f ./do_cmake.sh -DWITH_SEASTAR=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo).
;Note:- the convention for describing the I/O concurrency queue depth is
(num_procs) x (iodepth x num_jobs). - sequential workloads always run with
num_jobs=1to avoid multiple FIO threads exercising the same offset, hence invalidating the results. - overall latency for these results is within 10ms.
| Workload | Single FIO |
|---|---|
| random write 4k | (16x4): 6k IOPs |
| random read 4k | (16x16): 48kIOPs |
| seq write 64k | (14x1): 240 MBs |
| seq read 64k | (16x1): 420 MBs |
JP Updated by Jose J Palacios Perez over 2 years ago
On a separate note: it would be interesting to find out whether any of the orchestrator/cephadm can find out the output from lscpu, since its section NUMA provides information about the specific processor ids, for example:
# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
:
NUMA:
NUMA node(s): 2
NUMA node0 CPU(s): 0-7,16-23
NUMA node1 CPU(s): 8-15,24-31
with this information per node, the orchestrator/cephadm could construct a list of the (physical, non-HT) processor ids to use, then perform the corresponding thread allocation/pining (per node). This essentially extending what vstart does, involving any number of nodes.
MB Updated by Matan Breizman over 2 years ago
- Status changed from New to In Progress
The test plan sounds good.
In order to simplify, I think that we can test only the cases described below as a beginning.
If any anomalies were to be found, we can further investigate with more test cases (e.g by changing number of OSD/SSD and adding seq read/write tests).
1) Performance impact of Basic/Manual configuration¶
- number of nodes: 1
- number of reactors per OSD: 4
- number of OSD: See below
- number of SSD: See below
| Random Read 4k | 1 OSD/SSD | 4 OSD/SSD |
|---|---|---|
| Basic | ||
| Manual | ||
| Performance diff by % |
| Random Write 4k | 1 OSD/SSD | 4 OSD/SSD |
|---|---|---|
| Basic | ||
| Manual | ||
| Performance diff by % |
For Basic:
crimson_seastar_num_threads = 4
crimson_alien_op_num_threads = default
crimson_alien_thread_cpu_cores = $cpu_cores_start-$cpu_cores_end
cpu_cores_start = crimson_seastar_num_threads * num of OSDs
cpu_cores_end = nproc - 1
For Manual:
osd.<id>
crimson_seastar_cpu_cores = <Excluded CPU set cores range> (same as vstart.sh)
crimson_alien_op_num_threads = default
crimson_alien_thread_cpu_cores = $cpu_cores_start-$cpu_cores_end (same as vstart.sh)
cpu_cores_start = The rest of the cores that weren't assigned to any OSD crimson_seastar_cpu_cores
cpu_cores_end = nproc - 1
Note: The goal is to keep the same alien store resources ratio between tests.
2) Recommended Basic configuration values¶
- number of nodes: 1
- number of reactors per OSD (R/O): See below
- number of OSD: 3
- number of SSD: 3
| Random Read 4k | 1 R/O | 2 R/O | 4 R/O | 8 R/O |
|---|---|---|---|---|
| Basic |
| Random Write 4k | 1 R/O | 2 R/O | 4 R/O | 8 R/O |
|---|---|---|---|---|
| Basic |
For Basic:
crimson_seastar_num_threads = 1/2/4/8
crimson_alien_op_num_threads = default
crimson_alien_thread_cpu_cores = $cpu_cores_start-$cpu_cores_end
cpu_cores_start = crimson_seastar_num_threads * num of OSDs
cpu_cores_end = nproc - 1
3) Recommended crimson_alien_op_num_threads values¶
Out of scope (We can follow up on this later to keep the scope limited)
JP Updated by Jose J Palacios Perez over 2 years ago
Sounds good!
I've reserved the machine, will be updating my git checkout with latest, build and start running the tests.
MB Updated by Matan Breizman over 2 years ago
Jose J Palacios Perez wrote in #note-4:
Sounds good!
I've reserved the machine, will be updating my git checkout with latest, build and start running the tests.
After Discussing with Sam, I think that we should change "2) Recommended Basic configuration values".
A more informing tests and data that would help users would be to identify the most optimal SeaStar/Alienstore allocation ratio.
Once we'll have a basic understanding of that, we would be able to (simply) suggest to divide the SeaStar cores by the number of OSDs deployed in this node.
This will be relevant to both Basic or Manual deployments (so only manual can be tested).
1) Performance impact of Basic/Manual configuration¶
Same as described in https://tracker.ceph.com/issues/66525#note-3
2) Recommended SeaStar/AlienStore Core Ratio¶
number of nodes: 1
number of reactors per OSD (R/O): 4
number of OSD: 4
number of SSD: 4
Assuming there are 32 cores available by nproc, the ratios of Seastar : AlienStore:
| Random Read 4k | 4 : 28 | 8 : 24 | 12 : 20 | 16 : 16 |
|---|---|---|---|---|
| Manual |
| Random Write 4k | 4 : 28 | 8 : 24 | 12 : 20 | 16 : 16 |
|---|---|---|---|---|
| Manual |
For Manual :
Note that the Seastar cores should be divided by each OSD to maintain excluded cores.
osd.<id>
crimson_seastar_cpu_cores = <Excluded CPU set cores range> (same as vstart.sh)
crimson_alien_op_num_threads = default
crimson_alien_thread_cpu_cores = $cpu_cores_start-$cpu_cores_end (same as vstart.sh)
cpu_cores_start = The rest of the cores that weren't assigned to any OSD crimson_seastar_cpu_cores
cpu_cores_end = nproc - 1
For example for the "8 : 24" case:
osd.0:
crimson_seastar_cpu_cores: 0-1
osd.1:
crimson_seastar_cpu_cores: 2-3
osd.2:
crimson_seastar_cpu_cores: 4-5
osd.3:
crimson_seastar_cpu_cores: 6-7
osd:
crimson_alien_thread_cpu_cores: 8-31
3) Recommended crimson_alien_op_num_threads values¶
Out of scope (We can follow up on this later to keep the scope limited).
The follow up tests can be based on test #2 results as well.
JP Updated by Jose J Palacios Perez over 2 years ago
1) Build: sha1: ec6b9d194fb
./do_cmake.sh -DWITH_SEASTAR=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
ninja -C build -l 20 -j 20
2) Slight modification to vstart.sh to support the new option --crimson_seastar_num_threads:
$test-crimson_seastar_num_threads # git diff -- src/vstart.sh
diff --git a/src/vstart.sh b/src/vstart.sh
index a462a9ae60a..98ffe7a1894 100755
--- a/src/vstart.sh
+++ b/src/vstart.sh
@@ -275,6 +275,7 @@ options:
--crimson-smp: number of cores to use for crimson
--crimson-alien-num-threads: number of alien-tp threads
--crimson-alien-num-cores: number of cores to use for alien-tp
+ --crimson_seastar_num_threads: number of reactors for Basic configuration
--osds-per-host: populate crush_location as each host holds the specified number of osds if set
--require-osd-and-client-version: if supplied, do set-require-min-compat-client and require-osd-release to specified value
--use-crush-tunables: if supplied, set tunables to specified value
@@ -350,6 +351,7 @@ parse_secondary_devs() {
crimson_smp=1
crimson_alien_num_threads=0
crimson_alien_num_cores=0
+crimson_seastar_num_threads=0
while [ $# -ge 1 ]; do
case $1 in
@@ -589,6 +591,10 @@ case $1 in
crimson_alien_num_cores=$2
shift
;;
+ --crimson_seastar_num_threads)
+ crimson_seastar_num_threads=$2
+ shift
+ ;;
--bluestore-spdk)
[ -z "$2" ] && usage_exit
IFS=',' read -r -a bluestore_spdk_dev <<< "$2"
@@ -1711,6 +1717,10 @@ if [ "$ceph_osd" == "crimson-osd" ]; then
if [ "$trace" -ne 0 ]; then
extra_seastar_args=" --trace"
fi
+ if [ $crimson_seastar_num_threads -gt 0 ]; then
+ echo "$CEPH_BIN/ceph -c $conf_fn config set osd crimson_seastar_num_threads $crimson_seastar_num_threads"
+ $CEPH_BIN/ceph -c $conf_fn config set osd crimson_seastar_num_threads "$crimson_seastar_num_threads"
+ fi
if [ "$(expr $(nproc) - 1)" -gt "$(($CEPH_NUM_OSD * crimson_smp))" ]; then
if [ $crimson_alien_num_cores -gt 0 ]; then
alien_bottom_cpu=$(($CEPH_NUM_OSD * crimson_smp))
3) Cluster creation:
# MDS=0 MON=1 OSD=1 MGR=1 ../src/vstart.sh --new -x --localhost --without-dashboard -o timeout=10000 -o session_timeout=10000 --bluestore --redirect-output --bluestore-devs /dev/sdd --crimson --crimson_seastar_num_threads 4
:
/ceph/build/bin/ceph -c /ceph/build/ceph.conf config set osd.0 crimson_seastar_cpu_cores 0-0 <-- mmh, does this look ok?
:
DEBUG 2024-06-18 18:32:00,210 [shard 0:main] monc - set_mon_vals crimson_alien_thread_cpu_cores = 1-31
DEBUG 2024-06-18 18:32:00,210 [shard 0:main] monc - set_mon_vals crimson_seastar_cpu_cores = 0-0
DEBUG 2024-06-18 18:32:00,210 [shard 0:main] monc - set_mon_vals crimson_seastar_num_threads = 4 <--
:
we end up with the following threads:
taskset -acp $(pgrep crimson-osd) ps -p $(pgrep crimson-osd) -L -o tid,comm,psr
pid 153873's current affinity list: 0 153873 crimson-osd 0
pid 153882's current affinity list: 0 153882 syscall-0 0
pid 153883's current affinity list: 0 153883 log 0
pid 153884's current affinity list: 1-31 153884 alien-store-tp 13
pid 153885's current affinity list: 1-31 153885 alien-store-tp 12
pid 153886's current affinity list: 1-31 153886 alien-store-tp 12
pid 153887's current affinity list: 1-31 153887 alien-store-tp 11
pid 153888's current affinity list: 1-31 153888 alien-store-tp 9
pid 153889's current affinity list: 1-31 153889 alien-store-tp 8
pid 153890's current affinity list: 0 153890 crimson-osd 0
pid 153891's current affinity list: 1-31 153891 bstore_aio 12
pid 153893's current affinity list: 1-31 153893 rocksdb:low 8
pid 153894's current affinity list: 1-31 153894 rocksdb:low 9
pid 153895's current affinity list: 1-31 153895 rocksdb:low 10
pid 153896's current affinity list: 1-31 153896 rocksdb:high 11
pid 154077's current affinity list: 1-31 154077 bstore_aio 13
pid 154258's current affinity list: 1-31 154258 alien-store-tp 30
pid 154259's current affinity list: 1-31 154259 cfin 8
pid 154260's current affinity list: 1-31 154260 bstore_kv_sync 9
pid 154261's current affinity list: 1-31 154261 bstore_kv_final 1
pid 154262's current affinity list: 1-31 154262 bstore_mempool 10
the reactor-[0-3] threads are missing :-(
YC Updated by Yingxin Cheng over 2 years ago · Edited
DEBUG 2024-06-18 18:32:00,210 [shard 0:main] monc - set_mon_vals crimson_seastar_cpu_cores = 0-0 DEBUG 2024-06-18 18:32:00,210 [shard 0:main] monc - set_mon_vals crimson_seastar_num_threads = 4 <--
Seems to me the issue is "crimson_seastar_cpu_cores" will override "crimson_seastar_cpu_cores" if both are set (hope the configuration descriptions are clear enough).
YC Updated by Yingxin Cheng over 2 years ago
1) Performance impact of Basic/Manual configuration¶
For Basic:
crimson_seastar_num_threads = 4
crimson_alien_op_num_threads = default
crimson_alien_thread_cpu_cores = $cpu_cores_start-$cpu_cores_end
Should seastar threads need to be constrained to 0-$alien_cpu_cores_start ? I suppose this may need some code changes?
4) hyperthreading and nproc¶
Hyperthreading is by-default enabled, in that case, the isolation based on logical CPUs `0-(seastarcores-1)` and `(seastarcores)-(nproc-1)` cannot isolate seastar and alienstore threads from physical CPUs perspective, in other words, during the tests:
1. 2 seastar threads may share the same physical core.
2. 1 seastar and x alienstore threads may share the same physical core.
3. There might be unnecessarily too many seastar reactors created.
From seastar reactor non-blocking and busy-polling design, I guess for the one-reactor-thread-per-core model, the "core" probably implies "physical core".
I'm not sure how the performance can differ between physical-core and logical-core based isolations, but I'm wondering that refering to the performance of logical-core based isolations might be misleading if that difference turns out to be possibly significant.
(I think it's fine to keep the current scope limited with the awareness of the above consideration)
MB Updated by Matan Breizman over 2 years ago
Seems to me the issue is "crimson_seastar_cpu_cores" will override "crimson_seastar_cpu_cores" if both are set (hope the configuration descriptions are clear enough).
Yes, that seems to be the case:
- name: crimson_seastar_num_threads
..
desc: The number of threads for serving seastar reactors without CPU pinning, overridden if crimson_seastar_cpu_cores is set
Should seastar threads need to be constrained to 0-$alien_cpu_cores_start ? I suppose this may need some code changes?
For this stage, I think that we are ok with seastar threads not being constrained.
This configuration was introduced to allow for easier deployments, setting crimson_seastar_cpu_cores is still the preferred option.
In order to have a better understanding of how the basic configuration impacts performance we are measuring it's impact (as a sanity check to verify that it's actually a viable option).
Moreover, if alien_cpu_cores_start is set, crimson_seastar_cpu_cores would be probably set as well. In a way, we can even test this without constraining alien cores at all (for "Basic" tests).
What do you think?
4) hyperthreading and nproc¶
I'm not sure how the performance can differ between physical-core and logical-core based isolations, but I'm wondering that refering to the performance of logical-core based isolations might be misleading if that difference turns out to be possibly significant.
This is an important observation. Let's keep the scope of the current tests to 1+2, 3+4 can be followed up later in a separate tracker.
Note: We should collect the result data to be referred from the Crimson docs as well.
JP Updated by Jose J Palacios Perez over 2 years ago
New attempt: for Basic config -- I edited this note yesterday but did not press "submit" :-(
# MDS=0 MON=1 OSD=1 MGR=1 ../src/vstart.sh --new -x --localhost --without-dashboard -o timeout=10000 -o session_timeout=10000 --bluestore --redirect-output --bluestore-devs /dev/sdd --crimson --crimson-smp 4 --crimson_seastar_num_threads 4
:
/ceph/build/bin/ceph -c /ceph/build/ceph.conf config set osd crimson_seastar_num_threads 4
crimson_alien_thread_cpu_cores: 4-31
:
/ceph/build/bin/ceph -c /ceph/build/ceph.conf config set osd.0 crimson_seastar_cpu_cores 0-3
:
DEBUG 2024-06-18 18:59:47,875 [shard 0:main] monc - set_mon_vals crimson_alien_thread_cpu_cores = 4-31
DEBUG 2024-06-18 18:59:47,875 [shard 0:main] monc - set_mon_vals crimson_seastar_cpu_cores = 0-3
DEBUG 2024-06-18 18:59:47,875 [shard 0:main] monc - set_mon_vals crimson_seastar_num_threads = 4
:
INFO 2024-06-18 18:59:47,876 [shard 0:main] osd - get_early_config: set --thread-affinity 1 --cpuset 0-3
DEBUG 2024-06-18 18:59:47,876 [shard 0:main] seastar - reactor::drain
INFO 2024-06-18 18:59:48,055 seastar - Reactor backend: linux-aio
created object store /ceph/build/dev/osd0 for osd.0 fsid 63779042-fdf2-4e0a-9b6b-6e9481db7d90
start osd.0
osd 0 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf
OSDs started
this looks more like it:
pid 155812's current affinity list: 0 155812 crimson-osd 0
pid 155820's current affinity list: 1 155820 reactor-1 1
pid 155821's current affinity list: 2 155821 reactor-2 2
pid 155822's current affinity list: 3 155822 reactor-3 3
pid 155823's current affinity list: 0 155823 syscall-0 0
pid 155824's current affinity list: 1 155824 syscall-1 1
pid 155825's current affinity list: 2 155825 syscall-2 2
pid 155826's current affinity list: 3 155826 syscall-3 3
pid 155827's current affinity list: 0 155827 log 0
pid 155828's current affinity list: 4-31 155828 alien-store-tp 11
pid 155829's current affinity list: 4-31 155829 alien-store-tp 9
pid 155830's current affinity list: 4-31 155830 alien-store-tp 7
pid 155831's current affinity list: 4-31 155831 alien-store-tp 6
pid 155832's current affinity list: 4-31 155832 alien-store-tp 5
pid 155833's current affinity list: 4-31 155833 alien-store-tp 4
pid 155834's current affinity list: 0 155834 crimson-osd 0
pid 155835's current affinity list: 3 155835 reactor-3 3
pid 155836's current affinity list: 1 155836 reactor-1 1
pid 155837's current affinity list: 2 155837 reactor-2 2
pid 155838's current affinity list: 4-31 155838 bstore_aio 9
pid 155840's current affinity list: 4-31 155840 rocksdb:low 12
pid 155841's current affinity list: 4-31 155841 rocksdb:low 13
pid 155842's current affinity list: 4-31 155842 rocksdb:low 30
pid 155843's current affinity list: 4-31 155843 rocksdb:high 31
pid 156024's current affinity list: 4-31 156024 bstore_aio 29
pid 156205's current affinity list: 4-31 156205 alien-store-tp 30
pid 156206's current affinity list: 4-31 156206 cfin 28
pid 156207's current affinity list: 4-31 156207 bstore_kv_sync 8
pid 156208's current affinity list: 4-31 156208 bstore_kv_final 31
pid 156209's current affinity list: 4-31 156209 bstore_mempool 26
Creating RBD image, prefill, and running the tests:
# bin/ceph osd pool create rbd
pool 'rbd' created
# bin/ceph osd pool application enable rbd rbd
enabled application 'rbd' on pool 'rbd'
# bin/rbd create --size 10G rbd/fio_test_0
# rbd ls
fio_test_0
# rbd du fio_test_0
NAME PROVISIONED USED
fio_test_0 10 GiB 0 B
# RBD_NAME=fio_test_0 RBD_SIZE="10G" fio /fio/examples/rbd_prefill.fio
prefill: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=rbd, iodepth=4
...
Run status group 0 (all jobs):
WRITE: bw=65.8MiB/s (69.0MB/s), 65.8MiB/s-65.8MiB/s (69.0MB/s-69.0MB/s), io=17.9GiB (19.2GB), run=277999-277999msec
# rbd du fio_test_0
NAME PROVISIONED USED
fio_test_0 10 GiB 10 GiB
# /root/bin/run_fio.sh -s -a -c "0-31" -p crimson_1osd_4reactor_basic
MB Updated by Matan Breizman over 2 years ago · Edited
Jose J Palacios Perez wrote in #note-10:
this looks more like it:
Great! Few suggestions:
You can remove/comment out the `crimson_seastar_cpu_cores` bit from vstart to avoid confusion. Also, you can set the basic/manual config when the osd is running - you'll just need to restart the osds for the changes to take place. That can be more handy than editing vstart.
Few examples:
ceph config set osd.0 crimson_seastar_cpu_cores 0-1
ceph config get osd crimson_alien_thread_cpu_cores
ceph config get osd.0 crimson_alien_thread_cpu_cores
ceph config set osd crimson_alien_thread_cpu_cores 3-79
ceph config get osd.0 crimson_alien_thread_cpu_cores
ceph config get osd.0 crimson_seastar_cpu_cores
ceph config rm osd crimson_alien_thread_cpu_cores
ceph config rm osd.0 crimson_seastar_cpu_cores
Going back to my previous comment, if time allows (and you think that it's useful aswell), you can also try adding another test to the first one where we don't pin the alienstore cores when using basic conf.
YC Updated by Yingxin Cheng over 2 years ago
For this stage, I think that we are ok with seastar threads not being constrained.
This configuration was introduced to allow for easier deployments, setting crimson_seastar_cpu_cores is still the preferred option.
In order to have a better understanding of how the basic configuration impacts performance we are measuring it's impact (as a sanity check to verify that it's actually a viable option).Moreover, if alien_cpu_cores_start is set, crimson_seastar_cpu_cores would be probably set as well. In a way, we can even test this without constraining alien cores at all (for "Basic" tests).
What do you think?
Hm, if seastar threads are not constrained in Basic, probably alien-thread cpu cores shouldn't be constrained as well, right?
In another word, for https://tracker.ceph.com/issues/66525#note-3 (1) Basic/Manual case, it should be adjusted to:
For Basic:
crimson_seastar_num_threads = 1/2/4/8
crimson_alien_op_num_threads = defaultcrimson_alien_thread_cpu_cores = $cpu_cores_start$cpu_cores_end
Is that reasonable?
JP Updated by Jose J Palacios Perez over 2 years ago
- File crimson_osd_crimson_1osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png crimson_osd_crimson_1osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png added
- File core_crimson_osd_crimson_1osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_us.png core_crimson_osd_crimson_1osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_us.png added
- File core_crimson_osd_crimson_1osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_sys.png core_crimson_osd_crimson_1osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_sys.png added
- File crimson_osd_crimson_1osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png crimson_osd_crimson_1osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png added
- File core_crimson_osd_crimson_1osd_4reactor_basic_16job_16io_4k_randread_p0_top_us.png core_crimson_osd_crimson_1osd_4reactor_basic_16job_16io_4k_randread_p0_top_us.png added
- File core_crimson_osd_crimson_1osd_4reactor_basic_16job_16io_4k_randread_p0_top_sys.png core_crimson_osd_crimson_1osd_4reactor_basic_16job_16io_4k_randread_p0_top_sys.png added
Preliminary Results¶
crimson 1OSD basic¶
crimson_1osd_4reactor_basic_1procs_randwrite¶
| IOPs | Lat(ms) | FIO_usr% | FIO_sys% | OSD_usr% | OSD_sys% |
|---|---|---|---|---|---|
| 6075.50 | 10.53 | 0.72 | 0.51 | 11.00 | 2.44 |
- The following chart shows the avg CPU% util per thread, (from the Linux top in descending order) -- note the slight ~10% peak in rocksdb:high.

- The following charts show the Usr and Sys CPU% util (per CPU processor id).
Usr Sys
crimson_1osd_4reactor_basic_1procs_randread¶
| IOPs | Lat(ms) | FIO_usr% | FIO_sys% | OSD_usr% | OSD_sys% |
|---|---|---|---|---|---|
| 25817.03 | 9.91 | 0.59 | 0.52 | 13.16 | 4.06 |
- Thread CPU util%:

- CPU core util%:
Usr Sys
JP Updated by Jose J Palacios Perez over 2 years ago
- File crimson_osd_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png crimson_osd_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png added
- File core_crimson_osd_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_us.png core_crimson_osd_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_us.png added
- File core_crimson_osd_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_sys.png core_crimson_osd_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_sys.png added
- File crimson_osd_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png crimson_osd_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png added
- File core_crimson_osd_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_us.png core_crimson_osd_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_us.png added
- File core_crimson_osd_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_sys.png core_crimson_osd_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_sys.png added
crimson 4 OSD basic¶
There seems have occurred an anomaly during all these tests (sudden drop), could it be a sign of CPU contention? I'll attempt a subsequent run to verify
crimson_4osd_4reactor_basic_1procs_randwrite¶
| IOPs | Lat(ms) | FIO_usr% | FIO_sys% | OSD_usr% | OSD_sys% |
|---|---|---|---|---|---|
| 2320.54 | 27.57 | 0.33 | 0.20 | 22.34 | 5.23 |
- Thread CPU util%:

- CPU core util%:
Usr Sys
crimson_4osd_4reactor_basic_1procs_randread¶
| IOPs | Lat(ms) | FIO_usr% | FIO_sys% | OSD_usr% | OSD_sys% |
|---|---|---|---|---|---|
| 13652.08 | 18.76 | 0.37 | 0.28 | 18.09 | 2.94 |
- Thread CPU util%:

- CPU core util%:
Usr Sys
Details of setup:¶
Only changed a single value (that isOSD=4) when creating the cluster:# MDS=0 MON=1 OSD=4 MGR=1 ../src/vstart.sh --new -x --localhost --without-dashboard -o timeout=10000 -o session_timeout=10000 --bluestore --redirect-output --bluestore-devs /dev/sdd --crimson --crimson-smp 4 --crimson_seastar_num_threads 4
:
/ceph/build/bin/ceph -c /ceph/build/ceph.conf config set osd.0 crimson_seastar_cpu_cores 0-3
:
DEBUG 2024-06-19 10:14:01,306 [shard 0:main] monc - set_mon_vals crimson_alien_thread_cpu_cores = 16-31
DEBUG 2024-06-19 10:14:01,306 [shard 0:main] monc - set_mon_vals crimson_seastar_cpu_cores = 0-3
DEBUG 2024-06-19 10:14:01,306 [shard 0:main] monc - set_mon_vals crimson_seastar_num_threads = 4
:
start osd.0
osd 0 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf
/ceph/build/bin/ceph -c /ceph/build/ceph.conf config set osd.1 crimson_seastar_cpu_cores 4-7
:
start osd.1
osd 1 /ceph/build/bin/crimson-osd -i 1 -c /ceph/build/ceph.conf
/ceph/build/bin/ceph -c /ceph/build/ceph.conf config set osd.2 crimson_seastar_cpu_cores 8-11
:
DEBUG 2024-06-19 10:14:08,433 [shard 0:main] monc - set_mon_vals crimson_alien_thread_cpu_cores = 16-31 DEBUG 2024-06-19 10:14:08,433 [shard 0:main] monc - set_mon_vals crimson_seastar_cpu_cores = 8-11
DEBUG 2024-06-19 10:14:08,433 [shard 0:main] monc - set_mon_vals crimson_seastar_num_threads = 4
:
INFO 2024-06-19 10:14:08,434 [shard 0:main] osd - get_early_config: set --thread-affinity 1 --cpuset 8-11
:
start osd.2
osd 2 /ceph/build/bin/crimson-osd -i 2 -c /ceph/build/ceph.conf
/ceph/build/bin/ceph -c /ceph/build/ceph.conf config set osd.3 crimson_seastar_cpu_cores 12-15
:
INFO 2024-06-19 10:14:12,250 [shard 0:main] osd - get_early_config: set --thread-affinity 1 --cpuset 12-15
:
start osd.3
osd 3 /ceph/build/bin/crimson-osd -i 3 -c /ceph/build/ceph.conf
OSDs started
INFO 2024-06-19 10:14:12,250 [shard 0:main] osd - get_early_config: set --thread-affinity 1 --cpuset 12-15
- Verification of the OSD and thread CPU assignment:
159567 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f 159569 pts/0 Sl 0:00 /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f 159782 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f 159786 pts/0 Sl 0:03 /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f 160851 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f 160852 pts/0 Sl 0:03 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f 162077 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/crimson-osd -i 1 -c /ceph/build/ceph.conf -f 162078 pts/0 Sl 0:03 /ceph/build/bin/crimson-osd -i 1 -c /ceph/build/ceph.conf -f 163303 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/crimson-osd -i 2 -c /ceph/build/ceph.conf -f 163304 pts/0 Sl 0:03 /ceph/build/bin/crimson-osd -i 2 -c /ceph/build/ceph.conf -f 164530 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/crimson-osd -i 3 -c /ceph/build/ceph.conf -f 164531 pts/0 Sl 0:03 /ceph/build/bin/crimson-osd -i 3 -c /ceph/build/ceph.conf -f # for p in $(pgrep crimson-osd); do taskset -acp $p >> /tmp/taskset_4osd.out; ps -p $p -L -o tid,comm,psr >> /tmp/ps_4osd.out; done; paste /tmp/taskset_4osd.out /tmp/ps_4osd.out # paste /tmp/taskset_4osd.out /tmp/ps_4osd.out pid 160852's current affinity list: 0 160852 crimson-osd 0 pid 160907's current affinity list: 1 160907 reactor-1 1 pid 160908's current affinity list: 2 160908 reactor-2 2 pid 160909's current affinity list: 3 160909 reactor-3 3 pid 160910's current affinity list: 0 160910 syscall-0 0 pid 160911's current affinity list: 1 160911 syscall-1 1 pid 160912's current affinity list: 2 160912 syscall-2 2 pid 160913's current affinity list: 3 160913 syscall-3 3 pid 160915's current affinity list: 0 160915 log 0 pid 160916's current affinity list: 16-31 160916 alien-store-tp 23 pid 160917's current affinity list: 16-31 160917 alien-store-tp 20 pid 160918's current affinity list: 16-31 160918 alien-store-tp 19 pid 160919's current affinity list: 16-31 160919 alien-store-tp 18 pid 160920's current affinity list: 16-31 160920 alien-store-tp 17 pid 160921's current affinity list: 16-31 160921 alien-store-tp 16 pid 160922's current affinity list: 0 160922 crimson-osd 0 pid 160923's current affinity list: 3 160923 reactor-3 3 pid 160924's current affinity list: 2 160924 reactor-2 2 pid 160925's current affinity list: 1 160925 reactor-1 1 pid 160927's current affinity list: 16-31 160927 bstore_aio 22 pid 160929's current affinity list: 16-31 160929 rocksdb:low 31 pid 160930's current affinity list: 16-31 160930 rocksdb:low 30 pid 160931's current affinity list: 16-31 160931 rocksdb:low 28 pid 160932's current affinity list: 16-31 160932 rocksdb:high 31 pid 161118's current affinity list: 16-31 161118 bstore_aio 30 pid 161299's current affinity list: 16-31 161299 alien-store-tp 31 pid 161300's current affinity list: 16-31 161300 cfin 30 pid 161301's current affinity list: 16-31 161301 bstore_kv_sync 17 pid 161302's current affinity list: 16-31 161302 bstore_kv_final 19 pid 161303's current affinity list: 16-31 161303 bstore_mempool 28 pid 162078's current affinity list: 4 162078 crimson-osd 4 pid 162133's current affinity list: 5 162133 reactor-1 5 pid 162134's current affinity list: 6 162134 reactor-2 6 pid 162135's current affinity list: 7 162135 reactor-3 7 pid 162136's current affinity list: 4 162136 syscall-0 4 pid 162137's current affinity list: 7 162137 syscall-3 7 pid 162138's current affinity list: 6 162138 syscall-2 6 pid 162139's current affinity list: 5 162139 syscall-1 5 pid 162140's current affinity list: 4 162140 log 4 pid 162141's current affinity list: 16-31 162141 alien-store-tp 21 pid 162142's current affinity list: 16-31 162142 alien-store-tp 20 pid 162143's current affinity list: 16-31 162143 alien-store-tp 16 pid 162144's current affinity list: 16-31 162144 alien-store-tp 19 pid 162145's current affinity list: 16-31 162145 alien-store-tp 18 pid 162146's current affinity list: 16-31 162146 alien-store-tp 17 pid 162147's current affinity list: 4 162147 crimson-osd 4 pid 162148's current affinity list: 6 162148 reactor-2 6 pid 162149's current affinity list: 7 162149 reactor-3 7 pid 162150's current affinity list: 5 162150 reactor-1 5 pid 162151's current affinity list: 16-31 162151 bstore_aio 17 pid 162153's current affinity list: 16-31 162153 rocksdb:low 18 pid 162154's current affinity list: 16-31 162154 rocksdb:low 19 pid 162155's current affinity list: 16-31 162155 rocksdb:low 16 pid 162156's current affinity list: 16-31 162156 rocksdb:high 17 pid 162344's current affinity list: 16-31 162344 bstore_aio 30 pid 162525's current affinity list: 16-31 162525 alien-store-tp 29 pid 162526's current affinity list: 16-31 162526 cfin 30 pid 162527's current affinity list: 16-31 162527 bstore_kv_sync 31 pid 162528's current affinity list: 16-31 162528 bstore_kv_final 28 pid 162529's current affinity list: 16-31 162529 bstore_mempool 29 pid 163304's current affinity list: 8 163304 crimson-osd 8 pid 163359's current affinity list: 9 163359 reactor-1 9 pid 163360's current affinity list: 10 163360 reactor-2 10 pid 163361's current affinity list: 11 163361 reactor-3 11 pid 163362's current affinity list: 8 163362 syscall-0 8 pid 163370's current affinity list: 10 163370 syscall-2 10 pid 163371's current affinity list: 11 163371 syscall-3 11 pid 163372's current affinity list: 9 163372 syscall-1 9 pid 163373's current affinity list: 8 163373 log 8 pid 163374's current affinity list: 16-31 163374 alien-store-tp 22 pid 163375's current affinity list: 16-31 163375 alien-store-tp 21 pid 163376's current affinity list: 16-31 163376 alien-store-tp 19 pid 163377's current affinity list: 16-31 163377 alien-store-tp 18 pid 163378's current affinity list: 16-31 163378 alien-store-tp 17 pid 163379's current affinity list: 16-31 163379 alien-store-tp 16 pid 163380's current affinity list: 8 163380 crimson-osd 8 pid 163381's current affinity list: 11 163381 reactor-3 11 pid 163382's current affinity list: 10 163382 reactor-2 10 pid 163383's current affinity list: 9 163383 reactor-1 9 pid 163384's current affinity list: 16-31 163384 bstore_aio 30 pid 163387's current affinity list: 16-31 163387 rocksdb:low 23 pid 163388's current affinity list: 16-31 163388 rocksdb:low 28 pid 163389's current affinity list: 16-31 163389 rocksdb:low 28 pid 163390's current affinity list: 16-31 163390 rocksdb:high 28 pid 163571's current affinity list: 16-31 163571 bstore_aio 22 pid 163756's current affinity list: 16-31 163756 alien-store-tp 19 pid 163757's current affinity list: 16-31 163757 cfin 16 pid 163758's current affinity list: 16-31 163758 bstore_kv_sync 18 pid 163759's current affinity list: 16-31 163759 bstore_kv_final 21 pid 163760's current affinity list: 16-31 163760 bstore_mempool 20 pid 164531's current affinity list: 12 164531 crimson-osd 12 pid 164539's current affinity list: 13 164539 reactor-1 13 pid 164540's current affinity list: 14 164540 reactor-2 14 pid 164541's current affinity list: 15 164541 reactor-3 15 pid 164542's current affinity list: 12 164542 syscall-0 12 pid 164558's current affinity list: 14 164558 syscall-2 14 pid 164559's current affinity list: 15 164559 syscall-3 15 pid 164560's current affinity list: 13 164560 syscall-1 13 pid 164561's current affinity list: 12 164561 log 12 pid 164562's current affinity list: 16-31 164562 alien-store-tp 21 pid 164563's current affinity list: 16-31 164563 alien-store-tp 20 pid 164564's current affinity list: 16-31 164564 alien-store-tp 19 pid 164565's current affinity list: 16-31 164565 alien-store-tp 18 pid 164566's current affinity list: 16-31 164566 alien-store-tp 17 pid 164567's current affinity list: 16-31 164567 alien-store-tp 16 pid 164568's current affinity list: 12 164568 crimson-osd 12 pid 164569's current affinity list: 13 164569 reactor-1 13 pid 164570's current affinity list: 14 164570 reactor-2 14 pid 164571's current affinity list: 15 164571 reactor-3 15 pid 164572's current affinity list: 16-31 164572 bstore_aio 17 pid 164574's current affinity list: 16-31 164574 rocksdb:low 19 pid 164575's current affinity list: 16-31 164575 rocksdb:low 17 pid 164576's current affinity list: 16-31 164576 rocksdb:low 18 pid 164577's current affinity list: 16-31 164577 rocksdb:high 21 pid 164758's current affinity list: 16-31 164758 bstore_aio 23 pid 164939's current affinity list: 16-31 164939 alien-store-tp 22 pid 164940's current affinity list: 16-31 164940 cfin 18 pid 164941's current affinity list: 16-31 164941 bstore_kv_sync 19 pid 164942's current affinity list: 16-31 164942 bstore_kv_final 17 pid 164943's current affinity list: 16-31 164943 bstore_mempool 20 - Creation of single RBD image, prefill and tests execution:
# bin/ceph osd pool create rbd pool 'rbd' created @2bac8f8d9dd1:/ceph/build [10:25:01]$ # bin/ceph osd pool application enable rbd rbd enabled application 'rbd' on pool 'rbd' @2bac8f8d9dd1:/ceph/build [10:25:10]$ # bin/rbd create --size 10G rbd/fio_test_0 @2bac8f8d9dd1:/ceph/build [10:25:22]$ # rbd ls fio_test_0 @2bac8f8d9dd1:/ceph/build [10:25:29]$ # rbd du fio_test_0 NAME PROVISIONED USED fio_test_0 10 GiB 0 B # RBD_NAME=fio_test_0 RBD_SIZE="10G" fio /fio/examples/rbd_prefill.fio && rbd du fio_test_0 && cd /tmp; /root/bin/run_fio.sh -s -a -c "0-31" -p crimson_4osd_4reactor_basic Disk stats (read/write): sdb: ios=3/8925869, sectors=24/144295584, merge=0/331910, ticks=2/1097429, in_queue=1384931, util=99.99% NAME PROVISIONED USED fio_test_0 10 GiB 10 GiB == priming == == 16: 16: crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0 == [ perf record: Woken up 1861 times to write data ] [ perf record: Woken up 3649 times to write data ] [ perf record: Woken up 2093 times to write data ] [ perf record: Woken up 2708 times to write data ] [ perf record: Woken up 1711 times to write data ] 0x2f2850 [0]: failed to process type: 0 [Invalid argument] 0x2f2850 [0]: failed to process type: 0 [Invalid argument] [ perf record: Captured and wrote 473.770 MB crimson_osd_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0.perf.out (350 samples) ] [ perf record: Captured and wrote 928.899 MB crimson_osd_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0.perf.out (350 samples) ] 0x2f2850 [0]: failed to process type: 0 [Invalid argument] [ perf record: Captured and wrote 528.428 MB crimson_osd_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0.perf.out (350 samples) ] 0x2f2850 [0]: failed to process type: 0 [Invalid argument] [ perf record: Captured and wrote 689.098 MB crimson_osd_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0.perf.out (350 samples) ] Warning: Processed 56926 events and lost 2 chunks! Check IO/CPU overload!
JP Updated by Jose J Palacios Perez over 2 years ago
- File crimson_osd_02_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png crimson_osd_02_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png added
- File core_crimson_osd_02_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_us.png core_crimson_osd_02_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_us.png added
- File core_crimson_osd_02_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_sys.png core_crimson_osd_02_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_sys.png added
- File crimson_osd_02_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png crimson_osd_02_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png added
- File core_crimson_osd_02_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_us.png core_crimson_osd_02_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_us.png added
- File core_crimson_osd_02_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_sys.png core_crimson_osd_02_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_sys.png added
Managed to recreate the same issue last night, I will continue investigating whether this is a genuine issue, I might use a different benchmark (eg. rbd bench) as well.
crimson 4OSD basic -- recreate¶
crimson_4osd_4reactor_basic_1procs_randwrite¶
| IOPs | Lat(ms) | FIO_usr% | FIO_sys% | OSD_usr% | OSD_sys% |
|---|---|---|---|---|---|
| 2487.80 | 25.90 | 0.35 | 0.21 | 21.68 | 5.21 |
- Thread CPU util%:

- CPU core util%:
.Usr|.Sys|
crimson_4osd_4reactor_basic_1procs_randread¶
Note how the IOPs for this is 178% higher than the previous run, so this also points out an issue with the priming stage the mistake seems to be in the rbd_prime.fio workload config file for the argument RBD_SIZE --
| IOPs | Lat(ms) | FIO_usr% | FIO_sys% | OSD_usr% | OSD_sys% |
|---|---|---|---|---|---|
| 24322.51 | 10.52 | 0.49 | 0.34 | 19.29 | 3.65 |
- Thread CPU util%:

- CPU core util%:
Usr Sys
JP Updated by Jose J Palacios Perez over 2 years ago
- File crimson_osd_02_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top.out crimson_osd_02_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top.out added
- File crimson_osd_02_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top.out crimson_osd_02_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top.out added
Visually examined the contents of the top output from the random write (crimson_osd_02_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top.out -- attached), the chart shown above looks correct, the drops in performance can be seen from the data. Also checked the random read output crimson_osd_02_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top.out.
We get the top data is as follows:
top -b -H -1 -p ${PID} -n 30 > ${TEST_NAME}_top.out &
One data sample is taken each 3 seconds -- x-axis in the charts indicates the sample (90 secs in total per chart).
I need to find a complementary source of data: for the CPU utilisation per thread indicating on which CPU core was running when the sample was taken. Checking for contention might be a bit trickier...
JP Updated by Jose J Palacios Perez over 2 years ago
- File run_fio.sh run_fio.sh added
These are the number of running threads for the 4OSD basic configuration:
# for p in $(pgrep crimson-osd); do ps -p $p --no-headers -L -o tid,comm,psr; done | grep -c alien
21
@2bac8f8d9dd1:/tmp
[10:44:03]$ # for p in $(pgrep crimson-osd); do ps -p $p --no-headers -L -o tid,comm,psr; done | grep -c reactor
18
@2bac8f8d9dd1:/tmp
[10:44:12]$ # for p in $(pgrep crimson-osd); do ps -p $p --no-headers -L -o tid,comm,psr; done | grep -c crimson
6
and these are their CPU cores (processor ids): -- I group the reactors together, they do not seem to overlap
# for p in $(pgrep crimson-osd); do ps -p $p --no-headers -L -o tid,comm,psr; done | grep crimson
169068 crimson-osd 0
169137 crimson-osd 0
170294 crimson-osd 4
170363 crimson-osd 4
171520 crimson-osd 8
171596 crimson-osd 8
@2bac8f8d9dd1:/tmp
[10:46:17]$ # for p in $(pgrep crimson-osd); do ps -p $p --no-headers -L -o tid,comm,psr; done | grep reactor
169103 reactor-1 1
169139 reactor-1 1
170349 reactor-1 5
170365 reactor-1 5
171575 reactor-1 9
171597 reactor-1 9
169104 reactor-2 2
169138 reactor-2 2
170350 reactor-2 6
170366 reactor-2 6
171576 reactor-2 10
171598 reactor-2 10
169140 reactor-3 3
169105 reactor-3 3
170351 reactor-3 7
170364 reactor-3 7
171577 reactor-3 11
171599 reactor-3 11
@2bac8f8d9dd1:/tmp
[10:46:27]$ # for p in $(pgrep crimson-osd); do ps -p $p --no-headers -L -o tid,comm,psr; done | grep alien
169131 alien-store-tp 29
169132 alien-store-tp 21
169133 alien-store-tp 28
169134 alien-store-tp 31
169135 alien-store-tp 16
169136 alien-store-tp 24
169515 alien-store-tp 26
170357 alien-store-tp 17
170358 alien-store-tp 16
170359 alien-store-tp 24
170360 alien-store-tp 23
170361 alien-store-tp 27
170362 alien-store-tp 31
170741 alien-store-tp 31
171590 alien-store-tp 19
171591 alien-store-tp 17
171592 alien-store-tp 23
171593 alien-store-tp 22
171594 alien-store-tp 20
171595 alien-store-tp 21
171968 alien-store-tp 17
all the alien threads are running on the HT siblings, not sure if that can be attributed to the drop in CPU util. I also need to rule out that FIO can be doing some coalescing/caching for 4k random workloads -- not seen anything like this before.
FIO is run in its own core as follows (attaching a copy of the script used):
FIO_CORES="15-15"
:
RBD_NAME=fio_test_${i} IO_DEPTH=$io NUM_JOBS=$job taskset -ac ${FIO_CORES} fio /fio/examples/rbd_${map[${WORKLOAD}]}.fio --output=fio_${TEST_NAME}.json --output-format=json 2>&1 > /dev/null &
so we allocated to CPU id 15 only, and the following confirms that such processor id might not been used for any crimson threads:
# for p in $(pgrep crimson-osd); do ps -p $p --no-headers -L -o tid,comm,psr; done | grep 15
169515 alien-store-tp 26
171520 crimson-osd 8
171575 reactor-1 9
171576 reactor-2 10
171577 reactor-3 11
171578 syscall-0 8
171586 syscall-1 9
171587 syscall-2 10
171588 syscall-3 11
171589 log 8
171590 alien-store-tp 19
171591 alien-store-tp 17
171592 alien-store-tp 23
171593 alien-store-tp 22
171594 alien-store-tp 20
171595 alien-store-tp 21
171596 crimson-osd 8
171597 reactor-1 9
171598 reactor-2 10
171599 reactor-3 11
JP Updated by Jose J Palacios Perez over 2 years ago
top - 18:34:34 up 34 days, 9:59, 0 users, load average: 9.20, 10.32, 10.41
:
%Cpu16 : 2.0 us, 1.7 sy, 0.0 ni, 67.8 id, 28.1 wa, 0.0 hi, 0.3 si, 0.0 st
:
%Cpu26 : 1.7 us, 3.1 sy, 0.0 ni, 52.0 id, 42.5 wa, 0.3 hi, 0.3 si, 0.0 st %Cpu27 : 2.7 us, 2.7 sy, 0.0 ni, 66.1 id, 27.9 wa, 0.0 hi, 0.7 si, 0.0 st
%Cpu28 : 2.4 us, 2.4 sy, 0.0 ni, 60.1 id, 34.8 wa, 0.0 hi, 0.3 si, 0.0 st %Cpu29 : 2.7 us, 2.0 sy, 0.0 ni, 86.5 id, 8.4 wa, 0.0 hi, 0.3 si, 0.0 st
MiB Mem : 128288.1 total, 1376.6 free, 105097.5 used, 23016.4 buff/cache
MiB Swap: 4096.0 total, 3949.7 free, 146.2 used. 23190.6 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
172745 root 20 0 16.0t 42.9g 60252 S 31.9 34.2 19:59.55 crimson-osd
172753 root 20 0 16.0t 42.9g 60252 S 22.3 34.2 11:24.68 reactor-1
172754 root 20 0 16.0t 42.9g 60252 S 21.3 34.2 6:53.78 reactor-2
172755 root 20 0 16.0t 42.9g 60252 S 8.6 34.2 3:49.97 reactor-3
and then more significantly:
%Cpu11 : 0.3 us, 0.3 sy, 0.0 ni, 72.7 id, 26.7 wa, 0.0 hi, 0.0 si, 0.0 st
:
%Cpu16 : 0.3 us, 0.0 sy, 0.0 ni, 72.4 id, 27.2 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu17 : 0.0 us, 0.0 sy, 0.0 ni, 91.7 id, 8.3 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu18 : 0.0 us, 0.0 sy, 0.0 ni, 96.3 id, 3.7 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu19 : 0.0 us, 0.0 sy, 0.0 ni, 66.0 id, 34.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu20 : 0.0 us, 0.0 sy, 0.0 ni, 76.6 id, 23.4 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu21 : 0.0 us, 0.0 sy, 0.0 ni, 54.5 id, 45.5 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu22 : 0.0 us, 0.0 sy, 0.0 ni, 94.7 id, 5.3 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu23 : 0.3 us, 0.0 sy, 0.0 ni, 99.3 id, 0.3 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu24 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu25 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu26 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu27 : 0.0 us, 0.7 sy, 0.0 ni, 27.0 id, 72.3 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu28 : 0.0 us, 0.0 sy, 0.0 ni, 63.7 id, 36.3 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu29 : 0.0 us, 0.0 sy, 0.0 ni, 78.7 id, 21.3 wa, 0.0 hi, 0.0 si, 0.0 st
:
MiB Mem : 128288.1 total, 1377.2 free, 105096.7 used, 23016.6 buff/cache
MiB Swap: 4096.0 total, 3949.7 free, 146.2 used. 23191.4 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
172745 root 20 0 16.0t 42.9g 60252 S 1.0 34.2 19:59.58 crimson-osd
172754 root 20 0 16.0t 42.9g 60252 S 1.0 34.2 6:53.81 reactor-2
172753 root 20 0 16.0t 42.9g 60252 S 0.7 34.2 11:24.70 reactor-1
172762 root 20 0 16.0t 42.9g 60252 S 0.7 34.2 0:12.12 alien-store-tp
172755 root 20 0 16.0t 42.9g 60252 S 0.3 34.2 3:49.98 reactor-3
172756 root 20 0 16.0t 42.9g 60252 S 0.0 34.2 0:00.00 syscall-0
172757 root 20 0 16.0t 42.9g 60252 S 0.0 34.2 0:00.00 syscall-1
172758 root 20 0 16.0t 42.9g 60252 S 0.0 34.2 0:00.00 syscall-3
172759 root 20 0 16.0t 42.9g 60252 S 0.0 34.2 0:00.00 syscall-2
- I would try confirm this with rbd bench for random workloads, also see if it makes a difference for this config of 4 OSD to use the three available SSDs for backup.
Max seen is probably this (sibling processor id, so an alien thread)
%Cpu24 : 0.0 us, 0.3 sy, 0.0 ni, 46.7 id, 53.0 wa, 0.0 hi, 0.0 si, 0.0 st
JP Updated by Jose J Palacios Perez over 2 years ago
Tracing back: it seems that during the tests, one OSD went down and I didn't notice -- they should be four and only three are running:
[10:42:31]$ # ps ax
PID TTY STAT TIME COMMAND
1 ? Ss 0:00 sshd: /sbin/sshd -D [listener] 0 of 10-100 startups
6 ? Ss 0:00 sshd: root [priv]
8 ? R 0:04 sshd: root@pts/0
9 pts/0 Ss 0:00 -bash
78499 ? Ss 0:00 sshd: root [priv]
78501 ? S 0:00 sshd: root@pts/1
78502 pts/1 Ss+ 0:00 -bash
167783 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f
167785 pts/0 Sl 4:24 /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f
167998 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f
168002 pts/0 Sl 7:28 /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f
169067 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f
169068 pts/0 Sl 112:57 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f
170293 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/crimson-osd -i 1 -c /ceph/build/ceph.conf -f
170294 pts/0 Sl 80:41 /ceph/build/bin/crimson-osd -i 1 -c /ceph/build/ceph.conf -f
171519 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/crimson-osd -i 2 -c /ceph/build/ceph.conf -f
171520 pts/0 Sl 50:04 /ceph/build/bin/crimson-osd -i 2 -c /ceph/build/ceph.conf -f
# for x in osd.?.pid; do echo $x; cat $x; done
osd.0.pid
169068
osd.1.pid
170294
osd.2.pid
289593
osd.3.pid
172745 <-- missing
# ps ax | grep crimson-osd
169067 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f
169068 pts/0 Sl 119:52 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f
170293 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/crimson-osd -i 1 -c /ceph/build/ceph.conf -f
170294 pts/0 Sl 87:25 /ceph/build/bin/crimson-osd -i 1 -c /ceph/build/ceph.conf -f
171519 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/crimson-osd -i 2 -c /ceph/build/ceph.conf -f
287130 pts/0 Sl 0:03 /ceph/build/bin/crimson-osd -i 2 -c /ceph/build/ceph.conf -f
it was probably osd.3:
/ceph/build/out
[14:03:00]$ # ls -lht osd.*.log
-rw-r--r--. 1 root root 187M Jun 20 14:03 osd.0.log
-rw-r--r--. 1 root root 119M Jun 20 14:03 osd.1.log
-rw-r--r--. 1 root root 141M Jun 20 14:02 osd.2.log
-rw-r--r--. 1 root root 1.3G Jun 19 18:47 osd.3.log <--
last few entries:
INFO 2024-06-19 18:47:20,778 [shard 0:main] alienstore - stat
INFO 2024-06-19 18:47:20,831 [shard 0:main] prioritycache - prioritycache tune_memory target: 4294967296 mapped: 5395562496 unmapped: 29720576 heap: 5425283072 old mem: 134423897 new mem: 134381842
INFO 2024-06-19 18:47:20,870 [shard 0:main] rocksdb - rocksdb: commit_cache_size High Pri Pool Ratio set to 0
INFO 2024-06-19 18:47:20,878 [shard 0:main] rocksdb - rocksdb: commit_cache_size High Pri Pool Ratio set to 0
INFO 2024-06-19 18:47:20,878 [shard 0:main] prioritycache - prioritycache tune_memory target: 4294967296 mapped: 5395562496 unmapped: 29720576 heap: 5425283072 old mem: 134381842 new mem: 134348365
INFO 2024-06-19 18:47:20,878 [shard 0:main] bluestore - bluestore.MempoolThread(0x600000132b50) _resize_shards cache_size: 134348365 kv_alloc: 67108864 kv_used: 9030400 kv_onode_alloc: 67108864 kv_onode_used: 1282720 meta_alloc: 67108864 meta_used: 64995251 data_alloc: 67108864 data_used: 67084288
ERROR 2024-06-19 18:47:20,899 [shard 2:main] ms - ms_dispatch unhandled message ping magic: 0 v1
INFO 2024-06-19 18:47:24,782 [shard 1:main] osd - PerShardState::start_operation, PeeringEvent(from=3 pgid=2.0 sent=17 requested=17 evt=epoch_sent: 17 epoch_requested: 17 RenewLease)
there are several of these entries:
e24) v9 got error: generic:16
osd.3.log:10712661:ERROR 2024-06-19 18:45:41,669 [shard 0:main] osd - do_update_log_missing_reply : 2.1a got reply pg_update_log_missing_reply(2.1a epoch 24/17 rep_tid 1430411 lcod 24'1325961) v3 on unknown tid 1430411
osd.3.log:10712662:ERROR 2024-06-19 18:45:41,670 [shard 0:main] osd - do_update_log_missing_reply : 2.1a got reply pg_update_log_missing_reply(2.1a epoch 24/17 rep_tid 1430412 lcod 24'1325962) v3 from shard we are not waiting for
osd.3.log:10712663:ERROR 2024-06-19 18:45:41,670 [shard 0:main] osd - do_osd_ops_execute::failure_func osd_op(client.4277.0:743710 2.1a 2:58ccd3d4:::rbd_header.1077f11195ff:head {call lock.lock in=69b} snapc 0={} ondisk+write+known_if_redirected+supports_pool_eio e24) v9 got error: generic:16
osd.3.log:10712668:ERROR 2024-06-19 18:45:41,670 [shard 0:main] osd - do_update_log_missing_reply : 2.1a got reply pg_update_log_missing_reply(2.1a epoch 24/17 rep_tid 1430412 lcod 24'1325962) v3 on unknown tid 1430412
osd.3.log:10712688:ERROR 2024-06-19 18:45:41,674 [shard 0:main] osd - do_update_log_missing_reply : 2.1a got reply pg_update_log_missing_reply(2.1a epoch 24/17 rep_tid 1430415 lcod 24'1325965) v3 from shard we are not waiting for
osd.3.log:10712689:ERROR 2024-06-19 18:45:41,674 [shard 0:main] osd - do_osd_ops_execute::failure_func osd_op(client.4275.0:744991 2.1a 2:58ccd3d4:::rbd_header.1077f11195ff:head {call lock.lock in=69b} snapc 0={} ondisk+write+known_if_redirected+supports_pool_eio e24) v9 got error: generic:16
osd.3.log:10712690:ERROR 2024-06-19 18:45:41,674 [shard 0:main] osd - do_update_log_missing_reply : 2.1a got reply pg_update_log_missing_reply(2.1a epoch 24/17 rep_tid 1430415 lcod 24'1325965) v3 on unknown tid 1430415
osd.3.log:10712691:ERROR 2024-06-19 18:45:41,675 [shard 0:main] osd - do_osd_ops_execute::failure_func osd_op(client.4275.0:744993 2.1a 2:58ccd3d4:::rbd_header.1077f11195ff:head {call lock.lock in=69b} snapc 0={} ondisk+write+known_if_redirected+supports_pool_eio e24) v9 got error: generic:16
#Â grep -c do_update_log_missing_reply osd.3.log
1476410
which is nearly half of the total of errors:
# grep -c ERROR osd.3.log
2216741
# grep ERROR osd.3.log | grep -v do_update_log_missing_reply > osd.3.log_errors_other_than_do_update_log_missing_reply.out
@2bac8f8d9dd1:/ceph/build/out
[14:20:07]$ # wc -l osd.3.log_errors_other_than_do_update_log_missing_reply.out
740331 osd.3.log_errors_other_than_do_update_log_missing_reply.out
@2bac8f8d9dd1:/ceph/build/out
[14:20:13]$ # echo $(( 740331 + 1476410 ))
2216741
* wonder if the problem starts around here?ERROR 2024-06-19 17:50:13,979 [shard 0:main] none - bluestore(/ceph/build/dev/osd3/block) _read_bdev_label failed to open /ceph/build/dev/osd3/block: (2) No such file or directory
ERROR 2024-06-19 17:50:13,980 [shard 0:main] none - bluestore(/ceph/build/dev/osd3) _read_fsid unparsable uuid
ERROR 2024-06-19 17:50:17,407 [shard 0:main] none - Falling back to public interface
ERROR 2024-06-19 17:59:12,841 [shard 0:main] osd - do_osd_ops_execute::failure_func osd_op(client.4221.0:14 2.1a 2:58ccd3d4:::rbd_header.1077f11195ff:head {call lock.lock in=69b} snapc 0={} ondisk+write+known_if_redirected+supports_pool_eio e24) v9 got error: generic:16
:
all the same error on the client ids until the end:
ERROR 2024-06-19 18:45:41,675 [shard 0:main] osd - do_osd_ops_execute::failure_func osd_op(client.4275.0:744993 2.1a 2:58ccd3d4:::rbd_header.1077f11195ff:head {call lock.lock in=69b} snapc 0={} ondisk+write+known_if_redirected+supports_pool_eio e24) v9 got error: generic:16
ERROR 2024-06-19 18:45:46,936 [shard 2:main] ms - ms_dispatch unhandled message ping magic: 0 v1
I think that makes most of them errors:
# grep -c do_osd_ops_execute osd.3.log_errors_other_than_do_update_log_missing_reply.out
738202
# grep -vc do_osd_ops_execute osd.3.log_errors_other_than_do_update_log_missing_reply.out
2129
which are:
ERROR 2024-06-19 17:50:13,979 [shard 0:main] none - bluestore(/ceph/build/dev/osd3/block) _read_bdev_label failed to open /ceph/build/dev/osd3/block: (2) No such file or directory
ERROR 2024-06-19 17:50:13,979 [shard 0:main] none - bluestore(/ceph/build/dev/osd3/block) _read_bdev_label failed to open /ceph/build/dev/osd3/block: (2) No such file or directory
ERROR 2024-06-19 17:50:13,979 [shard 0:main] none - bluestore(/ceph/build/dev/osd3/block) _read_bdev_label failed to open /ceph/build/dev/osd3/block: (2) No such file or directory
ERROR 2024-06-19 17:50:13,980 [shard 0:main] none - bluestore(/ceph/build/dev/osd3) _read_fsid unparsable uuid
ERROR 2024-06-19 17:50:17,407 [shard 0:main] none - Falling back to public interface
ERROR 2024-06-19 17:50:17,459 [shard 0:main] none - Falling back to public interface
ERROR 2024-06-19 17:59:17,716 [shard 1:main] ms - ms_dispatch unhandled message ping magic: 0 v1
:
ERROR 2024-06-19 18:11:27,864 [shard 2:main] ms - ms_dispatch unhandled message ping magic: 0 v1
ERROR 2024-06-19 18:11:31,328 [shard 0:main] osd - do_osardState::start_operation, Peeriop(client.4221.0:825113 2.1a 2:58ccd3d4:::rbd_header.1077f11195ff:head {call lock.lock in=69b} sERROR 2024-06-19 18:11:31,328 [shard 0:main] osd - do_osardState::start_operation, Peeriop(client.4221.0:825113 2.1a 2:58ccd3d4:::rbd_header.1077f11195ff:head {call lock.lock in=69b} snapc 0={} ondisk+write+known_if_redirected+supports_pool_eio e24) v9 got error: generic:16
ERROR 2024-06-19 18:11:32,850 [shard 1:main] ms - ms_dispatch unhandled message ping magic: 0 v1
:
I found a stacktrace from osd.3.stdout:
INFO 2024-06-19 17:50:16,785 seastar - Reactor backend: linux-aio
Reactor stalled for 199 ms on shard 2. Backtrace: 0x29e606a 0x29a29a0 0x29a2ee6 0x29a30c7 0x54daf 0x120bf5f 0x12fa67a 0x12ffd23 0x127ce64 0x127d31e 0x127d9b7 0x1ccd629 0x1cb8911 0x1cb91bd 0x1cb9bda 0x1cbcae2 0x299eb7f 0x299eed0 0x29d6d85 0x29d7b66 0x2b5bc8d 0xa19
11 0x3f44f
:
Reactor stalled for 6588 ms on shard 2. Backtrace: 0x29e606a 0x29a29a0 0x29a2ee6 0x29a30c7 0x54daf 0x12fa6d2 0x12ffd23 0x127ce64 0x127d31e 0x127d9b7 0x1ccd629 0x1cb8911 0x1cb91bd 0x1cb9bda 0x1cbcae2 0x299eb7f 0x299eed0 0x29d6d85 0x29d7b66 0x2b5bc8d 0xa1911 0x3f44
f
kernel callstack: 0xffffffffffffff80 0xffffffffa67acde0 0xffffffffa6512c91
:
6 0xffffffffa6520856 0xffffffffa6520969 0xffffffffa6523cb1 0xffffffffa65240a5 0xffffffffa627c26b 0xffffffffa6d286d2 0xffffffffa6e00b62
/ceph/src/ceph-run: line 27: 172745 Killed "$@"
in fact, all of them have it:
# grep -c 'Reactor stalled' osd*stdout
osd.0.stdout:9
osd.1.stdout:7
osd.2.stdout:593
osd.3.stdout:6
only osd.3.out have the Killed trace.
so probably is not a genuine issue?
YC Updated by Yingxin Cheng over 2 years ago
- grep -c 'Reactor stalled' osd*stdout
Reactor stalled should be normal, only a warning from seastar when a continuation is taking too long time.
For the performance anomaly, could set MGR=0 be helpful? We've met some anomaly as well, after disabling MGR seems better.
ERROR 2024-06-19 17:50:13,979 [shard 0:main] none - bluestore(/ceph/build/dev/osd3/block) _read_bdev_label failed to open /ceph/build/dev/osd3/block: (2) No such file or directory
Is this the issue? The osd3/block file looks unavailable.
YC Updated by Yingxin Cheng over 2 years ago
Tracing back: it seems that during the tests, one OSD went down and I didn't notice -- they should be four and only three are running
"--no-restart" from "vstart.sh" might be useful here, so that the test will fail whenever any OSD get crashed, the OSD won't refun itself implicitly.
JP Updated by Jose J Palacios Perez over 2 years ago
- File osd.0_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png osd.0_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png added
- File osd.1_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png osd.1_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png added
- File osd.2_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png osd.2_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png added
- File osd.3_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png osd.3_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_cpu.png added
- File osd.0_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_us.png osd.0_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_us.png added
- File osd.0_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_sys.png osd.0_crimson_4osd_4reactor_basic_4job_16io_4k_randwrite_p0_top_sys.png added
- File osd.0_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png osd.0_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png added
- File osd.1_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png osd.1_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png added
- File osd.2_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png osd.2_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png added
- File osd.3_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png osd.3_crimson_4osd_4reactor_basic_16job_16io_4k_randread_p0_top_cpu.png added
ERROR 2024-06-19 17:50:13,979 [shard 0:main] none - bluestore(/ceph/build/dev/osd3/block) _read_bdev_label failed to open /ceph/build/dev/osd3/block: (2) No such file or directory
Is this the issue? The osd3/block file looks unavailable.
Thank you @Yingxin, it was probably running perf at the same time for each OSD process.
In the last run, I've disabled monitoring with perf temporarily, the test completed, all OSD processes are online.
Here is the summary of results:
crimson 4OSD basic¶
crimson_4osd_4reactor_basic_1procs_randwrite¶
| IOPs | Lat(ms) | FIO_usr% | FIO_sys% | OSD_usr% | OSD_sys% |
|---|---|---|---|---|---|
| 2702.91 | 23.67 | 0.37 | 0.23 | 24.81 | 5.43 |
- OSD Thread CPU util% (per OSD process):
osd.0
osd.1
osd.2
osd.3
- CPU core util%:
Usr Sys
crimson_4osd_4reactor_basic_1procs_randread¶
| IOPs | Lat(ms) | FIO_usr% | FIO_sys% | OSD_usr% | OSD_sys% |
|---|---|---|---|---|---|
| 26961.84 | 9.49 | 0.51 | 0.37 | 24.58 | 4.55 |
- OSD Thread CPU util% (per OSD process):
osd.0
osd.1
osd.2
osd.3
- CPU core util%:
Usr Sys
MB Updated by Matan Breizman over 2 years ago
- Description updated (diff)
Yingxin Cheng wrote in #note-12:
Hm, if seastar threads are not constrained in Basic, probably alien-thread cpu cores shouldn't be constrained as well, right?
In another word, for https://tracker.ceph.com/issues/66525#note-3 (1) Basic/Manual case, it should be adjusted to:
For Basic:
crimson_seastar_num_threads = 1/2/4/8
crimson_alien_op_num_threads = defaultcrimson_alien_thread_cpu_cores = $cpu_cores_start$cpu_cores_endIs that reasonable?
Agreed.
Jose J Palacios Perez wrote in #note-17:
These are the number of running threads for the 4OSD basic configuration:
[...]
and these are their CPU cores (processor ids): -- I group the reactors together, they do not seem to overlap
[...]
This is good news.
Just to make sure I follow, only the "Basic" option was tested, right?
I will copy the final test plan into the tracker description.
Once the tests are finished we would be able to fill in the blanks there.
Lastly,
# grep -c do_osd_ops_execute osd.3.log_errors_other_than_do_update_log_missing_reply.out
738202
This looks odd, perhaps this should be tracked in a separate tracker with reproduction steps if it happens again.
JP Updated by Jose J Palacios Perez over 2 years ago
@Matan Breizman: yes only the Basic configuration so far, I will post the details of the Manual configuration here.
JP Updated by Jose J Palacios Perez over 2 years ago
I will proceed with Basic for the remaining values of crimson threads: I got results for 4, so will run for 1,2 and 8 next.
Matan Breizman wrote in #note-23:
Yingxin Cheng wrote in #note-12:
Hm, if seastar threads are not constrained in Basic, probably alien-thread cpu cores shouldn't be constrained as well, right?
In another word, for https://tracker.ceph.com/issues/66525#note-3 (1) Basic/Manual case, it should be adjusted to:
For Basic:
crimson_seastar_num_threads = 1/2/4/8
crimson_alien_op_num_threads = defaultcrimson_alien_thread_cpu_cores = $cpu_cores_start$cpu_cores_endIs that reasonable?
Agreed.
JP Updated by Jose J Palacios Perez over 2 years ago
Possibly a new issue?¶
This morning, I am seeing that the OSD process dies and restarts: was starting to test the scenario 1 OSD, 1 reactor, as follows
# MDS=0 MON=1 OSD=1 MGR=1 ../src/vstart.sh --new -x --localhost --without-dashboard -o timeout=10000 -o session_timeout=10000 --bluestore --redirect-output --bluestore-devs /dev/sdd,/dev/sde,/dev/sdf --crimson --crimson-smp 1 --crimson_seastar_num_threads 1
:
DEBUG 2024-06-24 11:53:51,013 [shard 0:main] monc - set_mon_vals crimson_alien_thread_cpu_cores = 1-31
DEBUG 2024-06-24 11:53:51,013 [shard 0:main] monc - set_mon_vals crimson_seastar_cpu_cores = 0-0
DEBUG 2024-06-24 11:53:51,013 [shard 0:main] monc - set_mon_vals crimson_seastar_num_threads = 1
:
321073 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f
321075 pts/0 Sl 0:00 /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f
321288 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f
321292 pts/0 Sl 0:03 /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f
322350 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f
'322351' pts/0 Sl 0:01 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f
- Created pool, etc. and ran the tests:
pool 'rbd' created enabled application 'rbd' on pool 'rbd' NAME PROVISIONED USED fio_test_0 10 GiB 0 B '[12:01:42]$ <-- test start' # RBD_NAME=fio_test_0 RBD_SIZE="10G" fio /fio/examples/rbd_prefill.fio && rbd du fio_test_0 && cd /tmp; /root/bin/run_fio.sh -s -n -a -c "0-31" -p 02_crimson_1osd_1reactor_basic # all 3 SSD prefill: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=rbd, iodepth=4 ... fio-3.37-15-gc948 Starting 2 threads : Disk stats (read/write): sdb: ios=0/3014, sectors=0/159098, merge=0/42, ticks=0/748, in_queue=789, util=0.27% NAME PROVISIONED USED fio_test_0 10 GiB 10 GiB == 16: 16: 02_crimson_1osd_1reactor_basic_16job_16io_4k_randread_p0 == : [12:21:12] <-- test completed - at the end of the test execution, noticed how the pid for the OSD process has changed (was 322351, now is 323646) -- was it terminated and restarted?
# ps ax | grep osd 322350 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f '323646' pts/0 Sl 15:34 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f - notice the warning from the status, as well as the OSD up vs in elapsed times:
# ceph status cluster: id: 70cac72d-42aa-45e6-a9d8-bbba0bb28481 health: HEALTH_WARN 2 pool(s) have no replicas configured services: mon: 1 daemons, quorum a (age 115m) mgr: x(active, since 115m) osd: 1 osds: 1 up (since 98m), 1 in (since 115m) <-- restarted around 17 mins after cluster creation? data: pools: 2 pools, 33 pgs objects: 2.57k objects, 10 GiB usage: 12 GiB used, 212 GiB / 224 GiB avail pgs: 33 active+clean - looking at the ERROR entries from osd.0.log, first error, chronologically: we have seen this before in [https://tracker.ceph.com/issues/66525#note-19]
# grep ERROR osd.0.log > osd.0.err ERROR 2024-06-24 11:53:51,389 [shard 0:main] none - bluestore(/ceph/build/dev/osd0/block) _read_bdev_label unable to decode label /ceph/build/dev/osd0/block at offset 102: void bluestore_bdev_label_t::decode(ceph::buffer::v15_2_0::list::const_iterator&) decode past end of struct encoding: Malformed input [buffer:3] ERROR 2024-06-24 11:53:51,390 [shard 0:main] none - bluestore(/ceph/build/dev/osd0/block) _read_bdev_label unable to decode label /ceph/build/dev/osd0/block at offset 102: void bluestore_bdev_label_t::decode(ceph::buffer::v15_2_0::list::const_iterator&) decode past end of struct encoding: Malformed input [buffer:3] ERROR 2024-06-24 11:53:51,390 [shard 0:main] none - bluestore(/ceph/build/dev/osd0/block) _read_bdev_label unable to decode label /ceph/build/dev/osd0/block at offset 102: void bluestore_bdev_label_t::decode(ceph::buffer::v15_2_0::list::const_iterator&) decode past end of struct encoding: Malformed input [buffer:3] ERROR 2024-06-24 11:53:51,390 [shard 0:main] none - bluestore(/ceph/build/dev/osd0) _read_fsid unparsable uuid ERROR 2024-06-24 11:53:54,503 [shard 0:main] none - Falling back to public interface : - The context after that is:
ERROR 2024-06-24 11:53:51,390 [shard 0:main] none - bluestore(/ceph/build/dev/osd0) _read_fsid unparsable uuid INFO 2024-06-24 11:53:51,390 [shard 0:main] bluestore - bluestore(/ceph/build/dev/osd0) mkfs using provided fsid ab593810-e37f-48b0-ab61-b97651ccfdb9 INFO 2024-06-24 11:53:51,391 [shard 0:main] bdev - bdev(0x5bce380 /ceph/build/dev/osd0/block) open path /ceph/build/dev/osd0/block WARN 2024-06-24 11:53:51,391 [shard 0:main] bdev - bdev(0x5bce380 /ceph/build/dev/osd0/block) ioctl(F_SET_FILE_RW_HINT) on /ceph/build/dev/osd0/block failed: (22) Invalid argument INFO 2024-06-24 11:53:51,391 [shard 0:main] bdev - bdev(0x5bce380 /ceph/build/dev/osd0/block) open size 240057409536 (0x37e4896000, 224 GiB) block_size 4096 (4 KiB) non-rotational device, discard supported INFO 2024-06-24 11:53:51,391 [shard 0:main] bluestore - bluestore(/ceph/build/dev/osd0) _set_cache_sizes cache_size 3221225472 meta 0.45 kv 0.45 kv_onode 0.04 data 0.06 INFO 2024-06-24 11:53:51,391 [shard 0:main] bluestore - bluestore(/ceph/build/dev/osd0) mkfs optimal_io_size 0x0 block_size: 0x1000 INFO 2024-06-24 11:53:51,391 [shard 0:main] asok - asok(0x600000870000) register_command bluestore allocator dump block hook 0x5bb7500 : - The following entries suggest just accepting the block device?
WARN 2024-06-24 11:53:51,391 [shard 0:main] bdev - bdev(0x5bce700 /ceph/build/dev/osd0/block) ioctl(F_SET_FILE_RW_HINT) on /ceph/build/dev/osd0/block failed: (22) Invalid argument INFO 2024-06-24 11:53:51,391 [shard 0:main] bdev - bdev(0x5bce700 /ceph/build/dev/osd0/block) open size 240057409536 (0x37e4896000, 224 GiB) block_size 4096 (4 KiB) non-rotational device, discard supported INFO 2024-06-24 11:53:51,391 [shard 0:main] bluefs - bluefs add_block_device bdev 1 path /ceph/build/dev/osd0/block size 224 GiB
I think I found the point where the OSD process asserts and restarts, here are some stacktraces, and the eye catcher 'std::bad_alloc':
INFO 2024-06-24 12:09:55,747 [shard 0:main] prioritycache - prioritycache tune_memory target: 4294967296 mapped: 13479239680 unmapped: 196608 heap: 13479436288 old mem: 134217728 new mem: 134217728
WARN 2024-06-24 12:09:56,170 [shard 0:main] seastar - Exceptional future ignored: std::bad_alloc (std::bad_alloc), backtrace: 0x2b03b60 0x2b03edd 0x2b0432d 0x295468e 0x295482b 0x1496b72 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 /lib64/libc.so.6+0x3feaf /lib64/libc.so.6+0x3ff5f 0x11d7254
--------
seastar::continuation<seastar::internal::promise_base_with_type<void>,
seastar::future<void>::finally_body<crimson::osd::ClientRequest::with_pg_process(boost::intrusive_ptr<crimson::osd::PG>)::{lambda()#3}, false>,
seastar::future<void>::then_wrapped_nrvo<seastar::future<void>,
seastar::future<void>::finally_body<crimson::osd::ClientRequest::with_pg_process(boost::intrusive_ptr<crimson::osd::PG>)::{lambda()#3}, false> >
(seastar::future<void>::finally_body<crimson::osd::ClientRequest::with_pg_process(boost::intrusive_ptr<crimson::osd::PG>)::{lambda()#3}, false>&&)::
{lambda(seastar::internal::promise_base_with_type<void>&&,
seastar::future<void>::finally_body<crimson::osd::ClientRequest::with_pg_process(boost::intrusive_ptr<crimson::osd::PG>)::{lambda()#3}, false>&,
seastar::future_state<seastar::internal::monostate>&&)#1
}, void>
ERROR 2024-06-24 12:09:56,170 [shard 0:main] osd - 0x600e27cd39a0 osd.0(client) v2:127.0.0.1:6801/2577635982 >> client.4228 127.0.0.1:0/2813006896@37142 dispatch() do_out_dispatch caught exception: std::bad_alloc
WARN 2024-06-24 12:09:56,170 [shard 0:main] seastar - Exceptional future ignored: std::bad_alloc (std::bad_alloc), backtrace: 0x2b03b60 0x2b03edd 0x2b0432d 0x295468e 0x295482b 0x1496b72 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 /lib64/libc.so.6+0x3feaf /lib64/libc.so.6+0x3ff5f 0x11d7254
--------
seastar::continuation<seastar::internal::promise_base_with_type<void>,
seastar::future<void>::finally_body<crimson::osd::ClientRequest::with_pg_process(boost::intrusive_ptr<crimson::osd::PG>)::{lambda()#3}, false>,
seastar::future<void>::then_wrapped_nrvo<seastar::future<void>,
seastar::future<void>::finally_body<crimson::osd::ClientRequest::with_pg_process(boost::intrusive_ptr<crimson::osd::PG>)::{lambda()#3}, false>>
(seastar::future<void>::finally_body<crimson::osd::ClientRequest::with_pg_process(boost::intrusive_ptr<crimson::osd::PG>)::{lambda()#3}, false>&&)::
{lambda(seastar::internal::promise_base_with_type<void>&&,
seastar::future<void>::finally_body<crimson::osd::ClientRequest::with_pg_process(boost::intrusive_ptr<crimson::osd::PG>)::{lambda()#3}, false>&,
seastar::future_state<seastar::internal::monostate>&&)#1
}, void>
ERROR 2024-06-24 12:09:56,170 [shard 0:main] ms - [0x600e27cd5c40 osd.0(client) v2:127.0.0.1:6801/2577635982 >> client.4202 127.0.0.1:0/494857925@37026] got unexpected exception in ms_dispatch() std::bad_alloc (std::bad_alloc)
ERROR 2024-06-24 12:09:56,170 [shard 0:main] none - /ceph/src/crimson/net/chained_dispatchers.cc:33 : In function 'seastar::future<> crimson::net::ChainedDispatchers::ms_dispatch(crimson::net::ConnectionRef, MessageRef)', abort(%s)
abort() called
- The following block is similar to the start of the log, so I guess indicates the start of the OSD process
WARN 2024-06-24 12:10:21,890 [shard 0:main] objclass - <cls> /ceph/src/cls/sdk/cls_sdk.cc:120: loading cls_sdk
WARN 2024-06-24 12:10:21,890 [shard 0:main] objclass - <cls> /ceph/src/cls/hello/cls_hello.cc:316: loading cls_hello
INFO 2024-06-24 12:10:21,890 [shard 0:main] objclass - <cls> /ceph/src/cls/version/cls_version.cc:218: Loaded version class!
INFO 2024-06-24 12:10:21,891 [shard 0:main] objclass - <cls> /ceph/src/cls/log/cls_log.cc:305: Loaded log class!
INFO 2024-06-24 12:10:21,892 [shard 0:main] objclass - <cls> /ceph/src/cls/refcount/cls_refcount.cc:199: Loaded refcount class!
INFO 2024-06-24 12:10:21,892 [shard 0:main] objclass - <cls> /ceph/src/cls/timeindex/cls_timeindex.cc:247: Loaded timeindex class!
INFO 2024-06-24 12:10:21,893 [shard 0:main] objclass - <cls> /ceph/src/cls/user/cls_user.cc:725: Loaded user class!
WARN 2024-06-24 12:10:21,894 [shard 0:main] objclass - <cls> /ceph/src/cls/cephfs/cls_cephfs.cc:201: loading cephfs
INFO 2024-06-24 12:10:21,895 [shard 0:main] objclass - <cls> /ceph/src/cls/cas/cls_cas.cc:211: Loaded cas class!
INFO 2024-06-24 12:10:21,895 [shard 0:main] objclass - <cls> /ceph/src/cls/cmpomap/server.cc:287: Loaded cmpomap class!
INFO 2024-06-24 12:10:21,895 [shard 0:main] objclass - <cls> /ceph/src/cls/rgw_gc/cls_rgw_gc.cc:539: Loaded rgw gc class!
INFO 2024-06-24 12:10:21,895 [shard 0:main] objclass - <cls> /ceph/src/cls/queue/cls_queue.cc:125: Loaded queue class!
INFO 2024-06-24 12:10:21,895 [shard 0:main] objclass - <cls> /ceph/src/cls/2pc_queue/cls_2pc_queue.cc:650: Loaded 2pc queue class!
INFO 2024-06-24 12:10:21,897 [shard 0:main] objclass - <cls> /ceph/src/cls/rgw/cls_rgw.cc:4660: Loaded rgw class!
INFO 2024-06-24 12:10:21,897 [shard 0:main] osd - OSD::OSD: nonce is 2062336682
INFO 2024-06-24 12:10:21,897 [shard 0:main] osd - populating config from monitor
INFO 2024-06-24 12:10:21,897 [shard 0:main] auth - AuthRegistry(0x60000093fd60) adding auth protocol: cephx
INFO 2024-06-24 12:10:21,897 [shard 0:main] auth - AuthRegistry(0x60000093fd60) adding auth protocol: cephx
INFO 2024-06-24 12:10:21,897 [shard 0:main] auth - AuthRegistry(0x60000093fd60) adding auth protocol: cephx
:
INFO 2024-06-24 12:10:26,033 [shard 0:main] asok - asok(0x600000870000) unregister_commands bluestore allocator score recovery
WARN 2024-06-24 12:10:26,033 [shard 0:main] bluestore - bluestore(/ceph/build/dev/osd0) _init_alloc::NCB::restore_allocator() failed! Run Full Recovery from ONodes (might take a while) ...
INFO 2024-06-24 12:10:26,188 [shard 0:main] bluestore - bluestore::NCB::read_allocation_from_onodes::read_allocation_from_onodes recovered pool 1->store_statfs(0x0/0x0/0x0, data 0x70210/0x71000, compress 0x0/0x0/0x0, omap 0x0, meta 0x0) per-pool:1
:
INFO 2024-06-24 12:10:26,418 [shard 0:main] bdev - bdev(0x47c2700 /ceph/build/dev/osd0/block) open path /ceph/build/dev/osd0/block
WARN 2024-06-24 12:10:26,418 [shard 0:main] bdev - bdev(0x47c2700 /ceph/build/dev/osd0/block) ioctl(F_SET_FILE_RW_HINT) on /ceph/build/dev/osd0/block failed: (22) Invalid argument
INFO 2024-06-24 12:10:26,418 [shard 0:main] bdev - bdev(0x47c2700 /ceph/build/dev/osd0/block) open size 240057409536 (0x37e4896000, 224 GiB) block_size 4096 (4 KiB) non-rotational device, discard supported
INFO 2024-06-24 12:10:26,418 [shard 0:main] bluefs - bluefs add_block_device bdev 1 path /ceph/build/dev/osd0/block size 224 GiB
INFO 2024-06-24 12:10:26,418 [shard 0:main] bluefs - bluefs mount
- The reminder of errors are same as these: (ranging over the clients ids)
ERROR 2024-06-24 12:03:10,538 [shard 0:main] osd - do_osd_ops_execute::failure_func osd_op(client.4194.0:14 2.19 2:9aa85f31:::rbd_header.105cd7118d4:head {call lock.lock in=69b} snapc 0={} ondisk+write+known_if_redirected+supports_pool_eio e12) v9 got error: generic:16 ERROR 2024-06-24 12:03:10,538 [shard 0:main] osd - do_osd_ops_execute::failure_func osd_op(client.4194.0:16 2.19 2:9aa85f31:::rbd_header.105cd7118d4:head {call lock.lock in=69b} snapc 0={} ondisk+write+known_if_redirected+supports_pool_eio e12) v9 got error: generic:16 : ERROR 2024-06-24 12:18:58,608 [shard 0:main] osd - do_osd_ops_execute::failure_func osd_op(client.4239.0:757466 2.19 2:9aa85f31:::rbd_header.105cd7118d4:head {call lock.lock in=69b} snapc 0={} ondisk+write+known_if_redirected+supports_pool_eio e15) v9 got error: generic:16
Summary:¶
- I have managed to recreate the problem twice, but not always occurs -- the symptom is that the script driving the test ends up with the old pid of the OSD, and the output from top has only CPU core util data, but no thread CPU util data. I'll add a hack to print a notify whenever the OSD pid has changed, so would be able to fetch the osd.log
JP Updated by Jose J Palacios Perez over 2 years ago
Did a quick search in the tracker for 'do_out_dispatch caught exception: std::bad_alloc' and found no dupes, I've copied the log with the recreate and above stacktraces ( 8.9M so cannot upload in this ticket). I'll try see if can recreated deterministically.
JP Updated by Jose J Palacios Perez over 2 years ago
- File osd.0.log_dispatch_bad_alloc_recreate osd.0.log_dispatch_bad_alloc_recreate added
- File osd.0.stdout_assert.gz osd.0.stdout_assert.gz added
Seen again, this time with several stacktraces:
# zgrep backtrace /tmp/osd.0.log_dispatch_bad_alloc.gz
WARN 2024-06-24 19:00:26,089 [shard 0:main] seastar - Exceptional future ignored: std::bad_alloc (std::bad_alloc), backtrace: 0x2b03b60 0x2b03edd 0x2b0432d 0x295468e 0x295482b 0x1496b72 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 /lib64/libc.so.6+0x3feaf /lib64/libc.so.6+0x3ff5f 0x11d7254
WARN 2024-06-24 19:00:26,089 [shard 0:main] seastar - Exceptional future ignored: std::bad_alloc (std::bad_alloc), backtrace: 0x2b03b60 0x2b03edd 0x2b0432d 0x295468e 0x295482b 0x1496b72 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 /lib64/libc.so.6+0x3feaf /lib64/libc.so.6+0x3ff5f 0x11d7254
WARN 2024-06-24 19:00:26,090 [shard 0:main] seastar - Exceptional future ignored: std::bad_alloc (std::bad_alloc), backtrace: 0x2b03b60 0x2b03edd 0x2b0432d 0x295468e 0x295482b 0x1496b72 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 /lib64/libc.so.6+0x3feaf /lib64/libc.so.6+0x3ff5f 0x11d7254
WARN 2024-06-24 19:00:26,090 [shard 0:main] seastar - Exceptional future ignored: std::bad_alloc (std::bad_alloc), backtrace: 0x2b03b60 0x2b03edd 0x2b0432d 0x295468e 0x295482b 0x1496b72 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 /lib64/libc.so.6+0x3feaf /lib64/libc.so.6+0x3ff5f 0x11d7254
WARN 2024-06-24 19:00:26,090 [shard 0:main] seastar - Exceptional future ignored: std::bad_alloc (std::bad_alloc), backtrace: 0x2b03b60 0x2b03edd 0x2b0432d 0x295468e 0x295482b 0x1496b72 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 /lib64/libc.so.6+0x3feaf /lib64/libc.so.6+0x3ff5f 0x11d7254
WARN 2024-06-24 19:00:26,090 [shard 0:main] seastar - Exceptional future ignored: std::bad_alloc (std::bad_alloc), backtrace: 0x2b03b60 0x2b03edd 0x2b0432d 0x295468e 0x295482b 0x1496b72 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 /lib64/libc.so.6+0x3feaf /lib64/libc.so.6+0x3ff5f 0x11d7254
WARN 2024-06-24 19:00:26,090 [shard 0:main] seastar - Exceptional future ignored: std::bad_alloc (std::bad_alloc), backtrace: 0x2b03b60 0x2b03edd 0x2b0432d 0x295468e 0x295482b 0x1496b72 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 /lib64/libc.so.6+0x3feaf /lib64/libc.so.6+0x3ff5f 0x11d7254
WARN 2024-06-24 19:00:26,090 [shard 0:main] seastar - Exceptional future ignored: std::bad_alloc (std::bad_alloc), backtrace: 0x2b03b60 0x2b03edd 0x2b0432d 0x295468e 0x295482b 0x1496b72 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 /lib64/libc.so.6+0x3feaf /lib64/libc.so.6+0x3ff5f 0x11d7254
ERROR 2024-06-24 19:00:25,963 [shard 0:main] ms - ms_dispatch unhandled message ping magic: 0 v1
WARN 2024-06-24 19:00:26,089 [shard 0:main] seastar - Exceptional future ignored: std::bad_alloc (std::bad_alloc), backtrace: 0x2b03b60 0x2b03edd 0x2b0432d 0x295468e 0x295482b 0x1496b72 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 /lib64/libc.so.6+0x3feaf /lib64/libc.so.6+0x3ff5f 0x11d7254
--------
seastar::continuation<seastar::internal::promise_base_with_type<void>,
seastar::future<void>::finally_body<crimson::osd::ClientRequest::with_pg_process(boost::intrusive_ptr<crimson::osd::PG>)::{lambda()#3}, false>,
seastar::future<void>::then_wrapped_nrvo<seastar::future<void>,
seastar::future<void>::finally_body<crimson::osd::ClientRequest::with_pg_process(boost::intrusive_ptr<crimson::osd::PG>)::{lambda()#3}, false>>
(seastar::future<void>::finally_body<crimson::osd::ClientRequest::with_pg_process(boost::intrusive_ptr<crimson::osd::PG>)::{lambda()#3}, false>&&)::{lambda(seastar::internal::promise_base_with_type<void>&&,
seastar::future<void>::finally_body<crimson::osd::ClientRequest::with_pg_process(boost::intrusive_ptr<crimson::osd::PG>)::{lambda()#3}, false>&,
seastar::future_state<seastar::internal::monostate>&&)#1},
void>
I think the reason did not seen before is that in this run I used the vstart flag '--no-restart', so FIO just waits forever. Also, since the script picked up the OSD pid from pgrep before monitoring, instead of the out/osd.X.pid to compare whether they have changed.
So it looks like the issue can be recreated deterministically, will try find out the simplest possible recreate.
JP Updated by Jose J Palacios Perez over 2 years ago
- from osd.0.stdout:
DEBUG 2024-06-24 18:52:11,496 [shard 0:main] monc - set_mon_vals crimson_alien_thread_cpu_cores = 1-31 DEBUG 2024-06-24 18:52:11,496 [shard 0:main] monc - set_mon_vals crimson_seastar_cpu_cores = 0-0 DEBUG 2024-06-24 18:52:11,496 [shard 0:main] monc - set_mon_vals crimson_seastar_num_threads = 1 DEBUG 2024-06-24 18:52:11,496 [shard 0:main] monc - set_mon_vals osd_copyfrom_max_chunk = 524288 DEBUG 2024-06-24 18:52:11,496 [shard 0:main] monc - set_mon_vals osd_debug_misdirected_ops = true DEBUG 2024-06-24 18:52:11,496 [shard 0:main] monc - set_mon_vals osd_debug_op_order = true : DEBUG 2024-06-24 18:52:11,497 [shard 0:main] ms - ~SocketMessenger: temp_mon_client INFO 2024-06-24 18:52:11,497 [shard 0:main] osd - get_early_config: set --thread-affinity 1 --cpuset 0-0 DEBUG 2024-06-24 18:52:11,497 [shard 0:main] seastar - reactor::drain INFO 2024-06-24 18:52:11,822 seastar - Reactor backend: linux-aio Aborting on shard 0. Backtrace: Reactor stalled for 2307 ms on shard 0. Backtrace: 0x29e606a 0x29a29a0 0x29a2ee6 0x29a30c7 0x54daf 0x11aa76 0x11a899 0x1a6375d 0x1a63f57 0x1a645c9 0x1a62470 0x1a62dc8 0x1a632da 0x54daf 0xa365b 0x54d05 0x287f2 0x109d77e 0x10d23b4 0x1cb8911 0x1cb91bd 0x1cb9bda 0x1cba326 0x1cbc667 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 0x3feaf 0x3ff5f 0x11d7254 : kernel callstack: 0xffffffffffffff80 0xffffffffa651c9cb 0xffffffffa652335d 0xffffffffa65236f7 0xffffffffa62f41b3 0xffffffffa62f4351 0xffffffffa62f5690 0xffffffffa62f6337 0xffffffffa62f67a0 0xffffffffa6d2515c 0xffffffffa6e0009b 0# 0x00007F5D8485665C in /lib64/libc.so.6 1# raise in /lib64/libc.so.6 2# abort in /lib64/libc.so.6 3# ceph::__ceph_abort(char const*, int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at /ceph/src/seastar/include/seastar/util/log.hh:305 4# std::__exception_ptr::exception_ptr::~exception_ptr() at /usr/include/c++/11/bits/exception_ptr.h:201 5# auto crimson::net::IOHandler::read_message(crimson::net::IOHandler::shard_states_t&, utime_t, unsigned long) ::{lambda(auto:1)#1}::operator()<boost::container::static_vector<ceph::buffer::v15_2_0::list, 4ul, void>*> (boost::container::static_vector<ceph::buffer::v15_2_0::list, 4ul, void>*) const at /ceph/src/crimson/net/io_handler.cc:1111 6# crimson::net::IOHandler::read_message(crimson::net::IOHandler::shard_states_t&, utime_t, unsigned long) at /ceph/src/seastar/include/seastar/core/future.hh:497 7# auto crimson::net::IOHandler::do_in_dispatch()::{lambda()#1}::operator()() const::{lambda()#1}::operator()() const:: {lambda(auto:1)#1}::operator()<crimson::net::FrameAssemblerV2::read_main_t>(crimson::net::FrameAssemblerV2::read_main_t) const [clone .isra.0] at /ceph/src/crimson/net/io_handler.cc:1152 8# seastar::future_state_base::any::has_result() const at /ceph/src/seastar/include/seastar/core/future.hh:497 9# seastar::future_state_base::any::failed() const at /ceph/src/seastar/include/seastar/core/future.hh:448 10# seastar::reactor::run_tasks(seastar::reactor::task_queue&) at /ceph/src/seastar/src/core/reactor.cc:2692 11# seastar::reactor::run_some_tasks() at /ceph/src/seastar/src/core/reactor.cc:3155 12# seastar::reactor::do_run() at /ceph/src/seastar/src/core/reactor.cc:3324 13# seastar::reactor::run() at /ceph/src/seastar/src/core/reactor.cc:3219 14# seastar::app_template::run_deprecated(int, char**, std::function<void ()>&&) at /ceph/src/seastar/src/core/app-template.cc:277 15# seastar::app_template::run(int, char**, std::function<seastar::future<int> ()>&&) at /ceph/src/seastar/src/core/app-template.cc:167 16# main at /usr/include/c++/11/bits/std_function.h:334 17# 0x00007F5D847F2EB0 in /lib64/libc.so.6 18# __libc_start_main in /lib64/libc.so.6 19# _start in /ceph/build/bin/crimson-osd Content of /proc/self/maps:
JP Updated by Jose J Palacios Perez over 2 years ago
Would be interesting to know which actual thread hit the assert, not clean from the osd.0.log or the osd.0.stdout.
Wonder why the nearly 10 mins between the assert at the end of osd.0.stdout
DEBUG 2024-06-24 18:52:11,497 [shard 0:main] seastar - reactor::drain
INFO 2024-06-24 18:52:11,822 seastar - Reactor backend: linux-aio
Aborting on shard 0.
and the following entries in sd.0.log
WARN 2024-06-24 19:00:26,089 [shard 0:main] seastar - Exceptional future ignored: std::bad_alloc (std::bad_alloc), backtrace:
I've been trying to debug the stacktrace by looking at the points in the source code, I'll add my notes here as well.
JP Updated by Jose J Palacios Perez over 2 years ago
Debugging assert from osd.0.stdout¶
- 10# seastar::reactor::run_tasks(seastar::reactor::task_queue&) at /ceph/src/seastar/src/core/reactor.cc:2692
The point of the stackframe is the assignation of nullptr to the _current_task, so I guess the actual problem occurs during run_and_dispose():2681 void reactor::run_tasks(task_queue& tq) { : 2685 while (!tasks.empty()) { : 2690 _current_task = tsk; 2691 tsk->run_and_dispose(); 2692 _current_task = nullptr; : 2697 if (internal::scheduler_need_preempt()) { : }
- 9# seastar::future_state_base::any::failed() const at /ceph/src/seastar/include/seastar/core/future.hh:448
this is a method part of the union any, which in turn is inside the struct future_state_base: this might get called to check about the (future) state448 bool failed() const noexcept { return __builtin_expect(st >= state::exception_min, false); }
- 8# seastar::future_state_base::any::has_result() const at /ceph/src/seastar/include/seastar/core/future.hh:497
this is to check whether the future has a result, other than invalid/failed?496 bool has_result() const noexcept { 497 return st == state::result || st == state::result_unavailable; 498 }
- 7# auto crimson::net::IOHandler::do_in_dispatch()::
{
lambda()#1
}::operator()() const:: {
lambda()#1
}::operator()() const:: {
lambda(auto:1)#1
}::operator()<crimson::net::FrameAssemblerV2::read_main_t>(crimson::net::FrameAssemblerV2::read_main_t)
const [clone .isra.0] at /ceph/src/crimson/net/io_handler.cc:1152
I reorganised the lambdas/futures of this entry, the code
JP Updated by Jose J Palacios Perez over 2 years ago
is as follows:
1116 void IOHandler::do_in_dispatch()
:
1124 switch (ret.tag) {
1125 case Tag::MESSAGE: {
:
1148 }).then([this, msg_size, &ctx] {
1149 // TODO: throttle_dispatch_queue() logic
1150 utime_t throttle_stamp{seastar::lowres_system_clock::now()};
1151 return read_message(ctx, throttle_stamp, msg_size);
1152 });
so this is a read_message from the client
- 6# crimson::net::IOHandler::read_message(crimson::net::IOHandler::shard_states_t&, utime_t, unsigned long) at /ceph/src/seastar/include/seastar/core/future.hh:497
so this is the eventual value for the future: it would indicate whether is an available result496 bool has_result() const noexcept { 497 return st == state::result || st == state::result_unavailable; 498 }
- 5# auto crimson::net::IOHandler::read_message(crimson::net::IOHandler::shard_states_t&, utime_t, unsigned long)
::{lambda(auto:1)#1}::operator()<boost::container::static_vector<ceph::buffer::v15_2_0::list, 4ul, void>*>
(boost::container::static_vector<ceph::buffer::v15_2_0::list, 4ul, void>*) const at /ceph/src/crimson/net/io_handler.cc:1111994 seastar::future<> 995 IOHandler::read_message( 996 shard_states_t &ctx, 997 utime_t throttle_stamp, 998 std::size_t msg_size) 999 { : 1110 // throttle the reading process by the returned future 1111 return dispatchers.ms_dispatch(conn_ref, std::move(msg_ref)); 1112 // user can make changes 1113 })
- 4# std::__exception_ptr::exception_ptr::~exception_ptr() at /usr/include/c++/11/bits/exception_ptr.h:201
not sure which object from the prev frame this refers to196 _GLIBCXX_EH_PTR_USED 197 inline 198 exception_ptr::~exception_ptr() _GLIBCXX_USE_NOEXCEPT 199 { 200 if (_M_exception_object) 201 _M_release(); 202 }
- 3# ceph::__ceph_abort(char const*, int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at /ceph/src/seastar/include/seastar/util/log.hh:305
so this means the assert occurred during the do_log(), despite the line 305 being the catch(..) sentence293 template <typename... Args> 294 void log(log_level level, format_info_t<Args...> fmt, Args&&... args) noexcept { 295 if (is_enabled(level)) { 296 try { 297 lambda_log_writer writer([&] (internal::log_buf::inserter_iterator it) { 298 #if defined(SEASTAR_LOGGER_COMPILE_TIME_FMT) || FMT_VERSION < 80000 299 return fmt::format_to(it, fmt.format, std::forward<Args>(args)...); 300 #else 301 return fmt::format_to(it, fmt::runtime(fmt.format), std::forward<Args>(args)...); 302 #endif 303 }); 304 do_log(level, writer); 305 } catch (...) { 306 failed_to_log(std::current_exception(), fmt::string_view(fmt.format), fmt.loc); 307 } 308 } 309 }
- 2# abort in /lib64/libc.so.6 --
JP Updated by Jose J Palacios Perez over 2 years ago
Attempting to run for 2 reactors, 1 OSD:
1 OSD 2 reactors:¶
- Setup:
[15:33:35]$ # MDS=0 MON=1 OSD=1 MGR=1 ../src/vstart.sh --new -x --localhost --without-dashboard -o timeout=10000 -o session_timeout=10000 --bluestore --redirect-output --bluestore-devs /dev/sdd --crimson --crimson-smp 2 --no-restart # basic 2 reactors
setting the config as required for the basic config:# ceph config get osd crimson_alien_thread_cpu_cores 2-31 # ceph config set osd crimson_seastar_num_threads 2 # ceph config get osd crimson_seastar_num_threads 2 - verifying the threads spawn:
# taskset -acp $(pgrep osd) pid 329012's current affinity list: 0 pid 329020's current affinity list: 1 pid 329021's current affinity list: 0 pid 329022's current affinity list: 1 pid 329023's current affinity list: 0 pid 329024's current affinity list: 2-31 pid 329025's current affinity list: 2-31 pid 329026's current affinity list: 2-31 pid 329027's current affinity list: 2-31 pid 329028's current affinity list: 2-31 pid 329029's current affinity list: 2-31 pid 329030's current affinity list: 0 pid 329031's current affinity list: 1 pid 329032's current affinity list: 2-31 pid 329034's current affinity list: 2-31 pid 329035's current affinity list: 2-31 pid 329036's current affinity list: 2-31 pid 329037's current affinity list: 2-31 pid 329218's current affinity list: 2-31 pid 329399's current affinity list: 2-31 pid 329400's current affinity list: 2-31 pid 329401's current affinity list: 2-31 pid 329402's current affinity list: 2-31 pid 329403's current affinity list: 2-31 @2bac8f8d9dd1:/ceph/build [15:58:39]$ # for p in $(pgrep crimson-osd); do ps -p $p --no-headers -L -o tid,comm,psr; done 329012 crimson-osd 0 329020 reactor-1 1 329021 syscall-0 0 329022 syscall-1 1 329023 log 0 329024 alien-store-tp 7 329025 alien-store-tp 6 329026 alien-store-tp 5 329027 alien-store-tp 4 329028 alien-store-tp 3 329029 alien-store-tp 2 329030 crimson-osd 0 329031 reactor-1 1 329032 bstore_aio 6 329034 rocksdb:low 24 329035 rocksdb:low 3 329036 rocksdb:low 2 329037 rocksdb:high 4 329218 bstore_aio 17 329399 alien-store-tp 24 329400 cfin 12 329401 bstore_kv_sync 8 329402 bstore_kv_final 11 329403 bstore_mempool 11 # taskset -acp $(pgrep osd) | wc -l 24 - creating pool, volume, etc:
# cat /root/bin/cephlogoff.sh #!/usr/bin/bash bin/ceph tell osd.0 config set debug_bluestore 0/0 bin/ceph tell osd.0 config set debug_rocksdb 0/0 bin/ceph tell osd.0 config set debug_osd 0/0 bin/ceph tell osd.0 config set debug_monc 0/0 bin/ceph tell osd.0 config set debug_mgrc 0/0 bin/ceph tell osd.0 config set debug_ms 0/0 bin/ceph tell osd.0 config set debug_objecter 0/0 bin/ceph tell mon.a config set debug_mon 0/0 bin/ceph tell mon.a config set debug_ms 0/0 bin/ceph tell mon.a config set debug_paxos 0/0 bin/ceph tell mon.a config set debug_mgrc 0/0 bin/ceph tell mon.a config set debug_auth 0/0 bin/ceph tell mgr.x config set debug_mgr 0/0 bin/ceph tell mgr.x config set debug_monc 0/0 bin/ceph tell mgr.x config set debug_ms 0/0 bin/ceph tell mgr.x config set debug_mon 0/0 # probably add the config opts for the basic/manual here as well # basic setup bin/ceph osd pool create rbd bin/ceph osd pool application enable rbd rbd bin/rbd create --size 10G rbd/fio_test_0 rbd du fio_test_0 # /root/bin/cephlogoff.sh pool 'rbd' created enabled application 'rbd' on pool 'rbd' NAME PROVISIONED USED fio_test_0 10 GiB 0 B # ceph status cluster: id: 7cd9854d-b70f-4db4-9763-ce8ca26cd168 health: HEALTH_WARN 2 pool(s) have no replicas configured services: mon: 1 daemons, quorum a (age 37m) mgr: x(active, since 37m) osd: 1 osds: 1 up (since 36m), 1 in (since 37m) data: pools: 2 pools, 33 pgs objects: 7 objects, 449 KiB usage: 27 MiB used, 224 GiB / 224 GiB avail pgs: 33 active+clean - launching the tests:
[16:16:21]$ # # RBD_NAME=fio_test_0 RBD_SIZE="10G" fio /fio/examples/rbd_prefill.fio && rbd du fio_test_0 && cd /tmp; /root/bin/run_fio.sh -s -n -a -c "0-31" -p 01_crimson_1osd_2reactor_basic # single SSD Disk stats (read/write): sdb: ios=0/3000, sectors=0/166218, merge=0/36, ticks=0/837, in_queue=882, util=0.27% NAME PROVISIONED USED fio_test_0 10 GiB 10 GiB == 16: 16: 01_crimson_1osd_2reactor_basic_16job_16io_4k_randread_p0 == == Monitoring OSD osd_0: 329012 == : == 16: 4: 01_crimson_1osd_2reactor_basic_4job_16io_4k_randwrite_p0 == == Monitoring OSD osd_0: 329012 == - Segfault detected in osd.0.stdout:
DEBUG 2024-06-25 15:39:22,912 [shard 0:main] ms - 0x6000008bb000 client.?(temp_mon_client) 127.0.0.1:0/171379839@62392 >> mon.0 v2:127.0.0.1:40001/0 finish 7 IOHandler::wait_io_exit_dispatching(), io(in_seq=3, is_out_queued=false, has_out_sent=false) DEBUG 2024-06-25 15:39:22,912 [shard 0:main] ms - 0x6000008bb000 client.?(temp_mon_client) 127.0.0.1:0/171379839@62392 >> mon.0 v2:127.0.0.1:40001/0 closed! DEBUG 2024-06-25 15:39:22,912 [shard 0:main] ms - ~SocketMessenger: temp_mon_client INFO 2024-06-25 15:39:22,912 [shard 0:main] osd - get_early_config: set --thread-affinity 1 --cpuset 0-1 DEBUG 2024-06-25 15:39:22,912 [shard 0:main] seastar - reactor::drain INFO 2024-06-25 15:39:23,253 seastar - Reactor backend: linux-aio Reactor stalled for 2246 ms on shard 0. Backtrace: 0x29e606a 0x29a29a0 0x29a2ee6 0x29a30c7 0x54daf 0x2e3b5f 0x1c4b2a 0x249a81 0x2880b8 0x2881ff 0x18ce16 0x1cd164b 0x1c9128e 0x1c91eca 0x1cb4d50 0x1cb56bd 0x1cbccbe 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 0x3feaf 0x3ff5f 0x11d7254 kernel callstack: 0xffffffffffffff80 0xffffffffa67be046 0xffffffffa67bedb5 0xffffffffa67bf201 0xffffffffa64d6b8c 0xffffffffc0dcbc75 0xffffffffa6520847 0xffffffffa6520969 0xffffffffa6523cb1 0xffffffffa65240a5 0xffffffffa627c26b 0xffffffffa6d286d2 0xffffffffa6e00b62 kernel callstack: 0xffffffffffffff80 0xffffffffa6545355 0xffffffffa65474c0 0xffffffffa6548726 0xffffffffa656bbf7 0xffffffffa64e3567 0xffffffffa64d41e8 0xffffffffa64d88e3 0xffffffffa651e796 0xffffffffa6520856 0xffffffffa6520969 0xffffffffa6523cb1 0xffffffffa65240a5 0xffffffffa627c26b 0xffffffffa6d286d2 0xffffffffa6e00b62 Segmentation fault on shard 0. Backtrace: Reactor stalled for 1703 ms on shard 0. Backtrace: 0x29e606a 0x29a29a0 0x29a2ee6 0x29a30c7 0x54daf 0x11aa76 0x11a899 0x1a6375d 0x1a6396d 0x1a63df8 0x1a645c9 0x1a62470 0x1a6254f 0x1a632da 0x54daf 0x1bb1a23 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 0x3feaf 0x3ff5f 0x11d7254 /ceph/src/ceph-run: line 27: 329012 Killed "$@"
Before the OSD killed, the following results were obtained:
- 01_crimson_1osd_2reactor_basic_1procs_randread:
IOPs Lat(ms) FIO_usr% FIO_sys% OSD_usr% OSD_sys% 26512.75 9.65 0.62 0.51 3.38 8.07
- 01_crimson_1osd_2reactor_basic_1procs_randwrite:
IOPs Lat(ms) FIO_usr% FIO_sys% OSD_usr% OSD_sys% 4591.32 13.88 0.54 0.39 2.37 7.47
JP Updated by Jose J Palacios Perez over 2 years ago
The problem still persists, this time I tried for 8 reactors, the assert occurs on a different shard:
INFO 2024-06-25 19:00:38,701 [shard 0:main] osd - get_early_config: set --thread-affinity 1 --cpuset 0-7
DEBUG 2024-06-25 19:00:38,701 [shard 0:main] seastar - reactor::drain
INFO 2024-06-25 19:00:38,870 seastar - Reactor backend: linux-aio
Aborting on shard 6.
Backtrace:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
/ceph/src/ceph-run: line 27: 332502 Aborted (core dumped) "$@"
- The setup was as follows:
# MDS=0 MON=1 OSD=1 MGR=1 ../src/vstart.sh --new -x --localhost --without-dashboard --bluestore --redirect-output --bluestore-devs /dev/sdd --crimson --crimson-smp 8 --crimson_seastar_num_threads 8 --no-restart # basic 8 reactors - The total num of threads is:
# taskset -acp $(pgrep osd)| wc -l 42 # ps ax 331210 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f 331212 pts/0 Sl 0:00 /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f 331425 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f 331429 pts/0 Sl 0:03 /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f 332501 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f 332502 pts/0 Sl 0:01 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f
- Looking at osd.0.log, the majority of errors are of this type:
ERROR 2024-06-25 19:04:03,421 [shard 1:main] osd - do_osd_ops_execute::failure_func osd_op(client.4192.0:2698 2.18 2:19c430fb:::rbd_header.105c9e98bd54:head {call lock.lock in=69b} snapc 0={} ondisk+write+known_if_redirected+supports_pool_eio e12) v9 got error: g eneric:16 # grep -c ERROR osd.0.log 85471 # grep -c 'do_osd_ops_execute' osd.10.log 83990 - For the remainder errors, there are only two types:
ERROR 2024-06-25 20:05:13,101 [shard 7:main] ms - ms_dispatch unhandled message ping magic: 0 v1
andERROR 2024-06-25 20:05:16,390 [shard 6:main] ms - [0x600000daca80 osd.0(client) v2:127.0.0.1:6801/3989959034 >> client.4202 127.0.0.1:0/3402934116] got unexpected exception in ms_dispatch() std::bad_alloc (std::bad_alloc) ERROR 2024-06-25 20:05:16,391 [shard 6:main] none - /ceph/src/crimson/net/chained_dispatchers.cc:33 : In function 'seastar::future<> crimson::net::ChainedDispatchers::ms_dispatch(crimson::net::ConnectionRef, MessageRef)', abort(%s)
which is this:seastar::future<> ChainedDispatchers::ms_dispatch(ConnectionRef conn, MessageRef m) { try { for (auto& dispatcher : dispatchers) { auto dispatched = dispatcher->ms_dispatch(conn, m); if (dispatched.has_value()) { return std::move(*dispatched ).handle_exception([conn] (std::exception_ptr eptr) { logger().error("{} got unexpected exception in ms_dispatch() throttling {}", *conn, eptr); ceph_abort(); }); } } } catch (...) { logger().error("{} got unexpected exception in ms_dispatch() {}", *conn, std::current_exception()); ceph_abort(); // <---- HERE } if (!dispatchers.empty()) { logger().error("ms_dispatch unhandled message {}", *m); } return seastar::now(); }
JP Updated by Jose J Palacios Perez over 2 years ago
Wonder whether the issue is a race hazard: I completed a full run for 1 OSD 1 reactor without seen the issue: (despite the FIO complains, see below)
# MDS=0 MON=1 OSD=1 MGR=1 ../src/vstart.sh --new -x --localhost --without-dashboard -o timeout=10000 -o session_timeout=10000 --bluestore --redirect-output --bluestore-devs /dev/sdd,/dev/sde,/dev/sdf --crimson --crimson-smp 1 --crimson_seastar_num_threads 1
336492 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f
336494 pts/0 Sl 0:01 /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f
336707 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f
336711 pts/0 Sl 0:04 /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f
337769 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f
337770 pts/0 Sl 0:02 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f
# taskset -acp $(pgrep osd)| wc -l
21
# ps -p $(pgrep crimson-osd) -L -o pid,tid,comm,psr
PID TID COMMAND PSR
337770 337770 crimson-osd 0
337770 337778 syscall-0 0
337770 337779 log 0
337770 337780 alien-store-tp 29
337770 337781 alien-store-tp 28
337770 337782 alien-store-tp 26
337770 337783 alien-store-tp 25
337770 337784 alien-store-tp 24
337770 337785 alien-store-tp 23
337770 337786 crimson-osd 0
337770 337787 bstore_aio 27
337770 337789 rocksdb:low 24
337770 337790 rocksdb:low 25
337770 337791 rocksdb:low 29
337770 337792 rocksdb:high 26
337770 337973 bstore_aio 12
337770 338154 alien-store-tp 27
337770 338155 cfin 26
337770 338156 bstore_kv_sync 25
337770 338157 bstore_kv_final 1
337770 338158 bstore_mempool 31
# /root/bin/cephlogoff.sh
{
"success": ""
}
:
pool 'rbd' created
enabled application 'rbd' on pool 'rbd'
NAME PROVISIONED USED
fio_test_0 10 GiB 0 B
# RBD_NAME=fio_test_0 RBD_SIZE="10G" fio /fio/examples/rbd_prefill.fio && rbd du fio_test_0 && cd /tmp; /root/bin/run_fio.sh -s -n -a -c "0-31" -p 01_crimson_1osd_1reactor_basic # single SSD -- recreate fresh stacktrace
prefill: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=rbd, iodepth=4
:
fio: io_u error on file prefill.1.0: Cannot send after transport endpoint shutdown: write offset=1406992384, buflen=65536
fio: io_u error on file prefill.1.0: Cannot send after transport endpoint shutdown: write offset=1407057920, buflen=65536
fio: io_u error on file prefill.1.0: Cannot send after transport endpoint shutdown: write offset=1407123456, buflen=65536
fio: io_u error on file prefill.1.0: Cannot send after transport endpoint shutdown: write offset=1407188992, buflen=65536
fio: pid=338713, err=108/file:io_u.c:1973, func=io_u error, error=Cannot send after transport endpoint shutdown
prefill: (groupid=0, jobs=2): err=108 (file:io_u.c:1973, func=io_u error, error=Cannot send after transport endpoint shutdown): pid=338712: Wed Jun 26 13:36:10 2024
:
un status group 0 (all jobs):
WRITE: bw=41.8MiB/s (43.8MB/s), 41.8MiB/s-41.8MiB/s (43.8MB/s-43.8MB/s), io=20.4GiB (21.9GB), run=499983-499983msec
Disk stats (read/write):
sdb: ios=10/5719, sectors=856/444592, merge=0/79, ticks=4/2094, in_queue=2182, util=0.31%
== 16: 16: 01_crimson_1osd_1reactor_basic_16job_16io_4k_randread_p0 ==
== Monitoring OSD osd_0: 338746 ==
== 16: 4: 01_crimson_1osd_1reactor_basic_4job_16io_4k_randwrite_p0 ==
== Monitoring OSD osd_0: 338746 ==
== 16: 1: 01_crimson_1osd_1reactor_basic_1job_16io_64k_seqread_p0 ==
== Monitoring OSD osd_0: 338746 ==
== 14: 1: 01_crimson_1osd_1reactor_basic_1job_14io_64k_seqwrite_p0 ==
== Monitoring OSD osd_0: 338746 ==
338746
== Done ==
YC Updated by Yingxin Cheng over 2 years ago
Hey @Jose J Palacios Perez, I just went through the above comments quickly.
got unexpected exception in ms_dispatch() std::bad_alloc (std::bad_alloc)
ms_dispatch() is designed to abort if there are any unhandled exception from user logic, to print out the unhandled exception for debugging.
In this case, std::bad_alloc looks due to there is not enough memory, probably it is because the server memory isn't enough for your tests?
I haven't seen such error before, but my server memory are normally sufficient, though.
JP Updated by Jose J Palacios Perez over 2 years ago
Thanks @Yingxin, yes I was wondering about that, but when monitoring the memory (as given by top) did not found anything that pointed out an excessive usage, its has been a single process. I have been running the tests for 3 OSD without interruption or failure since yesterday, I will keep an eye open if it resurfaces again.
JP Updated by Jose J Palacios Perez over 2 years ago
- osd.0.stdout:
INFO 2024-06-27 10:42:03,303 [shard 0:main] osd - get_early_config: set --thread-affinity 1 --cpuset 0-3 DEBUG 2024-06-27 10:42:03,303 [shard 0:main] seastar - reactor::drain INFO 2024-06-27 10:42:03,507 seastar - Reactor backend: linux-aio Segmentation fault on shard 0. Backtrace: Reactor stalled for 15703 ms on shard 0. Backtrace: 0x29e606a 0x29a29a0 0x29a2ee6 0x29a30c7 0x54daf 0x11aa76 0x11a899 0x1a6375d 0x1a6396d 0x1a63df8 0x1a645c9 0x1a62470 0x1a6254f 0x1a632da 0x54daf 0x1bb1a23 0x299eb7f 0x299eed0 0x29d6d85 0x29d78e8 0x293bee1 0x293c62b 0x11847e2 0x3feaf 0x3ff5f 0x11d7254 kernel callstack: 0xffffffffffffff80 0xffffffffa651c2ea 0xffffffffa651c9e2 0xffffffffa652335d 0xffffffffa65236f7 0xffffffffa62f41b3 0xffffffffa62f4351 0xffffffffa62f5690 0xffffffffa62f6337 0xffffffffa62f67a0 0xffffffffa6d2515c 0xffffffffa6e0009b 0# seastar::shared_ptr<crimson::net::Connection>::operator*() const at /ceph/src/seastar/include/seastar/core/shared_ptr.hh:610 1# seastar::reactor::run_tasks(seastar::reactor::task_queue&) at /ceph/src/seastar/src/core/reactor.cc:2692 2# seastar::reactor::run_some_tasks() at /ceph/src/seastar/src/core/reactor.cc:3155 3# seastar::reactor::do_run() at /ceph/src/seastar/src/core/reactor.cc:3324 4# seastar::reactor::run() at /ceph/src/seastar/src/core/reactor.cc:3219 5# seastar::app_template::run_deprecated(int, char**, std::function<void ()>&&) at /ceph/src/seastar/src/core/app-template.cc:277 6# seastar::app_template::run(int, char**, std::function<seastar::future<int> ()>&&) at /ceph/src/seastar/src/core/app-template.cc:167 7# main at /usr/include/c++/11/bits/std_function.h:334 8# 0x00007FAB97816EB0 in /lib64/libc.so.6 9# __libc_start_main in /lib64/libc.so.6 10# _start in /ceph/build/bin/crimson-osd # wc -l osd.?.log osd.?.stdout 15239 osd.0.log 4643250 osd.1.log 275728 osd.2.log 690 osd.0.stdout <-- the only backtrace above 128 osd.1.stdout 128 osd.2.stdout # grep -c ERROR osd.?.log osd.0.log:29 osd.1.log:866481 osd.2.log:5020 # grep -c backtrace osd.?.log osd.0.log:0 osd.1.log:0 osd.2.log:0 - Most of the errors are of two types:
ERROR 2024-06-27 11:02:57,335 [shard 1:main] osd - do_osd_ops_execute::failure_func osd_op(client.4256.0:643098 2.3 2:c333f7a1:::rbd_header.107037e8235:head {call lock.lock in=69b} snapc 0={} ondisk+write+known_if_redirected+supports_pool_eio e18) v9 got error: generic:16
and this:ERROR 2024-06-27 11:02:57,334 [shard 1:main] osd - do_update_log_missing_reply : 2.3 got reply pg_update_log_missing_reply(2.3 epoch 18/15 rep_tid 72057594038560573 lcod 18'537230) v3 on unknown tid 72057594038560573 - Two OSD processes were terminated
# pgrep osd 355490 - The only OSD process that survived the test was osd.2:
osd.0.pid 353035 osd.1.pid 354263 osd.2.pid 355490 - osd.0.log:
INFO 2024-06-27 11:08:02,440 [shard 0:main] prioritycache - prioritycache tune_memory target: 4294967296 mapped: 20267458560 unmapped: 1515520 heap: 20268974080 old mem: 134217728 new mem: 134217728 INFO 2024-06-27 11:08:03,347 [shard 0:main] alienstore - stat WARN 2024-06-27 11:08:03,349 [shard 0:main] mgrc - No active mgr available yet WARN 2024-06-27 11:08:03,350 [shard 3:main] osd - OSD::ms_handle_reset: [0x6007473aed20 osd.0(client) v2:127.0.0.1:6801/378511217 >> client.4124 127.0.0.1:0/2276393455] WARN 2024-06-27 11:08:03,350 [shard 3:main] osd - OSD::ms_handle_reset: [0x60000000e700 osd.0(client) v2:127.0.0.1:6801/378511217 >> mgr.4112 127.0.0.1:0/3671586626] INFO 2024-06-27 11:08:03,362 [shard 0:main] alienstore - pool_statfs WARN 2024-06-27 11:08:03,367 [shard 2:main] osd - read_metadata_for_push_op: fail to read omap header - osd.1.log:
INFO 2024-06-27 11:08:04,576 [shard 1:main] osd - PerShardState::start_operation, PGAdvanceMap(pg=2.1d from=4294967295 to=25) INFO 2024-06-27 11:08:04,585 [shard 0:main] osd - evt epoch is 25, i have 24, will wait INFO 2024-06-27 11:08:04,585 [shard 0:main] osd - OSDSingletonState::osdmap_subscribe: epoch 24 INFO 2024-06-27 11:08:04,586 [shard 0:main] osd - OSD::committed_osd_maps: osd.1: now active INFO 2024-06-27 11:08:04,586 [shard 0:main] osd - OSD::_handle_osd_map: osd_map(25..25 src has 1..25) v4 INFO 2024-06-27 11:08:04,586 [shard 0:main] osd - OSD::_handle_osd_map: epochs [25..25], i have 25, src has [1..25] INFO 2024-06-27 11:08:04,586 [shard 0:main] osd - OSD::_handle_osd_map: osd_map(24..25 src has 1..25) v4 INFO 2024-06-27 11:08:04,586 [shard 0:main] osd - OSD::_handle_osd_map: epochs [24..25], i have 25, src has [1..25] INFO 2024-06-27 11:08:05,405 [shard 0:main] alienstore - stat INFO 2024-06-27 11:08:05,703 [shard 0:main] prioritycache - prioritycache tune_memory target: 4294967296 mapped: 16304373760 unmapped: 974848 heap: 16305348608 old mem: 134217728 new mem: 134217728 - osd.2.log: end
INFO 2024-06-27 14:16:18,266 [shard 0:main] alienstore - pool_statfs ERROR 2024-06-27 14:16:18,495 [shard 3:main] ms - ms_dispatch unhandled message ping magic: 0 v1 ERROR 2024-06-27 14:16:18,520 [shard 0:main] ms - ms_dispatch unhandled message ping magic: 0 v1 INFO 2024-06-27 14:16:18,717 [shard 0:main] prioritycache - prioritycache tune_memory target: 4294967296 mapped: 9188851712 unmapped: 8200192 heap: 9197051904 old mem: 134217728 new mem: 134217728 INFO 2024-06-27 14:16:18,785 [shard 0:main] alienstore - stat INFO 2024-06-27 14:16:19,718 [shard 0:main] prioritycache - prioritycache tune_memory target: 4294967296 mapped: 9188851712 unmapped: 8200192 heap: 9197051904 old mem: 134217728 new mem: 134217728 INFO 2024-06-27 14:16:19,785 [shard 0:main] alienstore - stat - looking back around the time osd.0 and osd.1 both end:
:
INFO 2024-06-27 11:08:04,586 [shard 0:main] osd - OSD::_handle_osd_map: osd_map(24..25 src has 1..25) v4
INFO 2024-06-27 11:08:04,586 [shard 0:main] osd - OSD::_handle_osd_map: epochs [24..25], i have 25, src has [1..25]
INFO 2024-06-27 11:08:05,423 [shard 0:main] prioritycache - prioritycache tune_memory target: 4294967296 mapped: 9188745216 unmapped: 8306688 heap: 9197051904 old mem: 134217728 new mem: 134217728
INFO 2024-06-27 11:08:05,974 [shard 0:main] alienstore - stat
INFO 2024-06-27 11:08:06,469 [shard 0:main] prioritycache - prioritycache tune_memory target: 4294967296 mapped: 9188745216 unmapped: 8306688 heap: 9197051904 old mem: 134217728 new mem: 134217728
:
INFO 2024-06-27 11:08:08,402 [shard 0:main] rocksdb - rocksdb: commit_cache_size High Pri Pool Ratio set to 0
INFO 2024-06-27 11:08:08,402 [shard 0:main] bluestore - bluestore.MempoolThread(0x600000132b50) _resize_shards cache_size: 134217728 kv_alloc: 67108864 kv_used: 12347520 kv_onode_alloc: 67108864 kv_onode_used: 3005344 meta_alloc: 67108864 meta_used: 67107042 data_alloc: 67108864 data_used: 67092480
INFO 2024-06-27 11:08:08,435 [shard 0:main] ms - 0x600635bc82a0 osd.2(client) v2:127.0.0.1:6809/3559347110 >> unknown.? -@49180 ProtocolV2::start_accept(): target_addr=v2:127.0.0.1:49180/0
INFO 2024-06-27 11:08:08,438 [shard 0:main] ms - 0x600635bc82a0 osd.2(client) v2:127.0.0.1:6809/3559347110 >> client.? -@49180 UPDATE: peer_type=client, policy(lossy=true server=true standby=false resetcheck=false)
INFO 2024-06-27 11:08:08,439 [shard 0:main] monc - added challenge on [0x600635bc82a0 osd.2(client) v2:127.0.0.1:6809/3559347110 >> client.? -@49180]
INFO 2024-06-27 11:08:08,441 [shard 0:main] ms - 0x600635bc82a0 osd.2(client) v2:127.0.0.1:6809/3559347110 >> client.4258 127.0.0.1:0/2581079956@49180 start establishing: gs=0, pgs=13, cs=0, client_cookie=0, server_cookie=0, io(in_seq=0, is_out_queued=false, has_out_sent=false), new_sid=3, no existing
INFO 2024-06-27 11:08:08,441 [shard 0:main] ms - 0x600635bc82a0 osd.2(client) v2:127.0.0.1:6809/3559347110 >> client.4258 127.0.0.1:0/2581079956@49180 established, going to ready
INFO 2024-06-27 11:08:08,452 [shard 0:main] prioritycache - prioritycache tune_memory target: 4294967296 mapped: 9188745216 unmapped: 8306688 heap: 9197051904 old mem: 134217728 new mem: 134217728
INFO 2024-06-27 11:08:08,491 [shard 0:main] ms - 0x60000000d1c0 osd.2(cluster) v2:127.0.0.1:6810/3559347110 >> osd.1 v2:127.0.0.1:6806/183623213@63280 do_in_dispatch(): fault at open, io_stat(io_state=open, in_seq=1594908, out_seq=1594925, out_pending_msgs_size=0, out_sent_msgs_size=0, need_ack=0, need_keepalive=0, need_keepalive_ack=0), going to delay -- read eof, send 1 notify_out_fault()
INFO 2024-06-27 11:08:08,491 [shard 0:main] ms - 0x60000000d1c0 osd.2(cluster) v2:127.0.0.1:6810/3559347110 >> osd.1 v2:127.0.0.1:6806/183623213@63280 protocol READY do_in_dispatch fault with nothing to send, going to STANDBY io(in_seq=1594908, is_out_queued=false, has_out_sent=false) -- read eof
:
INFO 2024-06-27 11:08:08,492 [shard 0:main] ms - 0x60000000d9a0 osd.2(hb_back) v2:127.0.0.1:6811/3559347110 >> osd.1 v2:127.0.0.1:6807/183623213@58612 protocol READY do_in_dispatch fault on lossy channel, going to CLOSING -- recv: Connection reset by peer
INFO 2024-06-27 11:08:08,492 [shard 0:main] ms - 0x60000000d9a0 osd.2(hb_back) v2:127.0.0.1:6811/3559347110 >> osd.1 v2:127.0.0.1:6807/183623213@58612 closing: reset yes, replace no
INFO 2024-06-27 11:08:08,492 [shard 0:main] osd - Heartbeat::Peer: osd.1 disconnected
:
INFO 2024-06-27 11:08:41,703 [shard 0:main] ms - 0x600635bc81c0 osd.2(hb_front) v2:127.0.0.1:6812/3559347110@56676 >> osd.0 v2:127.0.0.1:6804/378511217 closing: reset yes, replace no
INFO 2024-06-27 11:08:41,703 [shard 0:main] osd - Heartbeat::Peer: osd.0 disconnected
:
INFO 2024-06-27 11:08:44,662 [shard 0:main] ms - 0x60000000d2a0 osd.2(hb_back) v2:127.0.0.1:6811/3559347110 >> osd.1 v2:127.0.0.1:6807/183623213 protocol CONNECTING execute_connecting fault, going to WAIT io(in_seq=0, is_out_queued=false, has_out_sent=false) -- Connection refused
:
INFO 2024-06-27 11:09:08,468 [shard 0:main] bluestore - bluestore.MempoolThread(0x600000132b50) _resize_shards cache_size: 134217728 kv_alloc: 67108864 kv_used: 12347520 kv_onode_alloc: 67108864 kv_onode_used: 3005344 meta_alloc: 67108864 meta_used: 67107042 data_alloc: 67108864 data_used: 67092480
:
I wonder if it would make any difference to set an amount of memory (--osd-args "--memory 4G") for each OSD when creating the cluster? I'll also try the '--valgrind_osd' flag option from vstart, just need to investigate what options of the tool would be useful (eg memcheck,
JP Updated by Jose J Palacios Perez over 2 years ago
- File crimson_osd_valgrind.out crimson_osd_valgrind.out added
Reattempt 3 OSD 4 reactors:¶
# MDS=0 MON=1 OSD=3 MGR=1 ../src/vstart.sh --new -x --localhost --without-dashboard --valgrind_osd "memcheck -v --xml-file=osd_out.xml --leak-check=full" --bluestore --redirect-output --bluestore-devs /dev/sdd,/dev/sde,/dev/sdf --crimson --crimson-smp 4 --
crimson_seastar_num_threads 4 --no-restart # rerun w valgrind osd
:
INFO 2024-06-27 16:07:23,406 [shard 0:main] osd - get_early_config: set --thread-affinity 1 --cpuset 0-3
DEBUG 2024-06-27 16:07:23,406 [shard 0:main] seastar - reactor::drain
INFO 2024-06-27 16:07:23,581 seastar - Reactor backend: linux-aio
created object store /ceph/build/dev/osd0 for osd.0 fsid c6ca5cb9-7246-45ea-973f-e71e996b6a6f
start osd.0
osd 0 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf
/ceph/build/bin/ceph -c /ceph/build/ceph.conf config set osd.1 crimson_seastar_cpu_cores 4-7
valgrind '--tool=memcheck -v --xml-file=osd_out.xml --leak-check=full' /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f &
valgrind: failed to start tool 'memcheck -v --xml-file=osd_out.xml --leak-check=full' for platform 'amd64-linux': No such file or directory
didn't liked that, so I tried manually:
# valgrind --tool=memcheck -v --xml-file=osd_out.xml --leak-check=full /ceph/build/bin/crimson-osd -i 2 -c /ceph/build/ceph.conf -f
==363854== Memcheck, a memory error detector
==363854== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==363854== Using Valgrind-3.22.0-bd4db67b1d-20231031 and LibVEX; rerun with -h for copyright info
==363854== Command: /ceph/build/bin/crimson-osd -i 2 -c /ceph/build/ceph.conf -f
==363854==
--363854-- Valgrind options:
--363854-- --tool=memcheck
--363854-- -v
--363854-- --xml-file=osd_out.xml
--363854-- --leak-check=full
--363854-- Contents of /proc/version:
--363854-- Linux version 5.14.0-284.11.1.el9_2.x86_64 ([email protected]) (gcc (GCC) 11.3.1 20221121 (Red Hat 11.3.1-4), GNU ld version 2.35.2-37.el9) #1 SMP PREEMPT_DYNAMIC Wed Apr 12 10:45:03 EDT 2023
:
--363890-- Warning: unhandled io_submit opcode: 5
--363890-- WARNING: unhandled amd64-linux syscall: 333
==363890== at 0x59E8E5D: syscall (syscall.S:38)
==363890== by 0x2B4DC00: seastar::internal::io_pgetevents(unsigned long, long, long, seastar::internal::linux_abi::io_event*, timespec const*, __sigset_t const*, bool) (linux-aio.cc:163)
==363890== by 0x2B44B90: detect_aio_poll (reactor_backend.cc:1996)
==363890== by 0x2B44B90: seastar::reactor_backend_selector::available() (reactor_backend.cc:2041)
==363890== by 0x29C1EF8: backend_selector_candidates (reactor.cc:3852)
==363890== by 0x29C1EF8: seastar::reactor_options::reactor_options(seastar::program_options::option_group*) (reactor.cc:3891)
==363890== by 0x293B035: seastar::app_template::seastar_options::seastar_options() (app-template.cc:70)
==363890== by 0x293CFC6: seastar_options_from_config (app-template.cc:58)
==363890== by 0x293CFC6: seastar::app_template::app_template(seastar::app_template::config) (app-template.cc:108)
==363890== by 0x124076F: crimson::osd::_get_early_config(int, char const**) (main_config_bootstrap_helpers.cc:109)
==363890== by 0x12436E0: crimson::osd::get_early_config(int, char const**) (main_config_bootstrap_helpers.cc:241)
==363890== by 0x1184418: main (main.cc:90)
--363890-- You may be able to write your own handler.
--363890-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--363890-- Nevertheless we consider this a bug. Please report
--363890-- it at http://valgrind.org/support/bug_reports.html.
Aborting.
Backtrace:
0x29e5aca
0x29a2a60
0x29a3157
0x29a31f4
/lib64/libc.so.6+0x54daf
/lib64/libc.so.6+0xa365b
/lib64/libc.so.6+0x54d05
/lib64/libc.so.6+0x287f2
0x117c52f
/lib64/libc.so.6+0xa6b27
0x2b4e91f
0x117cc8b
0x29dc925
0x293ba88
0x293c62b
0x124082c
0x12436e0
0x1184418
/lib64/libc.so.6+0x3feaf
/lib64/libc.so.6+0x3ff5f
0x11d7254
==363890==
==363890== Process terminating with default action of signal 6 (SIGABRT)
==363890== at 0x5A4D65C: __pthread_kill_implementation (pthread_kill.c:44)
==363890== by 0x59FED05: raise (raise.c:26)
==363890== by 0x59D27F2: abort (abort.c:79)
==363890== by 0x117C52F: std::once_flag::_Prepare_execution::_Prepare_execution<std::call_once<seastar::memory::mem_base()::{lambda()#1}>(std::once_flag&, seastar::memory::mem_base()::{lambda()#1}&&)::{lambda()#1}>(seastar::memory::mem_base()::{lambda()#1}&)::{lambda
()#1}::_FUN() [clone .cold] (memory.cc:339)
==363890== by 0x5A50B27: __pthread_once_slow (pthread_once.c:117)
==363890== by 0x2B4E91F: __gthread_once (gthr-default.h:700)
==363890== by 0x2B4E91F: call_once<seastar::memory::mem_base()::<lambda()> > (mutex:783)
==363890== by 0x2B4E91F: mem_base (memory.cc:333)
==363890== by 0x2B4E91F: seastar::memory::cpu_pages::initialize() [clone .part.0] (memory.cc:1215)
==363890== by 0x117CC8B: seastar::memory::configure(std::vector<seastar::resource::memory, std::allocator<seastar::resource::memory> >, bool, bool, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >) (memory.cc:1814)
==363890== by 0x29DC925: seastar::smp::configure(seastar::smp_options const&, seastar::reactor_options const&) (reactor.cc:4425)
==363890== by 0x293BA88: seastar::app_template::run_deprecated(int, char**, std::function<void ()>&&) (app-template.cc:252)
==363890== by 0x293C62B: seastar::app_template::run(int, char**, std::function<seastar::future<int> ()>&&) (app-template.cc:167)
==363890== by 0x124082C: crimson::osd::_get_early_config(int, char const**) (main_config_bootstrap_helpers.cc:111)
==363890== by 0x12436E0: crimson::osd::get_early_config(int, char const**) (main_config_bootstrap_helpers.cc:241)
==363890==
==363890== HEAP SUMMARY:
==363890== in use at exit: 2,213,505 bytes in 9,561 blocks
==363890== total heap usage: 34,668 allocs, 25,107 frees, 4,802,515 bytes allocated
==363890== Searching for pointers to 9,561 not-freed blocks
==363890== Checked 4,126,248 bytes
==363890==
==363890== 8 bytes in 1 blocks are definitely lost in loss record 20 of 1,512
==363890== at 0x4844F95: operator new(unsigned long) (vg_replace_malloc.c:483)
==363890== by 0x48DEB81: MallocExtension::Register(MallocExtension*) (in /usr/lib64/libtcmalloc.so.4.5.9)
==363890== by 0x48C5BF9: ??? (in /usr/lib64/libtcmalloc.so.4.5.9)
==363890== by 0x400A1ED: call_init (dl-init.c:70)
==363890== by 0x400A1ED: call_init (dl-init.c:26)
==363890== by 0x400A2DB: _dl_init (dl-init.c:117)
==363890== by 0x4020EE9: ??? (in /usr/lib64/ld-linux-x86-64.so.2)
==363890== by 0x5: ???
==363890== by 0x1FFF000616: ???
==363890== by 0x1FFF000632: ???
==363890== by 0x1FFF000635: ???
==363890== by 0x1FFF000637: ???
==363890== by 0x1FFF00063A: ???
attached full output.
JP Updated by Jose J Palacios Perez over 2 years ago
I think i can now make sense of the bad_alloc exception, the following is a summary of the podman stats for my container running the benchmarks: it clearly reaches a peak of mem utilisation, so it would make sense that it might try allocate more than available, and hence hit the bad_alloc exception. Note that even on an idle cluster the mem util is above 60%, I always start with a fresh cluster, so its never been an easier way to recreate the problem
# podman stats
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU %
2bac8f8d9dd1 hardcore_lumiere 559.82% 6.243GB / 134.5GB 4.64% 3.745GB / 1.525GB 2.365TB / 2.916TB 253 83h15m22.455024s 21.42%
2bac8f8d9dd1 hardcore_lumiere 524.62% 10.21GB / 134.5GB 7.59% 3.745GB / 1.525GB 2.365TB / 2.923TB 253 83h19m10.4623s 21.44%
2bac8f8d9dd1 hardcore_lumiere 545.59% 15.23GB / 134.5GB 11.32% 3.745GB / 1.525GB 2.365TB / 2.932TB 253 83h23m59.494324s 21.46%
-- prefill 10 GB volume
2bac8f8d9dd1 hardcore_lumiere 970.76% 110.8GB / 134.5GB 82.33% 3.745GB / 1.525GB 2.392TB / 3.016TB 287 85h23m22.123987s 21.95%
2bac8f8d9dd1 hardcore_lumiere 1028.96% 113.9GB / 134.5GB 84.66% 3.745GB / 1.525GB 2.392TB / 3.021TB 287 85h29m38.169728s 21.98%
2bac8f8d9dd1 hardcore_lumiere 972.11% 114.6GB / 134.5GB 85.18% 3.745GB / 1.525GB 2.392TB / 3.023TB 287 85h32m46.876121s 21.99%
-- peak during random workloads
2bac8f8d9dd1 hardcore_lumiere 30.67% 130.2GB / 134.5GB 96.81% 3.745GB / 1.525GB 2.412TB / 3.03TB 243 85h40m23.737749s 22.02%
2bac8f8d9dd1 hardcore_lumiere 145.52% 130.3GB / 134.5GB 96.84% 3.745GB / 1.525GB 2.421TB / 3.03TB 244 85h40m48.879837s 22.03%
-- idle cluster
2bac8f8d9dd1 hardcore_lumiere 3.11% 84.3GB / 134.5GB 62.67% 3.745GB / 1.525GB 2.43TB / 3.031TB 192 85h41m18.141394s 22.03%
2bac8f8d9dd1 hardcore_lumiere 3.04% 84.3GB / 134.5GB 62.67% 3.745GB / 1.525GB 2.43TB / 3.031TB 189 85h41m20.099237s 22.03%
-- kill cluster
2bac8f8d9dd1 hardcore_lumiere 59.31% 18.39GB / 134.5GB 13.67% 3.745GB / 1.525GB 2.43TB / 3.031TB 12 85h41m32.384383s 22.02%
2bac8f8d9dd1 hardcore_lumiere 16.57% 1.827MB / 134.5GB 0.00% 3.745GB / 1.525GB 2.43TB / 3.031TB 7 85h41m33.212945s 22.02%
The cluster status also changed a bit drastically, right after the test completes we have:
# ceph status
2024-06-28T15:51:06.205+0000
cluster:
id: f175cb54-e27f-466f-8d42-07ebd8c0536f
health: HEALTH_OK
services:
mon: 1 daemons, quorum a (age 2m)
mgr: x(active, since 2m)
osd: 3 osds: 3 up (since 2m), 3 in (since 2m)
data:
pools: 1 pools, 1 pgs
objects: 2 objects, 449 KiB
usage: 81 MiB used, 671 GiB / 671 GiB avail
pgs: 1 active+clean
only six mins later it is no longer a happy camper (got OSD down)
2024-06-28T15:57:02.222+0000
cluster:
id: f175cb54-e27f-466f-8d42-07ebd8c0536f
health: HEALTH_WARN
1 osds down
Degraded data redundancy: 1842/5526 objects degraded (33.333%), 24 pgs degraded, 33 pgs undersized
services:
mon: 1 daemons, quorum a (age 31m)
mgr: x(active, since 31m)
osd: 3 osds: 2 up (since 3m), 3 in (since 31m)
data:
pools: 2 pools, 33 pgs
objects: 1.84k objects, 7.2 GiB
usage: 34 GiB used, 637 GiB / 671 GiB avail
pgs: 1842/5526 objects degraded (33.333%)
24 active+undersized+degraded
9 active+undersized
I'll search for sources of memory monitoring next, probably worth also trying with the vstart flag (--osd-args "--memory 24G" for example).
This might also help explain why has not yet seen my the wider Crimson community, probably using beefier kit
JP Updated by Jose J Palacios Perez over 2 years ago
- File osd_0_crimson_3osd_2reactor_basic_16job_16io_4k_randread_p0_top_mem.png osd_0_crimson_3osd_2reactor_basic_16job_16io_4k_randread_p0_top_mem.png added
- File osd_1_crimson_3osd_2reactor_basic_16job_16io_4k_randread_p0_top_mem.png osd_1_crimson_3osd_2reactor_basic_16job_16io_4k_randread_p0_top_mem.png added
- File osd_2_crimson_3osd_2reactor_basic_16job_16io_4k_randread_p0_top_mem.png osd_2_crimson_3osd_2reactor_basic_16job_16io_4k_randread_p0_top_mem.png added
Here is a quick update to show the mem utilisation per thread in the recent build, per OSD process. I'll try find out data collected from the earlier runs (start of the year) to compare. This is taken inside the running container (top) for a single OSD process, which clearly shows an increasing utilisation -- rather than a flat line. Too early to find out evidence of mem leaks though. But definitely there might be opportunity to reduce the alie thread pool mem utilisation:



JP Updated by Jose J Palacios Perez over 2 years ago
- File osd_0_01_crimson_1osd_1reactor_basic_16job_16io_4k_randread_p0_top_mem.png osd_0_01_crimson_1osd_1reactor_basic_16job_16io_4k_randread_p0_top_mem.png added
- File osd_0_01_crimson_1osd_1reactor_basic_4job_16io_4k_randwrite_p0_top_mem.png osd_0_01_crimson_1osd_1reactor_basic_4job_16io_4k_randwrite_p0_top_mem.png added
- File osd_0_classic_1osd_16job_16io_4k_randread_p0_top_mem.png osd_0_classic_1osd_16job_16io_4k_randread_p0_top_mem.png added
- File osd_0_classic_1osd_4job_16io_4k_randwrite_p0_top_mem.png osd_0_classic_1osd_4job_16io_4k_randwrite_p0_top_mem.png added
Here is the mem utilisation for a single OSD, single reactor. Notice that the figures are cummulative per thread name, there are seven Alien threads for a single reactor, so each uses ~50% approximately, but always increasing.
| Random Read 4k | Random Write 4k |
|---|---|
|
|
Here is a sample of the corresponding top output (random write -- first and last sample):
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
338746 root 20 0 16.0t 57.3g 58272 R 93.3 45.7 5:45.62 crimson-osd
339127 root 20 0 16.0t 57.3g 58272 S 20.0 45.7 0:05.96 bstore_kv_sync
338754 root 20 0 16.0t 57.3g 58272 S 13.3 45.7 0:27.01 alien-store-tp
338751 root 20 0 16.0t 57.3g 58272 S 6.7 45.7 0:31.57 alien-store-tp
338752 root 20 0 16.0t 57.3g 58272 S 6.7 45.7 0:39.84 alien-store-tp
:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
338746 root 20 0 16.0t 62.3g 58400 R 96.0 49.8 7:09.13 crimson-osd
339127 root 20 0 16.0t 62.3g 58400 S 19.3 49.8 0:22.62 bstore_kv_sync
339128 root 20 0 16.0t 62.3g 58400 S 6.0 49.8 0:06.48 bstore_kv_final
338751 root 20 0 16.0t 62.3g 58400 S 5.3 49.8 0:36.29 alien-store-tp
338752 root 20 0 16.0t 62.3g 58400 S 5.0 49.8 0:43.91 alien-store-tp
In contrast, here is the mem utilisation for Classic, for the same workloads.
| Random Read 4k | Random Write 4k |
|---|---|
|
|
The following is a summary of the mem utilisation as reported by podman stats, which is consistent with the top output, but more importantly, it decreases when the workloads complete.
# prefill image
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU %
2bac8f8d9dd1 hardcore_lumiere 139.32% 541.8MB / 134.5GB 0.40% 3.747GB / 1.572GB 2.437TB / 3.091TB 235 86h35m18.988104s 18.86%
2bac8f8d9dd1 hardcore_lumiere 138.44% 654.8MB / 134.5GB 0.49% 3.747GB / 1.572GB 2.437TB / 3.093TB 235 86h35m46.753992s 18.86%
# start workload:
2bac8f8d9dd1 hardcore_lumiere 268.16% 3.883GB / 134.5GB 2.89% 3.748GB / 1.573GB 2.486TB / 3.163TB 460 87h38m34.332929s 19.05%
2bac8f8d9dd1 hardcore_lumiere 266.03% 3.884GB / 134.5GB 2.89% 3.748GB / 1.573GB 2.487TB / 3.163TB 460 87h38m47.638063s 19.05%
# running workload
2bac8f8d9dd1 hardcore_lumiere 255.15% 3.643GB / 134.5GB 2.71% 3.748GB / 1.573GB 2.496TB / 3.168TB 270 87h56m37.05978s 19.10%
2bac8f8d9dd1 hardcore_lumiere 254.23% 3.702GB / 134.5GB 2.75% 3.748GB / 1.573GB 2.496TB / 3.169TB 270 87h56m49.774152s 19.10%
2bac8f8d9dd1 hardcore_lumiere 103.51% 5.183GB / 134.5GB 3.85% 3.748GB / 1.574GB 2.496TB / 3.181TB 204 88h7m54.750093s 19.14%
2bac8f8d9dd1 hardcore_lumiere 103.66% 5.186GB / 134.5GB 3.86% 3.748GB / 1.574GB 2.496TB / 3.181TB 204 88h7m59.934459s 19.14%
# workloads completed, idle cluster
2bac8f8d9dd1 hardcore_lumiere 19.17% 3.839GB / 134.5GB 2.85% 3.748GB / 1.574GB 2.568TB / 3.189TB 221 88h19m39.971546s 19.17%
2bac8f8d9dd1 hardcore_lumiere 69.09% 2.927GB / 134.5GB 2.18% 3.748GB / 1.574GB 2.568TB / 3.19TB 223 88h19m43.426955s 19.17%
JP Updated by Jose J Palacios Perez over 2 years ago
Managed to recreate on Crimson, single OSD, single reactor:¶
[11:09:22]$ # MDS=0 MON=1 OSD=1 MGR=1 ../src/vstart.sh --new -x --localhost --without-dashboard --bluestore --redirect-output --bluestore-devs /dev/sdd,/dev/sde,/dev/sdf --crimson --crimson-smp 1 --crimson_seastar_num_threads 1 --no-restart # Crimson 1OSD 1 reactor, dump
397031 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f
397033 pts/0 Sl 0:00 /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f
397246 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f
397250 pts/0 Sl 0:03 /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f
398308 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f
398309 pts/0 Sl 0:01 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f
# /root/bin/cephlogoff.sh
pool 'rbd' created
enabled application 'rbd' on pool 'rbd'
NAME PROVISIONED USED
fio_test_0 10 GiB 0 B
- Deploying FIO for prefill, then the test driving script to run the workloads: this time it gets hung during prefill:
11:38:58]$ # RBD_NAME=fio_test_0 RBD_SIZE="10G" fio /fio/examples/rbd_prefill.fio && rbd du fio_test_0 && cd /tmp; /root/bin/run_fio.sh -s -a -c "0-31" -p crimson_1osd_1reactor
prefill: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=rbd, iodepth=4
...
fio-3.37-15-gc948
Starting 2 threads
Jobs: 2 (f=2): [W(2)][100.0%][eta 00m:00s]
<seems like hung>
%Cpu(s): 3.1 us, 2.9 sy, 0.0 ni, 93.1 id, 0.0 wa, 0.1 hi, 0.9 si, 0.0 st
MiB Mem : 128288.1 total, 65148.1 free, 57465.1 used, 6670.4 buff/cache
MiB Swap: 4096.0 total, 3291.5 free, 804.5 used. 70823.1 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
398309 root 20 0 16.0t 52.2g 58700 R 87.0 41.7 9:35.71 crimson-osd
399289 root 20 0 495520 56012 30572 S 59.0 0.0 4:24.30 fio
397250 root 20 0 1216648 392544 40832 S 32.3 0.3 0:50.86 ceph-mgr
8 root 20 0 19164 2016 1776 S 0.3 0.0 0:11.34 sshd
- Summary of podman stats:
root@sv1-ceph3 ~]# podman stats --no-reset hardcore_lumiere # crimson new clustert 1osd 1 reactor
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU %
2bac8f8d9dd1 hardcore_lumiere 18.83% 784MB / 134.5GB 0.58% 3.752GB / 1.76GB 2.768TB / 3.555TB 148 90h30m50.427776s 18.83%
2bac8f8d9dd1 hardcore_lumiere 0.62% 784MB / 134.5GB 0.58% 3.752GB / 1.76GB 2.768TB / 3.555TB 148 90h30m50.458545s 18.83%
2bac8f8d9dd1 hardcore_lumiere 0.59% 784MB / 134.5GB 0.58% 3.752GB / 1.76GB 2.768TB / 3.555TB 148 90h30m50.488098s 18.83%
[root@sv1-ceph3 ~]# podman stats --no-reset hardcore_lumiere # prefill
2bac8f8d9dd1 hardcore_lumiere 18.83% 2.66GB / 134.5GB 1.98% 3.752GB / 1.76GB 2.768TB / 3.556TB 183 90h31m9.075207s 18.83%
2bac8f8d9dd1 hardcore_lumiere 151.94% 3.483GB / 134.5GB 2.59% 3.752GB / 1.76GB 2.768TB / 3.556TB 183 90h31m16.674803s 18.83%
:
- mem util creeps up
2bac8f8d9dd1 hardcore_lumiere 176.75% 56.42GB / 134.5GB 41.94% 3.752GB / 1.761GB 2.768TB / 3.586TB 183 90h42m45.704462s 18.86%
2bac8f8d9dd1 hardcore_lumiere 180.99% 56.43GB / 134.5GB 41.95% 3.752GB / 1.761GB 2.768TB / 3.586TB 197 90h44m18.059888s 18.87%
2bac8f8d9dd1 hardcore_lumiere 180.51% 56.43GB / 134.5GB 41.95% 3.752GB / 1.761GB 2.768TB / 3.586TB 197 90h44m27.088183s 18.87%
2bac8f8d9dd1 hardcore_lumiere 180.20% 56.43GB / 134.5GB 41.95% 3.752GB / 1.761GB 2.768TB / 3.586TB 197 90h44m36.101573s 18.87%
# podman stats --no-reset hardcore_lumiere # stuck?
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU %
2bac8f8d9dd1 hardcore_lumiere 18.89% 56.42GB / 134.5GB 41.94% 3.752GB / 1.761GB 2.768TB / 3.586TB 183 90h51m17.314163s 18.89%
2bac8f8d9dd1 hardcore_lumiere 176.97% 56.42GB / 134.5GB 41.94% 3.752GB / 1.761GB 2.768TB / 3.586TB 183 90h51m26.164298s 18.89%
2bac8f8d9dd1 hardcore_lumiere 176.82% 56.42GB / 134.5GB 41.94% 3.752GB / 1.761GB 2.768TB / 3.586TB 183 90h51m35.007208s 18.89%
2bac8f8d9dd1 hardcore_lumiere 176.53% 56.42GB / 134.5GB 41.94% 3.752GB / 1.761GB 2.768TB / 3.586TB 183 90h51m43.83612s 18.89%
# killed FIO, OSD down
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU %
2bac8f8d9dd1 hardcore_lumiere 19.10% 56.43GB / 134.5GB 41.95% 3.752GB / 1.761GB 2.768TB / 3.588TB 181 92h1m0.698491s 19.10%
2bac8f8d9dd1 hardcore_lumiere 78.84% 445.6MB / 134.5GB 0.33% 3.752GB / 1.761GB 2.768TB / 3.588TB 158 92h1m4.641443s 19.10%
2bac8f8d9dd1 hardcore_lumiere 3.02% 446.2MB / 134.5GB 0.33% 3.752GB / 1.761GB 2.768TB / 3.588TB 159 92h1m4.792519s 19.10%
- osd.0.stdout: bad_alloc
DEBUG 2024-07-02 11:11:01,857 [shard 0:main] ms - ~SocketMessenger: temp_mon_client
INFO 2024-07-02 11:11:01,857 [shard 0:main] osd - get_early_config: set --thread-affinity 1 --cpuset 0-0
DEBUG 2024-07-02 11:11:01,857 [shard 0:main] seastar - reactor::drain
INFO 2024-07-02 11:11:02,187 seastar - Reactor backend: linux-aio
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborting on shard 0.
Backtrace:
0# 0x00007F5E8369665C in /lib64/libc.so.6
1# raise in /lib64/libc.so.6
2# abort in /lib64/libc.so.6
3# 0x00007F5E83998B21 in /lib64/libstdc++.so.6
4# 0x00007F5E839A452C in /lib64/libstdc++.so.6
5# 0x00007F5E839A34F9 in /lib64/libstdc++.so.6
6# __gxx_personality_v0 in /lib64/libstdc++.so.6
7# 0x00007F5E838122C4 in /lib64/libgcc_s.so.1
8# _Unwind_RaiseException in /lib64/libgcc_s.so.1
9# __cxa_throw in /lib64/libstdc++.so.6
10# std::once_flag::_Prepare_execution::_Prepare_execution<std::call_once<seastar::memory::mem_base()::{lambda()#1}>(std::once_flag&, seastar::memory::mem_base()::{lambda()#1}&&)::{lambda()#1}>(seastar::memory::mem_base()::{lambda()#1}&)::{lambda()#1}::_FUN() [clone .c
old] at /ceph/src/seastar/src/core/memory.cc:339
11# std::function<seastar::memory::reclaiming_result ()>::function(std::function<seastar::memory::reclaiming_result ()> const&) at /ceph/src/seastar/src/core/memory.cc:2387
12# seastar::shared_future<boost::intrusive_ptr<MAuthReply> >::shared_state::entry& seastar::internal::abortable_fifo<seastar::shared_future<boost::intrusive_ptr<MAuthReply> >::shared_state::entry, seastar::shared_future<boost::intrusive_ptr<MAuthReply> >::shared_state
::entry_expiry>::emplace_back<>() at /ceph/src/seastar/include/seastar/core/chunked_fifo.hh:397
13# seastar::internal::future_base::future_base(seastar::internal::promise_base*, seastar::future_state_base*) at /ceph/src/seastar/include/seastar/core/future.hh:1104
14# crimson::mon::Connection::do_auth_single(crimson::mon::Connection::request_t) at /ceph/src/seastar/include/seastar/core/future.hh:448
15# crimson::mon::Connection::do_auth(crimson::mon::Connection::request_t) at /ceph/src/seastar/include/seastar/core/future.hh:447
16# crimson::mon::Connection::renew_rotating_keyring() at /ceph/src/seastar/include/seastar/core/future.hh:448 (discriminator 4)
17# crimson::mon::Client::tick() at /ceph/src/crimson/mon/MonClient.cc:470
18# boost::intrusive::list_node_traits<void*>::get_next(boost::intrusive::list_node<void*> const*) at /ceph/build/boost/include/boost/intrusive/detail/list_node.hpp:60
19# seastar::reactor::do_expire_lowres_timers() at /ceph/src/seastar/src/core/reactor.cc:2745
20# seastar::reactor::poll_once() at /ceph/src/seastar/src/core/reactor.cc:3420
21# seastar::reactor::do_run() at /ceph/src/seastar/src/core/reactor.cc:3344
22# seastar::reactor::run() at /ceph/src/seastar/src/core/reactor.cc:3219
23# seastar::app_template::run_deprecated(int, char**, std::function<void ()>&&) at /ceph/src/seastar/src/core/app-template.cc:277
24# seastar::app_template::run(int, char**, std::function<seastar::future<int> ()>&&) at /ceph/src/seastar/src/core/app-template.cc:167
25# main at /usr/include/c++/11/bits/std_function.h:334
26# 0x00007F5E83632EB0 in /lib64/libc.so.6
27# __libc_start_main in /lib64/libc.so.6
28# _start in /ceph/build/bin/crimson-osd
Content of /proc/self/maps:
I will look for a previous build (possibly before the commit of the new flag) since I don't remember to have hit an issue of lack of memory so quickly, the caveat is that I didn't use the no-restart flag before, so it could have been hiding this issue.
MB Updated by Matan Breizman over 2 years ago
Jose J Palacios Perez wrote in #note-43:
INFO 2024-07-02 11:11:02,187 seastar - Reactor backend: linux-aio terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
It looks like the OSD never came up, this is part of the seastar start. Have you seen the OSD up?
JP Updated by Jose J Palacios Perez over 2 years ago
@Matan Breizman: pretty sure I did see the OSD up, for example, part of cephlogoff.sh is this:
#!/usr/bin/bash
bin/ceph tell osd.0 config set debug_bluestore 0/0
bin/ceph tell osd.0 config set debug_rocksdb 0/0
bin/ceph tell osd.0 config set debug_osd 0/0
bin/ceph tell osd.0 config set debug_monc 0/0
bin/ceph tell osd.0 config set debug_mgrc 0/0
bin/ceph tell osd.0 config set debug_ms 0/0
bin/ceph tell osd.0 config set debug_objecter 0/0
bin/ceph tell mon.a config set debug_mon 0/0
bin/ceph tell mon.a config set debug_ms 0/0
bin/ceph tell mon.a config set debug_paxos 0/0
bin/ceph tell mon.a config set debug_mgrc 0/0
bin/ceph tell mon.a config set debug_auth 0/0
bin/ceph tell mgr.x config set debug_mgr 0/0
bin/ceph tell mgr.x config set debug_monc 0/0
bin/ceph tell mgr.x config set debug_ms 0/0
bin/ceph tell mgr.x config set debug_mon 0/0
which produced this output:
{
"success": ""
}
{
"success": ""
}
{
"success": ""
}
{
"success": ""
}
{
"success": ""
}
to double check I ran this:
[11:18:16]$ # bin/ceph daemon -c /ceph/build/ceph.conf osd.0 dump_metrics
{
"metrics": [
{
"alien_receive_batch_queue_length": {
"shard": "0",
"value": 1
}
},
{
"alien_total_received_messages": {
"shard": "0",
"value": 1040
}
},
{
"alien_total_sent_messages": {
"shard": "0",
"value": 1040
}
},
{
"io_queue_adjusted_consumption": {
"class": "default",
"iogroup": "0",
"mountpoint": "none",
"shard": "0",
"stream": "rw",
"value": 5.6028366088867188e-06
}
},
similarly the cluster status:
397031 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f
397033 pts/0 Sl 0:02 /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f
397246 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f
397250 pts/0 Sl 0:04 /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f
398308 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f
398309 pts/0 Sl 0:06 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f
399235 pts/0 R+ 0:00 ps ax
@2bac8f8d9dd1:/ceph/build
[11:36:58]$ # ceph status
cluster:
id: f3e89c3b-1437-4403-9c9d-e96bc11ae3ac
health: HEALTH_WARN
2 pool(s) have no replicas configured
services:
mon: 1 daemons, quorum a (age 27m)
mgr: x(active, since 27m)
osd: 1 osds: 1 up (since 27m), 1 in (since 27m)
data:
pools: 2 pools, 33 pgs
objects: 7 objects, 449 KiB
usage: 27 MiB used, 224 GiB / 224 GiB avail
pgs: 33 active+clear
JP Updated by Jose J Palacios Perez over 2 years ago
Yes, I was running a build with the regression, once pulled to the latest and rebuild I get much better memory utilisation overall, here are some quick samples from 1 OSD 1 reactor basic configuration:
- build hash: 4476126cd92
root@sv1-ceph3 ~]# podman stats --no-reset hardcore_lumiere # prefill
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU %
2bac8f8d9dd1 hardcore_lumiere 21.92% 916.6MB / 134.5GB 0.68% 4.592GB / 1.856GB 2.772TB / 3.688TB 183 106h23m52.869197s 21.92%
2bac8f8d9dd1 hardcore_lumiere 148.89% 938.5MB / 134.5GB 0.70% 4.592GB / 1.856GB 2.772TB / 3.689TB 183 106h24m0.315237s 21.92%
2bac8f8d9dd1 hardcore_lumiere 149.69% 958.2MB / 134.5GB 0.71% 4.592GB / 1.856GB 2.772TB / 3.69TB 183 106h24m7.801641s 21.92%
:
2bac8f8d9dd1 hardcore_lumiere 21.94% 1.648GB / 134.5GB 1.22% 4.592GB / 1.856GB 2.772TB / 3.725TB 183 106h32m31.689878s 21.94%
2bac8f8d9dd1 hardcore_lumiere 150.60% 1.331GB / 134.5GB 0.99% 4.592GB / 1.856GB 2.772TB / 3.732TB 183 106h34m21.391728s 21.95%
[root@sv1-ceph3 ~]# podman stats --no-reset hardcore_lumiere # start randread
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU %
2bac8f8d9dd1 hardcore_lumiere 21.95% 3.094GB / 134.5GB 2.30% 4.592GB / 1.856GB 2.776TB / 3.735TB 410 106h36m27.274753s 21.95%
2bac8f8d9dd1 hardcore_lumiere 244.36% 3.223GB / 134.5GB 2.40% 4.592GB / 1.856GB 2.777TB / 3.735TB 410 106h36m39.497504s 21.95%
:
2bac8f8d9dd1 hardcore_lumiere 242.12% 3.586GB / 134.5GB 2.67% 4.592GB / 1.856GB 2.778TB / 3.735TB 410 106h37m15.857183s 21.96%
:
root@sv1-ceph3 ~]# podman stats --no-reset hardcore_lumiere # randwrite
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU %
2bac8f8d9dd1 hardcore_lumiere 22.01% 4.147GB / 134.5GB 3.08% 4.592GB / 1.856GB 2.801TB / 3.741TB 218 106h55m47.393281s 22.01%
2bac8f8d9dd1 hardcore_lumiere 205.80% 4.208GB / 134.5GB 3.13% 4.592GB / 1.856GB 2.801TB / 3.742TB 218 106h55m57.687477s 22.01%
2bac8f8d9dd1 hardcore_lumiere 205.40% 4.27GB / 134.5GB 3.17% 4.592GB / 1.856GB 2.801TB / 3.742TB 218 106h56m7.960044s 22.01%
:
2bac8f8d9dd1 hardcore_lumiere 207.05% 3.903GB / 134.5GB 2.90% 4.592GB / 1.856GB 2.801TB / 3.744TB 218 106h57m11.584231s 22.02%
# note the mem util has gone down, so effectively seems no longer a mem leak
root@sv1-ceph3 ~]# podman stats --no-reset hardcore_lumiere # end all workloads
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU %
2bac8f8d9dd1 hardcore_lumiere 22.03% 1.918GB / 134.5GB 1.43% 4.592GB / 1.856GB 2.861TB / 3.844TB 148 107h24m35.866054s 22.03%
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU %
2bac8f8d9dd1 hardcore_lumiere 0.62% 1.918GB / 134.5GB 1.43% 4.592GB / 1.856GB 2.861TB / 3.844TB 148 107h24m35.896993s 22.03%
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU %
2bac8f8d9dd1 hardcore_lumiere 0.63% 1.918GB / 134.5GB 1.43% 4.592GB / 1.856GB 2.861TB / 3.844TB 148 107h24m35.928543s 22.03%
crimson_1osd_1reactor_1procs_randread¶
| IOPs | Lat(ms) | FIO_usr% | FIO_sys% | OSD_usr% | OSD_sys% |
|---|---|---|---|---|---|
| 26578.92 | 9.63 | 0.64 | 0.50 | 2.67 | 5.15 |
crimson_1osd_1reactor_1procs_randwrite¶
| IOPs | Lat(ms) | FIO_usr% | FIO_sys% | OSD_usr% | OSD_sys% |
|---|---|---|---|---|---|
| 5504.81 | 11.62 | 0.61 | 0.43 | 4.87 | 1.87 |
I'll continue with the set 3 OSD, and ranging the number of reactors [ 1,2,4,8 ] for the basic configuration, hopefully will have results later this week.
JP Updated by Jose J Palacios Perez over 2 years ago
Sadly, a different problem is lurking around: I hit a SIGSEGV during execution of 4k randwrite, for 3 OSD and 2 reactors:
- cluster creation and setup:
[09:13:01]$ # MDS=0 MON=1 OSD=3 MGR=1 ../src/vstart.sh --new -x --localhost --without-dashboard --bluestore --redirect-output --bluestore-devs /dev/sdd,/dev/sde,/dev/sdf --crimson --crimson-smp 2 --crimson_seastar_num_threads 2 --no-restart # Crimson 3osd 2 reactor [09:14:38]$ # ps ax PID TTY STAT TIME COMMAND 1 ? Ss 0:00 sshd: /sbin/sshd -D [listener] 0 of 10-100 startups 6 ? Ss 0:00 sshd: root [priv] 8 ? R 0:12 sshd: root@pts/0 9 pts/0 Ss 0:01 -bash 78499 ? Ss 0:00 sshd: root [priv] 78501 ? S 0:06 sshd: root@pts/1 78502 pts/1 Ss+ 0:00 -bash 474267 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f 474269 pts/0 Sl 0:00 /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f 474482 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f 474486 pts/0 Sl 0:03 /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f 475547 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f 475548 pts/0 Sl 0:01 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f 476765 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/crimson-osd -i 1 -c /ceph/build/ceph.conf -f 476766 pts/0 Sl 0:01 /ceph/build/bin/crimson-osd -i 1 -c /ceph/build/ceph.conf -f 477982 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/crimson-osd -i 2 -c /ceph/build/ceph.conf -f 477983 pts/0 Sl 0:01 /ceph/build/bin/crimson-osd -i 2 -c /ceph/build/ceph.conf -f [09:16:07]$ # ceph status cluster: id: 0a3db174-b668-4bf4-be93-f3de8fdfd0c6 health: HEALTH_OK services: mon: 1 daemons, quorum a (age 2m) mgr: x(active, since 2m) osd: 3 osds: 3 up (since 2m), 3 in (since 2m) data: pools: 1 pools, 1 pgs objects: 2 objects, 449 KiB usage: 81 MiB used, 671 GiB / 671 GiB avail pgs: 1 active+clean [09:17:11]$ # /root/bin/cephlogoff.sh pool 'rbd' created enabled application 'rbd' on pool 'rbd' NAME PROVISIONED USED fio_test_0 10 GiB 0 B [09:24:15]$ # ceph status cluster: id: 0a3db174-b668-4bf4-be93-f3de8fdfd0c6 health: HEALTH_OK services: mon: 1 daemons, quorum a (age 9m) mgr: x(active, since 9m) osd: 3 osds: 3 up (since 9m), 3 in (since 9m) data: pools: 2 pools, 33 pgs objects: 4 objects, 449 KiB usage: 81 MiB used, 671 GiB / 671 GiB avail pgs: 36.364% pgs not active 21 active+clean 12 creating+peering io: client: 217 B/s rd, 435 B/s wr, 5 op/s rd, 0 op/s wr
- Running the workloads, FIO complains of a 1 sec I/O latency during random write,
[09:25:01]$ # RBD_NAME=fio_test_0 RBD_SIZE="10G" fio /fio/examples/rbd_prefill.fio && rbd du fio_test_0 && cd /tmp; /root/bin/run_fio.sh -s -a -c "0-31" -p crimson_3osd_2reactor prefill: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=rbd, iodepth=4 ... fio-3.37-15-gc948 Starting 2 threads Jobs: 2 (f=2): [W(2)][92.2%][w=34.1MiB/s][w=546 IOPS][eta 00m:38s] prefill: (groupid=0, jobs=2): err= 0: pid=478988: Wed Jul 3 09:33:41 2024 : Disk stats (read/write): sdb: ios=0/5014, sectors=0/639333, merge=0/104, ticks=0/3159, in_queue=3247, util=0.43% NAME PROVISIONED USED fio_test_0 10 GiB 10 GiB /tmp /tmp == Wed Jul 3 09:33:41 UTC 2024 == (16,16): crimson_3osd_2reactor_16job_16io_4k_randread_p0 == : == Wed Jul 3 09:47:58 UTC 2024 == (16,4): crimson_3osd_2reactor_4job_16io_4k_randwrite_p0 == : admin_socket: exception: exception: no data returned from admin socket fio: latency of 41332293807 nsec exceeds specified max (1000000000 nsec): randwrite.1.0 write 4332601344 4096 fio: latency of 41367480124 nsec exceeds specified max (1000000000 nsec): randwrite.3.0 write 6038814720 4096 fio: latency of 41392220271 nsec exceeds specified max (1000000000 nsec): randwrite.0.0 write 9099120640 4096 fio: latency of 41379517842 nsec exceeds specified max (1000000000 nsec): randwrite.2.0 write 6736912384 4096 : admin_socket: exception getting command descriptions: [Errno 111] Connection refused admin_socket: exception: exception: no data returned from admin socket : - found osd.2.stdout is down: segfault
EBUG 2024-07-03 09:14:38,524 [shard 0:main] ms - ~SocketMessenger: temp_mon_client INFO 2024-07-03 09:14:38,524 [shard 0:main] osd - get_early_config: set --thread-affinity 1 --cpuset 4-5 DEBUG 2024-07-03 09:14:38,524 [shard 0:main] seastar - reactor::drain INFO 2024-07-03 09:14:38,855 seastar - Reactor backend: linux-aio Segmentation fault on shard 1. Backtrace: 0# crimson::admin::DumpMetricsHook::call(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::variant<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, double, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> > >, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::variant<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, double, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> > > > > > const&, std::basic_string_view<char, std::char_traits<char> >, ceph::buffer::v15_2_0::list&&) const::{lambda(auto:1&)#1}::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const::{lambda()#1}::operator()() const at /usr/include/c++/11/bits/basic_string.h:921 1# seastar::smp_message_queue::async_work_item<crimson::reactor_map_seq<crimson::admin::DumpMetricsHook::call(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::variant<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, double, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> > >, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::variant<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, double, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> > > > > > const&, std::basic_string_view<char, std::char_traits<char> >, ceph::buffer::v15_2_0::list&&) const::{lambda(auto:1&)#1}::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const::{lambda()#1}>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)::{lambda(auto:1)#1}::operator()<unsigned int>(unsigned int)::{lambda()#1}>::run_and_dispose() at /ceph/src/seastar/include/seastar/core/future.hh:1102 2# seastar::reactor::run_tasks(seastar::reactor::task_queue&) at /ceph/src/seastar/src/core/reactor.cc:2692 3# seastar::reactor::run_some_tasks() at /ceph/src/seastar/src/core/reactor.cc:3155 4# seastar::reactor::do_run() at /ceph/src/seastar/src/core/reactor.cc:3324 5# std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const at /usr/include/c++/11/bits/basic_string.h:195 6# seastar::posix_thread::start_routine(void*) at /ceph/src/seastar/src/core/posix.cc:92 7# 0x00007FB766A06912 in /lib64/libc.so.6 8# 0x00007FB7669A4450 in /lib64/libc.so.6 Dump of siginfo: si_signo: 11 si_errno: 0 - Since the test driving script is monitoring the OSD via
ceph daemon -c /ceph/build/ceph.conf ${oid} dump_metricsat the end of each workload, from the stacktrace, (DumpMetricsHook) it looks like we might try to workaround and disable the monitoring temporarily to see if we can progress. I'll search if this has been reported, otherwise will rise a ticket.
JP Updated by Jose J Palacios Perez over 2 years ago
- osd.1 has also died, by the looks of it same cause
DEBUG 2024-07-03 09:14:34,731 [shard 0:main] ms - 0x6000008bb000 client.?(temp_mon_client) 127.0.0.1:0/3082449916@61970 >> mon.0 v2:127.0.0.1:40001/0 closed! DEBUG 2024-07-03 09:14:34,731 [shard 0:main] ms - ~SocketMessenger: temp_mon_client INFO 2024-07-03 09:14:34,731 [shard 0:main] osd - get_early_config: set --thread-affinity 1 --cpuset 2-3 DEBUG 2024-07-03 09:14:34,731 [shard 0:main] seastar - reactor::drain INFO 2024-07-03 09:14:35,100 seastar - Reactor backend: linux-aio Segmentation fault on shard 1. Backtrace: Reactor stalled for 54 ms on shard 1. Backtrace: 0x2a0a98a 0x29c74d0 0x29c7a16 0x29c7bf7 0x54daf 0x11aa76 0x11a899 0x1a7a41d 0x1a7aca5 0x1a7b799 0x1a77c10 0x1a77cef 0x1a78a7a 0x54daf 0x1777a4c 0x1777b56 0x29c36ef 0x29c3a40 0x29fb4f5 0x29fc2b6 0x2b807dd 0xa1911 0x3f44f kernel callstack: 0xffffffffffffff80 0xffffffffa651c48c 0xffffffffa651c9e2 0xffffffffa652335d 0xffffffffa65236f7 0xffffffffa62f41b3 0xffffffffa62f4351 0xffffffffa62f5690 0xffffffffa62f6337 0xffffffffa62f67a0 0xffffffffa6d2515c 0xffffffffa6e0009b Reactor stalled for 1958 ms on shard 1. Backtrace: 0x2a0a98a 0x29c74d0 0x29c7a16 0x29c7bf7 0x54daf 0x11aa76 0x11a899 0x1a7a41d 0x1a7a63e 0x1a7aaf1 0x1a7b799 0x1a77c10 0x1a77cef 0x1a78a7a 0x54daf 0x1777a4c 0x1777b56 0x29c36ef 0x29c3a40 0x29fb4f5 0x29fc2b6 0x2b807dd 0xa1911 0x3f44f kernel callstack: 0xffffffffffffff80 0xffffffffa651c2ea 0xffffffffa651c9e2 0xffffffffa652335d 0xffffffffa65236f7 0xffffffffa62f41b3 0xffffffffa62f4351 0xffffffffa62f5690 0xffffffffa62f6337 0xffffffffa62f67a0 0xffffffffa6d2515c 0xffffffffa6e0009b Reactor stalled for 5306 ms on shard 1. Backtrace: 0x2a0a98a 0x29c74d0 0x29c7a16 0x29c7bf7 0x54daf 0x11aa76 0x11a899 0x1a7a41d 0x1a7aca5 0x1a7b799 0x1a77c10 0x1a77cef 0x1a78a7a 0x54daf 0x1777a4c 0x1777b56 0x29c36ef 0x29c3a40 0x29fb4f5 0x29fc2b6 0x2b807dd 0xa1911 0x3f44f kernel callstack: 0xffffffffffffff80 0xffffffffa67c1307 0xffffffffa6543cd6 0xffffffffa65476fe 0xffffffffa6548726 0xffffffffa627e045 0xffffffffa651b8a7 0xffffffffa651cb6a 0xffffffffa652335d 0xffffffffa65236f7 0xffffffffa62f41b3 0xffffffffa62f4351 0xffffffffa62f5690 0xffffffffa62f6337 0xffffffffa62f67a0 0xffffffffa6d2515c 0xffffffffa6e0009b Reactor stalled for 10887 ms on shard 1. Backtrace: 0x2a0a98a 0x29c74d0 0x29c7a16 0x29c7bf7 0x54daf 0x11aa76 0x11a899 0x1a7a41d 0x1a7a63e 0x1a7aaf1 0x1a7b799 0x1a77c10 0x1a77cef 0x1a78a7a 0x54daf 0x1777a4c 0x1777b56 0x29c36ef 0x29c3a40 0x29fb4f5 0x29fc2b6 0x2b807dd 0xa1911 0x3f44f kernel callstack: 0xffffffffffffff80 0xffffffffa651c9ce 0xffffffffa652335d 0xffffffffa65236f7 0xffffffffa62f41b3 0xffffffffa62f4351 0xffffffffa62f5690 0xffffffffa62f6337 0xffffffffa62f67a0 0xffffffffa6d2515c 0xffffffffa6e0009b 0# crimson::admin::DumpMetricsHook::call(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::variant<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, double, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> > >, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::variant<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, double, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> > > > > > const&, std::basic_string_view<char, std::char_traits<char> >, ceph::buffer::v15_2_0::list&&) const::{lambda(auto:1&)#1}::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const::{lambda()#1}::operator()() const at /ceph/src/crimson/admin/osd_admin.cc:243 1# seastar::smp_message_queue::async_work_item<crimson::reactor_map_seq<crimson::admin::DumpMetricsHook::call(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::variant<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, double, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> > >, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::variant<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, double, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> > > > > > const&, std::basic_string_view<char, std::char_traits<char> >, ceph::buffer::v15_2_0::list&&) const::{lambda(auto:1&)#1}::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const::{lambda()#1}>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)::{lambda(auto:1)#1}::operator()<unsigned int>(unsigned int)::{lambda()#1}>::run_and_dispose() at /ceph/src/seastar/include/seastar/core/future.hh:1102 2# seastar::reactor::run_tasks(seastar::reactor::task_queue&) at /ceph/src/seastar/src/core/reactor.cc:2692 3# seastar::reactor::run_some_tasks() at /ceph/src/seastar/src/core/reactor.cc:3155 4# seastar::reactor::do_run() at /ceph/src/seastar/src/core/reactor.cc:3324 5# std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const at /usr/include/c++/11/bits/basic_string.h:195 6# seastar::posix_thread::start_routine(void*) at /ceph/src/seastar/src/core/posix.cc:92 7# 0x00007FC368C43912 in /lib64/libc.so.6 8# 0x00007FC368BE1450 in /lib64/libc.so.6 Dump of siginfo: si_signo: 11 si_errno: 0 si_code: 1 si_pid: 80 : /ceph/src/ceph-run: line 27: 476766 Segmentation fault (core dumped) "$@"
interestingly, the process was still running when we noticed the first failure, so the backtraces need a precise timestamp[09:56:42]$ # pgrep osd 475548 476766 [09:56:59]$ # for x in osd.?.pid; do echo $x; cat $x; done osd.0.pid 475548 osd.1.pid 476766 osd.2.pid 477983 474267 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f 474269 pts/0 Sl 0:07 /ceph/build/bin/ceph-mon -i a -c /ceph/build/ceph.conf -f 474482 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f 474486 pts/0 Sl 0:06 /ceph/build/bin/ceph-mgr -i x -c /ceph/build/ceph.conf -f 475547 pts/0 S 0:00 /bin/sh /ceph/src/ceph-run --no-restart /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f 475548 pts/0 Sl 19:37 /ceph/build/bin/crimson-osd -i 0 -c /ceph/build/ceph.conf -f 479010 pts/0 S+ 0:00 /usr/bin/bash /root/bin/run_fio.sh -s -a -c 0-31 -p crimson_3osd_2reactor 479703 pts/0 Sl+ 0:07 fio /fio/examples/rbd_seqread.fio --output=fio_crimson_3osd_2reactor_1job_16io_64k_seqread_p0.json --output-format=json
I run a quick search, this might be genuine, I'll try without the ceph daemon monitoring to see if this makes a difference.
JP Updated by Jose J Palacios Perez over 2 years ago
- osd.0.stdout: that is still alive has got the same last timestamp as the ones that died, so we must figure out a way to add a timestamp at the time of the failure:
INFO 2024-07-03 09:14:30,890 [shard 0:main] osd - get_early_config: set --thread-affinity 1 --cpuset 0-1 DEBUG 2024-07-03 09:14:30,890 [shard 0:main] seastar - reactor::drain INFO 2024-07-03 09:14:31,264 seastar - Reactor backend: linux-aio
JP Updated by Jose J Palacios Perez over 2 years ago
The test run completed without issues when monitoring the OSD dump_metrics is disabled, so I'll raise a separate ticket:
[11:19:04]$ # /root/bin/run_fio.sh -s -a -c "0-31" -p 01_crimson_3osd_2reactor -k # skip osd dump_metrics
:
483946 482729 481511
Wed Jul 3 12:04:30 UTC 2024== Done ==
crimson_3osd_2reactor_1procs_randread¶
| IOPs | Lat(ms) | FIO_usr% | FIO_sys% | OSD_usr% | OSD_sys% |
|---|---|---|---|---|---|
| 29828.19 | 8.50 | 0.57 | 0.40 | 15.95 | 4.03 |
crimson_3osd_2reactor_1procs_randwrite¶
| IOPs | Lat(ms) | FIO_usr% | FIO_sys% | OSD_usr% | OSD_sys% |
|---|---|---|---|---|---|
| 3769.24 | 16.97 | 0.52 | 0.34 | 4.24 | 14.78 |
JP Updated by Jose J Palacios Perez over 2 years ago
Results for the Basic configuration¶
- 3 OSD results for basic configuration -- note OSD usr% and sys% refer to the avg CPU utilisation measured within the container via top
Random read 4k¶
| Num reactors | IOPs | Lat(ms) | OSD_usr% | OSD_sys% |
|---|---|---|---|---|
| 1 | 29781.45 | 8.55 | 9.11 | 3.62 |
| 2 | 29828.19 | 8.50 | 15.95 | 4.03 |
| 4 | 34788.82 | 7.36 | 28.66 | 4.92 |
| 8 | 14476.71 | 17.69 | 30.13 | 3.90 |
Random write 4k¶
| Num reactors | IOPs | Lat(ms) | OSD_usr% | OSD_sys% |
|---|---|---|---|---|
| 1 | 3339.54 | 19.16 | 9.34 | 3.59 |
| 2 | 3769.24 | 16.97 | 14.78 | 4.24 |
| 4 | 3009.83 | 19.21 | 22.59 | 4.87 |
| 8 | 4633.02 | 10.41 | 33.97 | 6.35 |
JP Updated by Jose J Palacios Perez over 2 years ago
- Assignee set to Jose J Palacios Perez
will continue with Manual configuration next
JP Updated by Jose J Palacios Perez over 2 years ago
Results for the Manual configuration¶
- 3 OSD results for manual configuration (since the machine has got only 3 SSD) -- note OSD usr% and sys% refer to the avg CPU utilisation measured within the container via top
Random read 4k¶
| Num reactors | IOPs | Lat(ms) | OSD_usr% | OSD_sys% |
|---|---|---|---|---|
| 1 | 30265.22 | 8.42 | 9.19 | 3.68 |
| 2 | 30474.68 | 8.32 | 16.22 | 4.11 |
| 4 | 34339.20 | 7.45 | 27.75 | 4.85 |
| 8 | 14490.98 | 17.67 | 30.09 | 3.88 |
Random write 4k¶
| Num reactors | IOPs | Lat(ms) | OSD_usr% | OSD_sys% |
|---|---|---|---|---|
| 1 | 3299.86 | 19.40 | 9.74 | 3.64 |
| 2 | 3435.18 | 18.62 | 14.39 | 4.16 |
| 4 | 3589.53 | 17.82 | 24.27 | 5.15 |
| 8 | 2748.38 | 17.53 | 28.11 | 4.95 |
JP Updated by Jose J Palacios Perez over 2 years ago
- File random_read_4k_basic_vs_manual.png random_read_4k_basic_vs_manual.png added
- File random_write_4k_basic_vs_manual.png random_write_4k_basic_vs_manual.png added
- File random_read_4k_alien.png random_read_4k_alien.png added
- File random_write_4k_alien.png random_write_4k_alien.png added
Update:¶
- progressing on the configurations involving the seastar/alienstore core ratio
- quick summary below: Note: the Pc diff column indicates pairwise the value of the second column wrt to the first column (hence the red warning for the entries that do not have a first column value, hence div by zero)
Basic vs Manual:¶


Seastar vs alien store cores:¶


JP Updated by Jose J Palacios Perez over 2 years ago
Here are the CPU utilisation from the FIO client (as reported by FIO itself), that's why I consider that using a single core for FIO would be enough.

JP Updated by Jose J Palacios Perez over 2 years ago
I wonder if part of the reason I am not getting a performance improvement when increasing the number of OSD is due to the cluster creation with vstart is using the same argument for the number of SSD:
--bluestore --redirect-output --bluestore-devs /dev/sdd,/dev/sde,/dev/sdf
Since I only change a single parameter at a time, this stick from a single to multiple OSD configurations.
I'll try single OSD with a single SSD and compare, as I said in the call I was surprised I didn't get a performance improvement when multiple OSD.
YC Updated by Yingxin Cheng over 2 years ago
Thanks for the efforts, Jose! Yeah, starting with 1 OSD is simper.
JP Updated by Jose J Palacios Perez over 2 years ago
- File comp_FIO_1_4_8_cpu.png comp_FIO_1_4_8_cpu.png added
Here are the comparison for using 1, 4 and 8 cpu cores for the client FIO,
these are the arg to taskset as shown in the snippet below- 8 cores: "8-15"
- 4 cores: ['fio']="12-15"
- 1 core: ['fio']="15-15"
All runs with a single OSD, single (default) reactor and single SSD.
BLUESTORE_DEVS='/dev/sdf'
MDS=0 MON=1 OSD=1 MGR=1 ../src/vstart.sh --new -x --localhost --without-dashboard --bluestore --redirect-output --bluestore-devs ${BLUESTORE_DEVS} --crimson --no-restart # fixed SSD
RBD_NAME=fio_test_0 RBD_SIZE="10G" fio /fio/examples/rbd_prefill.fio && rbd du fio_test_0 && /root/bin/run_fio.sh -s -a -c "0-31" -f "${test_row["fio"]}" -p ${test_row["test"]} -k # w/o osd dump_metrics
- clat_ns is actually the FIO completion latency transformed in milliseconds, usr_cpu and sys_cpu are those reported by FIO, the OSD cpu utilisations are being measured from the top command. Random workloads are always 4K block sizew, sequential workloads are 64K block size.
These results suggest that there is no significant difference between using 4 or 1 cpu core for FIO.

I'll run an unrestricted test (that is, "0-31") for FIO, for completeness.
JP Updated by Jose J Palacios Perez over 2 years ago
- File FIO_unrestricted.png FIO_unrestricted.png added
Here are the results for FIO using any cpu core (0-31):

For some reason, it does not show an improvement over the restricted sets above (~10% degradation on random read 4k). Will continue investigating if this is limiting performance.
JP Updated by Jose J Palacios Perez over 2 years ago
Apologies, I spotted a typo in the test driving script: its ignoring the option for the FIO cores, so I need to re-run the batch of tests. Very sorry about that.
JP Updated by Jose J Palacios Perez over 2 years ago
- File crimson_1osd_fio_range_random.png crimson_1osd_fio_range_random.png added
- File crimson_1osd_fio_range_seq.png crimson_1osd_fio_range_seq.png added
- File crimson_1osd_fio_range_table1.png crimson_1osd_fio_range_table1.png added
- File crimson_1osd_fio_range_table2.png crimson_1osd_fio_range_table2.png added
Update¶
For a fixed Crimson 1 OSD (1 reactor), and only varying the number of CPU cores assigned to the FIO client:


here are further details:


This means that with the current machine I might not be able to reach the number of OSD and reactors required, but will be limited by up to 8 cores for OSD.
JP Updated by Jose J Palacios Perez over 2 years ago
- File crimson_1osd_alienrange_random.png crimson_1osd_alienrange_random.png added
- File crimson_1osd_alienrange_seq.png crimson_1osd_alienrange_seq.png added
- File crimson_1osd_alien_table3.png crimson_1osd_alien_table3.png added
- File crimson_1osd_alien_table4.png crimson_1osd_alien_table4.png added
Update:¶
for a fixed Crimson 1 OSD (1 reactor), and single FIO client (running on 8 CPU cores), ranging only the number of cores allocated to Alien threads (but not modifying the number of Alien threads):


Here are the details:


As per the scenarios varying the number of CPU cores for the FIO client, the sequential workloads seem to be having a decent performance from a single FIO core.
JP Updated by Jose J Palacios Perez over 2 years ago
The current plan is for the manual scenarios of the seastar/alien cores ratios are:
- 4 : 28 (0-3,4-31)
- 8 : 24 (0-7,8-31)
- 12 : 20 (0-11, 12-31)
- 16 : 16 (0-15,16-31) = alien all HT siblings
From the comparison above, using 8 cores for FIO seem to be sufficient for the random workloads, which unfortunately will limit the the scenarios 12 and 16.
@Matan Breizman , @Yingxin Cheng : would you be happy if I focus on the scenarios 4 and 8 whilst I found a better machine (with more CPU cores?) Thanks in advance.
JP Updated by Jose J Palacios Perez over 2 years ago
Seeing these more frequently (even on a single run) I wonder if the SSDs are giving up

JP Updated by Jose J Palacios Perez over 2 years ago
- File crimson_1osd_multi_random.png crimson_1osd_multi_random.png added
- File crimson_1osd_multi_8fiocores_random.png crimson_1osd_multi_8fiocores_random.png added
- File crimson_1osd_multi_fio_unr_random.png crimson_1osd_multi_fio_unr_random.png added
- File crimson_1osd_multi_8fiocores_seq.png crimson_1osd_multi_8fiocores_seq.png added
- File crimson_1osd_multi_fio_unr_seq.png crimson_1osd_multi_fio_unr_seq.png added
- File crimson_1osd_multi_seq.png crimson_1osd_multi_seq.png added
Update: on multiple FIO processes concurrently¶
In this update, we compare the performance (highest throughput for fixed queue depth) on single FIO process against multiple FIO processes, each exercising its own RBD image. We raqn two sets of tests for this: with FIO limited to 8 CPU cores (as shown before, this was the configuration that produced best figures) against FIO running on unrestricted CPU cores.
Random workloads¶


- Notice the latencies and queue depth distribution, esp. for random write.

Sequential workloads¶
|
|
![]() |
JP Updated by Jose J Palacios Perez over 2 years ago
For example, the following is the set of threads for 2 FIO jobs, single process instance:
[12:19:35]$ # RBD_NAME=fio_test_0 RBD_SIZE="10G" fio /fio/examples/rbd_prefill.fio
prefill: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=rbd, iodepth=4
...
fio-3.37-15-gc948
Starting 2 threads
Jobs: 2 (f=2): [W(2)][28.4%][w=71.9MiB/s][w=1150 IOPS][eta 05m:23s]
# ps -L -o ppid,pid,psr,comm -p $(pgrep fio)
PPID PID PSR COMMAND
5 69731 2 fio
5 69731 2 fio
5 69731 26 log
5 69731 11 msgr-worker-0
5 69731 11 msgr-worker-1
5 69731 10 msgr-worker-2
5 69731 22 service
5 69731 15 io_context_pool
5 69731 24 io_context_pool
5 69731 21 admin_socket
5 69731 22 ceph_timer
5 69731 4 ms_dispatch
5 69731 10 ms_local
5 69731 2 safe_timer
5 69731 12 safe_timer
5 69731 12 safe_timer
5 69731 0 safe_timer
5 69731 31 taskfin_librbd
5 69731 1 log
5 69731 30 msgr-worker-0
5 69731 11 msgr-worker-1
5 69731 22 msgr-worker-2
5 69731 21 service
5 69731 28 io_context_pool
5 69731 29 io_context_pool
5 69731 5 ceph_timer
5 69731 22 ms_dispatch
5 69731 8 ms_local
5 69731 4 safe_timer
5 69731 9 safe_timer
5 69731 27 safe_timer
5 69731 6 safe_timer
5 69731 3 taskfin_librbd
5 69731 28 fio
5 69731 31 fio
JP Updated by Jose J Palacios Perez over 2 years ago
- File crimson_1osd_8fio_rc_1procs_randread_iops_vs_lat_vs_cpu_sys.png crimson_1osd_8fio_rc_1procs_randread_iops_vs_lat_vs_cpu_sys.png added
- File crimson_1osd_8fio_rc_1procs_randread_iops_vs_lat_vs_cpu_usr.png crimson_1osd_8fio_rc_1procs_randread_iops_vs_lat_vs_cpu_usr.png added
- File crimson_1osd_8fio_rc_1procs_randwrite_iops_vs_lat_vs_cpu_sys.png crimson_1osd_8fio_rc_1procs_randwrite_iops_vs_lat_vs_cpu_sys.png added
- File crimson_1osd_8fio_rc_1procs_randwrite_iops_vs_lat_vs_cpu_usr.png crimson_1osd_8fio_rc_1procs_randwrite_iops_vs_lat_vs_cpu_usr.png added
- File crimson_1osd_8fio_rc_1procs_seqread_iops_vs_lat_vs_cpu_sys.png crimson_1osd_8fio_rc_1procs_seqread_iops_vs_lat_vs_cpu_sys.png added
- File crimson_1osd_8fio_rc_1procs_seqread_iops_vs_lat_vs_cpu_usr.png crimson_1osd_8fio_rc_1procs_seqread_iops_vs_lat_vs_cpu_usr.png added
- File crimson_1osd_8fio_rc_1procs_seqwrite_iops_vs_lat_vs_cpu_sys.png crimson_1osd_8fio_rc_1procs_seqwrite_iops_vs_lat_vs_cpu_sys.png added
- File crimson_1osd_8fio_rc_1procs_seqwrite_iops_vs_lat_vs_cpu_usr.png crimson_1osd_8fio_rc_1procs_seqwrite_iops_vs_lat_vs_cpu_usr.png added
Classic vs Crimson - response latencies¶
The following are the comparison for response latency charts over the same range of iodepth: 1 2 4 8 16 24 32 40 52 64.
On both cases, a single OSD (single SSD backend) and single RBD image was used, as well as a single FIO client (running on 8 CPU cores).
Since Classic OSD uses all the available CPU cores, the arithmetic average was used over 0-31 CPU8 cores, so the post-process might need to be refined on each case to be more accurate.
For Crimson, a single reactor was used, and no restrictions imposed on the alien threads.
4k Random read¶
| System | User |
|---|---|
|
|
4k Random write¶
| System | User |
|---|---|
|
|
64k Sequential Read¶
| System | User |
|---|---|
|
|
64k Sequential Write¶
It seems that something wrong happened during these set of tests, perhaps they need a much gentler range of iodepth to get significant measurements.
| System | User |
|---|---|
|
|
JP Updated by Jose J Palacios Perez over 2 years ago
- File combined_stdev.png combined_stdev.png added
Combined mean and std dev¶
The intention is to have a more precise accounting of the (completion) latency reported in the tests: we want to pick data points where the clat std dev is small (as seen on the left hand side in the char below).
Rather than simply report an average of the measurements, the intention is to calculate the combined std dev for two groups, and use that accordingly.
- The analytical expressions are shown in the left column.
- On the centre column, we show an example of a multi-FIO instance run, and compare it with a single FIO instance at the bottom. Notice how the std dev for the completion latency are too high, so there is a lot of variance from the mean, which implies that the actual latencies for up to 68% of the samples are in the interval [10.62 + 7.45, 7.45 - 10.62], rather than 10ms.
- On the right hand side, we show a chart that progresses over the iodepth, and the left hand side has std dev for completion latency very narrow, which is more precise than the samples whose std dev is too high.

JP Updated by Jose J Palacios Perez about 2 years ago
Update:
- I got ETA for fresh install of the o05 box from Adam as today \o/ that would allow several venues: install a recent ceph, build from source (as local user), etc.
- I have some ideas to make the container work with sudo: playing with the permissions at the moment. I still have a valid 60GB build that hopefully should work. Specially, since cephadm is built as well, I might be able to use it outside the container to run images created from the ceph-container github: (https://github.com/ceph/ceph-container) -- need to know how to present RBD images for FIO to exercise first -- probably outside the container?
- I have managed to start priming the drives: the recommendation I got was to fill 50-80% of the drive (seq write 64K), then a precondition normalisation of exercise random 64K write to the same amount to simulate a customer situation.
The following is running outside the container (baremetal) on a single drive:
@o05:~
[10:23:17]$ # sudo fio ./seqwrite64k.fio
prefill: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=libaio, iodepth=256
...
fio-3.19
Starting 8 processes
Jobs: 8 (f=8): [W(8)][33.4%][w=1599MiB/s][w=25.6k IOPS][eta 02h:06m:45s]
(started at around 3 GB/s, now its dropping)
JP Updated by Jose J Palacios Perez about 2 years ago
Modifyined the .fio job file to prefill in parallel (looks much better):
# sudo fio ./seqwrite64k.fio
nvme1n1p2: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=libaio, iodepth=256
nvme3n1p2: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=libaio, iodepth=256
nvme4n1p2: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=libaio, iodepth=256
nvme2n1p2: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=libaio, iodepth=256
nvme6n1p2: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=libaio, iodepth=256
nvme7n1p2: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=libaio, iodepth=256
nvme8n1p2: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=libaio, iodepth=256
nvme9n1p2: (g=0): rw=write, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=libaio, iodepth=256
fio-3.19
Starting 8 processes
Jobs: 8 (f=8): [W(8)][1.3%][w=23.0GiB/s][w=377k IOPS][eta 33m:33s]
JP Updated by Jose J Palacios Perez about 2 years ago
For reference to compare when running FIO on RBD images: the following are the (completion) latencies and IOPs when conditioning 8 nvme drives (direct block IO libaio -- baremetal):
write: IOPS=398k, BW=24.3GiB/s (26.1GB/s)(15.7TiB/663350msec); 0 zone resets
slat (nsec): min=1987, max=1905.6k, avg=6798.85, stdev=3416.34
clat (usec): min=72, max=16746, avg=5136.99, stdev=2890.22
bw ( MiB/s): min=24310, max=24976, per=100.00%, avg=24915.20, stdev= 8.03, samples=10552
iops : min=388969, max=399622, avg=398639.35, stdev=128.47, samples=10552
That is, 5ms latency and cummlative throughput 398k IOPs (64k block size).
Will start exploratory FIO tests using latency_target of 10ms over a sustained 5 min time window.
JP Updated by Jose J Palacios Perez about 2 years ago
- File crimson_1osd_1reactor_8fio_lt_rr.png crimson_1osd_1reactor_8fio_lt_rr.png added
- File crimson_1osd_8fio_rc_1procs_randread_iops_vs_lat_vs_cpu_sys.png crimson_1osd_8fio_rc_1procs_randread_iops_vs_lat_vs_cpu_sys.png added
- File crimson_1osd_8fio_rc_1procs_randread_iops_vs_lat_vs_cpu_usr.png crimson_1osd_8fio_rc_1procs_randread_iops_vs_lat_vs_cpu_usr.png added
Managed to run a sequence of tests over the weekend \o/
Latency target¶
First, since its the first time I use NVME drives, run some exploratory tests using the 'latency_target' FIO flag: fio will attempt to find the max performance point that the given workload will run at while maintaining a latency below this target.
The following is a summary for the 4k random read (Crimson 1 OSD, single reactor, FIO running on 8 cores):

We can see that FIO produces an optimal iodepth of 4, and the distribution of the alternatives (1 and 2 resp.).
I run tests for a single OSD, and ranging over the number of reactors from 1 to 8. Overall iodepth of 4 seemed the recommended by FIO.
Response latency curves¶
I ran a test plan consisting of producing response latency curves for the following:- starting from a single OSD, and ranging to 2,3,5 and 8,
- for each configuration, range the number of reactors: 1,2,5 and 8.
For example, this is the response curve for a single OSD, single reactor, FIO running on 8 cores

We can see that only the first five data points (which correspond to increasing the num of threads: 1 2 4 8 16 -- after this, the data points for 24 32 40 52 64 produce a high std dev, so they are rejected).
JP Updated by Jose J Palacios Perez about 2 years ago
- File OSD_crimson_1osd_1reactor_7at_8fio_lt_16job_16io_4k_randread_p0_top_cpu.png OSD_crimson_1osd_1reactor_7at_8fio_lt_16job_16io_4k_randread_p0_top_cpu.png added
- File OSD_crimson_1osd_1reactor_7at_8fio_lt_16job_16io_4k_randread_p0_top_mem.png OSD_crimson_1osd_1reactor_7at_8fio_lt_16job_16io_4k_randread_p0_top_mem.png added
- File OSD_crimson_1osd_1reactor_14at_8fio_lt_16job_16io_4k_randread_p0_top_cpu.png OSD_crimson_1osd_1reactor_14at_8fio_lt_16job_16io_4k_randread_p0_top_cpu.png added
- File OSD_crimson_1osd_1reactor_14at_8fio_lt_16job_16io_4k_randread_p0_top_mem.png OSD_crimson_1osd_1reactor_14at_8fio_lt_16job_16io_4k_randread_p0_top_mem.png added
- File OSD_crimson_1osd_1reactor_21at_8fio_lt_16job_16io_4k_randread_p0_top_cpu.png OSD_crimson_1osd_1reactor_21at_8fio_lt_16job_16io_4k_randread_p0_top_cpu.png added
- File OSD_crimson_1osd_1reactor_21at_8fio_lt_16job_16io_4k_randread_p0_top_mem.png OSD_crimson_1osd_1reactor_21at_8fio_lt_16job_16io_4k_randread_p0_top_mem.png added
Latency target exploratory¶
- FIO latency_target option to get a quick performance results: FIO will attempt to find the max performance point that the given workload will run at while maintaining a latency below this target.
- 1 OSD, 1 reactor, 8 CPU cores for FIO, latency target, 4k rand read.
- Range the number of alien threads from 7 (default) to 21, no restrictions on CPU core affinity at this point.
| nat | iops | total_ios | clat_ms | clat_stdev | FIO_usr_cpu | FIO_sys_cpu | OSD_us | OSD_sys |
| 7 | 28472.98 | 8542206.00 | 0.56 | 0.14 | 0.97 | 0.84 | 1.72 | 1.60 |
| 14 | 27983.50 | 8395245.00 | 0.57 | 0.14 | 0.99 | 0.86 | 2.09 | 1.76 |
| 21 | 27441.76 | 8232776.00 | 0.58 | 0.13 | 0.91 | 0.78 | 2.00 | 1.82 |
- OSD:
Alien_threads CPU Mem 7
14
21
- Preliminary conclusion: I was expecting that increasing the number of alien threads (blocking) would improve performance, but since the actual impact is negative, its either increasing contention between the alien threads.
- Further investigation is in progress when increasing the number of reactors, then the number of OSDs.
JP Updated by Jose J Palacios Perez about 2 years ago
- File crimson_1osd_1reactor_7at_8fio_rc_1procs_randread_iops_vs_lat_vs_cpu_osd.png crimson_1osd_1reactor_7at_8fio_rc_1procs_randread_iops_vs_lat_vs_cpu_osd.png added
- File crimson-1osd-nreactors-4krandread.png crimson-1osd-nreactors-4krandread.png added
- File crimson-nosd-4krandread.png crimson-nosd-4krandread.png added
Update:¶
Summary from the progress report posted on the Crimson slack channel:
- Performance figures summary (latency target):
Single OSD
| Comparison over range OSD |
|---|
|
- The following is an example of the new latency response charts to be generated and integrated into the report:

JP Updated by Jose J Palacios Perez almost 2 years ago
- File 8osd_5reactor_8fio_default_rc_1procs_randread_iops_vs_lat_fio_cpu.png 8osd_5reactor_8fio_default_rc_1procs_randread_iops_vs_lat_fio_cpu.png added
- File 8osd_5reactor_8fio_default_rc_1procs_randread_iops_vs_lat_osd_cpu.png 8osd_5reactor_8fio_default_rc_1procs_randread_iops_vs_lat_osd_cpu.png added
- File 8osd_5reactor_8fio_default_rc_1procs_randread_iops_vs_lat.png 8osd_5reactor_8fio_default_rc_1procs_randread_iops_vs_lat.png added
Comparison of the three object store backends:¶
All using the default CPU cores allocation for reactor threads
| Latency response |
|---|
|
| OSD CPU |
|---|
|
| FIO CPU |
|---|
|
JP Updated by Jose J Palacios Perez almost 2 years ago
- File 8osd_5reactor_8fio_default_rc_1procs_randread_iops_vs_lat.png 8osd_5reactor_8fio_default_rc_1procs_randread_iops_vs_lat.png added
- File 8osd_5reactor_8fio_default_rc_1procs_randwrite_iops_vs_lat.png 8osd_5reactor_8fio_default_rc_1procs_randwrite_iops_vs_lat.png added
- File 8osd_5reactor_8fio_default_rc_1procs_seqread_iops_vs_lat.png 8osd_5reactor_8fio_default_rc_1procs_seqread_iops_vs_lat.png added
- File 8osd_5reactor_8fio_default_rc_1procs_seqwrite_iops_vs_lat.png 8osd_5reactor_8fio_default_rc_1procs_seqwrite_iops_vs_lat.png added
Recent Seastore build, comparison against previous build¶
- Updated o05 container Ceph build f781c5 (Feb 10 2025) against b2a220 (Oct 2 2024):
Randread 4k Randwrite 4k
Seqread 64k Seqwrite 64k
- no significant regressions, except randwrite 4k, but still within 10%.
AD Updated by Anthony D'Atri 30 days ago
Jose, do you plan to turn these results into recommended values in doc/crimson/crimson.rst (crimson_cpu_num, crimson_cpu_set, crimson_bluestore_num_threads)? If the recommendations are tracked somewhere else now, can this issue be closed?
AD Updated by Anthony D'Atri 14 days ago
Jose, a gentle bump on my question from 11-04: do you plan to add recommended values from these results to doc/crimson/crimson.rst, or is that tracked somewhere else now, so this issue can be closed?
