Skip to content

Commit b85d61d

Browse files
committed
vstart.sh: set alien cores with bluestore only
Signed-off-by: Matan Breizman <[email protected]>
1 parent 3a6ce3c commit b85d61d

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

src/vstart.sh

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,28 +1676,30 @@ if [ "$ceph_osd" == "crimson-osd" ]; then
16761676
if [ "$trace" -ne 0 ]; then
16771677
extra_seastar_args=" --trace"
16781678
fi
1679-
if [ "$(expr $(nproc) - 1)" -gt "$(($CEPH_NUM_OSD * crimson_smp))" ]; then
1680-
if [ $crimson_alien_num_cores -gt 0 ]; then
1681-
alien_bottom_cpu=$(($CEPH_NUM_OSD * crimson_smp))
1682-
alien_top_cpu=$(( alien_bottom_cpu + crimson_alien_num_cores - 1 ))
1683-
# Ensure top value within range:
1684-
if [ "$(($alien_top_cpu))" -gt "$(expr $(nproc) - 1)" ]; then
1685-
alien_top_cpu=$(expr $(nproc) - 1)
1679+
if [ "$objectstore" == "bluestore" ]; then
1680+
if [ "$(expr $(nproc) - 1)" -gt "$(($CEPH_NUM_OSD * crimson_smp))" ]; then
1681+
if [ $crimson_alien_num_cores -gt 0 ]; then
1682+
alien_bottom_cpu=$(($CEPH_NUM_OSD * crimson_smp))
1683+
alien_top_cpu=$(( alien_bottom_cpu + crimson_alien_num_cores - 1 ))
1684+
# Ensure top value within range:
1685+
if [ "$(($alien_top_cpu))" -gt "$(expr $(nproc) - 1)" ]; then
1686+
alien_top_cpu=$(expr $(nproc) - 1)
1687+
fi
1688+
echo "crimson_alien_thread_cpu_cores: $alien_bottom_cpu-$alien_top_cpu"
1689+
# This is a (logical) processor id range, it could be refined to encompass only physical processor ids
1690+
# (equivalently, ignore hyperthreading sibling processor ids)
1691+
$CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_thread_cpu_cores "$alien_bottom_cpu-$alien_top_cpu"
1692+
else
1693+
echo "crimson_alien_thread_cpu_cores:" $(($CEPH_NUM_OSD * crimson_smp))-"$(expr $(nproc) - 1)"
1694+
$CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_thread_cpu_cores $(($CEPH_NUM_OSD * crimson_smp))-"$(expr $(nproc) - 1)"
1695+
fi
1696+
if [ $crimson_alien_num_threads -gt 0 ]; then
1697+
echo "$CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_op_num_threads $crimson_alien_num_threads"
1698+
$CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_op_num_threads "$crimson_alien_num_threads"
16861699
fi
1687-
echo "crimson_alien_thread_cpu_cores: $alien_bottom_cpu-$alien_top_cpu"
1688-
# This is a (logical) processor id range, it could be refined to encompass only physical processor ids
1689-
# (equivalently, ignore hyperthreading sibling processor ids)
1690-
$CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_thread_cpu_cores "$alien_bottom_cpu-$alien_top_cpu"
16911700
else
1692-
echo "crimson_alien_thread_cpu_cores:" $(($CEPH_NUM_OSD * crimson_smp))-"$(expr $(nproc) - 1)"
1693-
$CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_thread_cpu_cores $(($CEPH_NUM_OSD * crimson_smp))-"$(expr $(nproc) - 1)"
1694-
fi
1695-
if [ $crimson_alien_num_threads -gt 0 ]; then
1696-
echo "$CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_op_num_threads $crimson_alien_num_threads"
1697-
$CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_op_num_threads "$crimson_alien_num_threads"
1701+
echo "No alien thread cpu core isolation"
16981702
fi
1699-
else
1700-
echo "No alien thread cpu core isolation"
17011703
fi
17021704
fi
17031705

0 commit comments

Comments
 (0)