From 5af32e054b3d90cb1a068f521a53e28a23d7f829 Mon Sep 17 00:00:00 2001 From: Adam King Date: Thu, 23 Jun 2022 15:46:22 -0400 Subject: [PATCH] doc/cephadm: os tuning profile documentation Signed-off-by: Adam King (cherry picked from commit 39cc904ca6a032490868cb6d87d2ecd8e5895430) (cherry picked from commit f7c31f361d7a76ce07cd389c55b75d61d96d2112) Resolves: rhbz#2068335 --- doc/cephadm/host-management.rst | 84 +++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/doc/cephadm/host-management.rst b/doc/cephadm/host-management.rst index f342558fafcb7..9b687d6039989 100644 --- a/doc/cephadm/host-management.rst +++ b/doc/cephadm/host-management.rst @@ -226,6 +226,90 @@ create a new CRUSH host located in the specified hierarchy. See also :ref:`crush_map_default_types`. +OS Tuning Profiles +================== + +Cephadm can manage operating system tuning profiles that apply a set of sysctl settings +to a given set of hosts. First create a YAML spec file in the following format + +.. code-block:: yaml + + profile_name: 23-mon-host-profile + placement: + hosts: + - mon-host-01 + - mon-host-02 + settings: + fs.file-max: 1000000 + vm.swappiness: '13' + +Then apply the tuning profile with:: + + ceph orch tuned-profile apply -i + +This profile will then be written to ``/etc/sysctl.d/`` on each host matching the +given placement and `sysctl --system` will be run on the host. + +.. note:: + + The exact filename the profile will be written to is within ``/etc/sysctl.d/`` is + ``-cephadm-tuned-profile.conf`` where + is the `profile_name` setting specified in the provided YAML spec. Since sysctl + settings are applied in lexicographical order by the filename the setting is + specified in, you may want to set the `profile_name` in your spec so + that it is applied before or after other conf files that may exist. + +.. note:: + + These settings are applied only at the host level, and are not specific + to any certain daemon or container + + +Viewing Profiles +---------------- + +To view all current profiles cephadm is managing:: + + ceph orch tuned-profile ls + +.. note:: + + If you'd like to make modifications and re-apply a profile passing `--format yaml` to the + ``tuned-profile ls`` command will present the profiles in a format where they can be copied + and re-applied. + + +Removing Profiles +----------------- + +If you no longer want one of the previously applied profiles, it can be removed with:: + + ceph orch tuned-profile rm + +When a profile is removed, cephadm will clean up the file previously written to /etc/sysctl.d + + +Modifying Profiles +------------------ + +While you can modify a profile by simply re-applying a YAML spec with the same profile name, +you may also want to adjust a setting within a given profile, so there are commands +for this purpose. + +To add or modify a setting for an existing profile:: + + ceph orch tuned-profile add-setting + +To remove a setting from an existing profile:: + + ceph orch tuned-profile rm-setting + +.. note:: + + Modifying the placement will require re-applying a profile with the same name. Keep + in mind that profiles are tracked by their name, so whenever a profile with the same + name as an existing profile is applied, it will overwrite the old profile. + SSH Configuration ================= -- 2.39.5