Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
src/daemon: enforce ceph-{disk,volume} ulimit
Browse files Browse the repository at this point in the history
The ceph-disk and ceph-volume commands perform badly in container when
using the default max open files ulimit value (1048576).
Setting this to 1024:4096 (soft:hard) solves the performance issue.
Note that it won't by applyied to the ceph-osd process because we
also enforce a specific value.

Signed-off-by: Dimitri Savineau <[email protected]>
(cherry picked from commit 64b9597)
  • Loading branch information
dsavineau committed Oct 30, 2019
1 parent 83508eb commit ae93497
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/daemon/osd_scenarios/osd_disk_activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ function osd_activate {
exit 1
fi

ulimit -Sn 1024
ulimit -Hn 4096

if [ -L "${OSD_DEVICE}" ]; then
OSD_DEVICE=$(readlink -f ${OSD_DEVICE})
fi
Expand Down
3 changes: 3 additions & 0 deletions src/daemon/osd_scenarios/osd_volume_activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ function osd_volume_lvm {
function osd_volume_activate {
: "${OSD_ID:?Give me an OSD ID to activate, eg: -e OSD_ID=0}"

ulimit -Sn 1024
ulimit -Hn 4096

CEPH_VOLUME_LIST_JSON="$(ceph-volume lvm list --format json)"

#shellcheck disable=SC2153
Expand Down

0 comments on commit ae93497

Please sign in to comment.