@@ -16,8 +16,7 @@ Building Crimson
1616Crimson is not enabled by default. Enable it at build time by running::
1717
1818 $ WITH_SEASTAR=true ./install-deps.sh
19- $ mkdir build && cd build
20- $ cmake -DWITH_SEASTAR=ON ..
19+ $ ./do_cmake.sh -DWITH_SEASTAR=ON
2120
2221Please note, `ASan `_ is enabled by default if Crimson is built from a source
2322cloned using ``git ``.
@@ -28,7 +27,7 @@ Testing crimson with cephadm
2827===============================
2928
3029The Ceph CI/CD pipeline builds containers with
31- ``crimson-osd `` subsitituted for ``ceph-osd ``.
30+ ``crimson-osd `` substituted for ``ceph-osd ``.
3231
3332Once a branch at commit <sha1> has been built and is available in
3433``shaman ``, you can deploy it using the cephadm instructions outlined
@@ -44,27 +43,6 @@ use a Crimson build:
4443You'll likely need to supply the ``--allow-mismatched-release `` flag to
4544use a non-release branch.
4645
47- Additionally, prior to deploying OSDs, you'll need to
48- `Configure Crimson with Bluestore `_ and enable Crimson to
49- direct the default pools to be created as Crimson pools. From the cephadm shell run:
50-
51- .. prompt :: bash #
52-
53- ceph config set global 'enable_experimental_unrecoverable_data_corrupting_features' crimson
54- ceph osd set-allow-crimson --yes-i-really-mean-it
55- ceph config set mon osd_pool_default_crimson true
56-
57- The first command enables the ``crimson `` experimental feature. Crimson
58- is highly experimental, and malfunctions including crashes
59- and data loss are to be expected.
60-
61- The second enables the ``allow_crimson `` OSDMap flag. The monitor will
62- not allow ``crimson-osd `` to boot without that flag.
63-
64- The last causes pools to be created by default with the ``crimson `` flag.
65- Crimson pools are restricted to operations supported by Crimson.
66- ``Crimson-osd `` won't instantiate PGs from non-Crimson pools.
67-
6846Configure Crimson with Bluestore
6947================================
7048
@@ -76,7 +54,7 @@ one of the two following configuration options:
7654
7755 #. These two options, along with ``crimson_alien_op_num_threads ``,
7856 can't be changed after deployment.
79- #. `vstart.sh `_ sets this options using the ``--crimson-smp `` flag.
57+ #. `vstart.sh `_ sets these options using the ``--crimson-smp `` flag.
8058
8159
82601) ``crimson_seastar_num_threads ``
@@ -103,7 +81,7 @@ one of the two following configuration options:
10381
104822) ``crimson_seastar_cpu_cores `` and ``crimson_alien_thread_cpu_cores ``.
10583
106- Explictily set the CPU core allocation for each ``crimson-osd ``
84+ Explicitly set the CPU core allocation for each ``crimson-osd ``
10785 and for the BlueStore back end. It's recommended for each set to be mutually exclusive.
10886
10987 For example, for deploying two nodes with eight CPU cores and two OSDs each:
@@ -144,86 +122,38 @@ one of the two following configuration options:
144122 Running Crimson
145123===============
146124
147- As you might expect, Crimson does not yet have as extensive a feature set as does ``ceph-osd ``.
148-
149- object store backend
150- --------------------
151-
152- At the moment, ``crimson-osd `` offers both native and alienized object store
153- backends. The native object store backends perform IO using the SeaStar reactor.
154- They are:
155-
156- .. describe :: cyanstore
157-
158- CyanStore is modeled after memstore in the classic OSD.
159-
160- .. describe :: seastore
161-
162- Seastore is still under active development.
163-
164- The alienized object store backends are backed by a thread pool, which
165- is a proxy of the alienstore adaptor running in Seastar. The proxy issues
166- requests to object stores running in alien threads, i.e., worker threads not
167- managed by the Seastar framework. They are:
168-
169- .. describe :: memstore
170-
171- The memory backed object store
172-
173- .. describe :: bluestore
174-
175- The object store used by the classic ``ceph-osd ``
176-
177- daemonize
178- ---------
125+ .. note ::
126+ Crimson is in a tech preview stage.
127+ As you might expect, Crimson does not yet have as extensive a feature set as does ceph-osd.
128+ Malfunctions including crashes and data loss are to be expected.
179129
180- Unlike ``ceph-osd ``, ``crimson-osd `` does not daemonize itself even if the
181- ``daemonize `` option is enabled. In order to read this option, ``crimson-osd ``
182- needs to ready its config sharded service, but this sharded service lives
183- in the Seastar reactor. If we fork a child process and exit the parent after
184- starting the Seastar engine, that will leave us with a single thread which is
185- a replica of the thread that called `fork() `_. Tackling this problem in Crimson
186- would unnecessarily complicate the code.
130+ Enabling Crimson
131+ ================
187132
188- Since supported GNU/Linux distributions use ``systemd ``, which is able to
189- daemonize the application, there is no need to daemonize ourselves.
190- Those using sysvinit can use ``start-stop-daemon `` to daemonize ``crimson-osd ``.
191- If this is does not work out, a helper utility may be devised.
133+ After building Crimson and starting your cluster, but prior to deploying OSDs, you'll need to
134+ `Configure Crimson with Bluestore `_ and enable Crimson to
135+ direct the default pools to be created as Crimson pools. You can proceed by running the following after you have a running cluster:
192136
193- .. _fork() : http://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html
137+ .. note ::
138+ `vstart.sh `_ enables crimson automatically when `--crimson ` is used.
194139
195- logging
196- -------
140+ .. prompt :: bash #
197141
198- ``Crimson-osd `` currently uses the logging utility offered by Seastar. See
199- ``src/common/dout.h `` for the mapping between Ceph logging levels to
200- the severity levels in Seastar. For instance, messages sent to ``derr ``
201- will be issued using ``logger::error() ``, and the messages with a debug level
202- greater than ``20 `` will be issued using ``logger::trace() ``.
142+ ceph config set global 'enable_experimental_unrecoverable_data_corrupting_features' crimson
143+ ceph osd set-allow-crimson --yes-i-really-mean-it
144+ ceph config set mon osd_pool_default_crimson true
203145
204- +---------+---------+
205- | ceph | seastar |
206- +---------+---------+
207- | < 0 | error |
208- +---------+---------+
209- | 0 | warn |
210- +---------+---------+
211- | [1, 6) | info |
212- +---------+---------+
213- | [6, 20] | debug |
214- +---------+---------+
215- | > 20 | trace |
216- +---------+---------+
146+ The first command enables the ``crimson `` experimental feature.
217147
218- Note that ``crimson-osd ``
219- does not send log messages directly to a specified ``log_file ``. It writes
220- the logging messages to stdout and/or syslog. This behavior can be
221- changed using ``--log-to-stdout `` and ``--log-to-syslog `` command line
222- options. By default, ``log-to-stdout `` is enabled, and ``--log-to-syslog `` is disabled.
148+ The second enables the ``allow_crimson `` OSDMap flag. The monitor will
149+ not allow ``crimson-osd `` to boot without that flag.
223150
151+ The last causes pools to be created by default with the ``crimson `` flag.
152+ Crimson pools are restricted to operations supported by Crimson.
153+ ``Crimson-osd `` won't instantiate PGs from non-Crimson pools.
224154
225155vstart.sh
226- ---------
156+ =========
227157
228158The following options can be used with ``vstart.sh ``.
229159
@@ -246,17 +176,17 @@ The following options can be used with ``vstart.sh``.
246176
247177 for additional Seastar-specific command line options.
248178
249- ``--cyanstore ``
250- Use CyanStore as the object store backend.
251-
252- ``--bluestore ``
253- Use the alienized BlueStore as the object store backend. This is the default.
254-
255179``--crimson-smp ``
256180 The number of cores to use for each OSD.
257181 If BlueStore is used, the balance of available cores
258182 (as determined by `nproc `) will be assigned to the object store.
259183
184+ ``--bluestore ``
185+ Use the alienized BlueStore as the object store backend. This is the default (see below section on the `object store backend `_ for more details)
186+
187+ ``--cyanstore ``
188+ Use CyanStore as the object store backend.
189+
260190``--memstore ``
261191 Use the alienized MemStore as the object store backend.
262192
@@ -279,12 +209,9 @@ The following options can be used with ``vstart.sh``.
279209
280210To start a cluster with a single Crimson node, run::
281211
282- $ MGR=1 MON=1 OSD=1 MDS=0 RGW=0 ../src/vstart.sh -n -x \
283- --without-dashboard --cyanstore \
284- --crimson --redirect-output \
285- --osd-args "--memory 4G"
286-
287- Here we assign 4 GiB memory and a single thread running on core-0 to ``crimson-osd ``.
212+ $ MGR=1 MON=1 OSD=1 MDS=0 RGW=0 ../src/vstart.sh \
213+ --without-dashboard --bluestore --crimson \
214+ --redirect-output
288215
289216Another SeaStore example::
290217
@@ -299,19 +226,93 @@ Stop this ``vstart`` cluster by running::
299226
300227 $ ../src/stop.sh --crimson
301228
229+ Object Store Backend
230+ ====================
231+
232+ At the moment, ``crimson-osd `` offers both native and alienized object store
233+ backends. The native object store backends perform IO using the SeaStar reactor.
234+ They are:
235+
236+ .. describe :: cyanstore
237+
238+ CyanStore is modeled after memstore in the classic OSD.
239+
240+ .. describe :: seastore
241+
242+ Seastore is still under active development.
243+
244+ The alienized object store backends are backed by a thread pool, which
245+ is a proxy of the alienstore adaptor running in Seastar. The proxy issues
246+ requests to object stores running in alien threads, i.e., worker threads not
247+ managed by the Seastar framework. They are:
248+
249+ .. describe :: memstore
250+
251+ The memory backend object store
252+
253+ .. describe :: bluestore
254+
255+ The object store used by the classic ``ceph-osd ``
256+
257+ daemonize
258+ ---------
259+
260+ Unlike ``ceph-osd ``, ``crimson-osd `` does not daemonize itself even if the
261+ ``daemonize `` option is enabled. In order to read this option, ``crimson-osd ``
262+ needs to ready its config sharded service, but this sharded service lives
263+ in the Seastar reactor. If we fork a child process and exit the parent after
264+ starting the Seastar engine, that will leave us with a single thread which is
265+ a replica of the thread that called `fork() `_. Tackling this problem in Crimson
266+ would unnecessarily complicate the code.
267+
268+ Since supported GNU/Linux distributions use ``systemd ``, which is able to
269+ daemonize processes, there is no need to daemonize ourselves.
270+ Those using sysvinit can use ``start-stop-daemon `` to daemonize ``crimson-osd ``.
271+ If this is does not work out, a helper utility may be devised.
272+
273+ .. _fork() : http://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html
274+
275+ logging
276+ -------
277+
278+ ``Crimson-osd `` currently uses the logging utility offered by Seastar. See
279+ ``src/common/dout.h `` for the mapping between Ceph logging levels to
280+ the severity levels in Seastar. For instance, messages sent to ``derr ``
281+ will be issued using ``logger::error() ``, and the messages with a debug level
282+ greater than ``20 `` will be issued using ``logger::trace() ``.
283+
284+ +---------+---------+
285+ | ceph | seastar |
286+ +---------+---------+
287+ | < 0 | error |
288+ +---------+---------+
289+ | 0 | warn |
290+ +---------+---------+
291+ | [1, 6) | info |
292+ +---------+---------+
293+ | [6, 20] | debug |
294+ +---------+---------+
295+ | > 20 | trace |
296+ +---------+---------+
297+
298+ Note that ``crimson-osd ``
299+ does not send log messages directly to a specified ``log_file ``. It writes
300+ the logging messages to stdout and/or syslog. This behavior can be
301+ changed using ``--log-to-stdout `` and ``--log-to-syslog `` command line
302+ options. By default, ``log-to-stdout `` is enabled, and ``--log-to-syslog `` is disabled.
302303Metrics and Tracing
303304===================
304305
305306Crimson offers three ways to report stats and metrics.
306307
307- pg stats reported to mgr
308+ PG stats reported to mgr
308309------------------------
309310
310311Crimson collects the per-pg, per-pool, and per-osd stats in a `MPGStats `
311312message which is sent to the Ceph Managers. Manager modules can query
312313them using the `MgrModule.get() ` method.
313314
314- asock command
315+ Asock command
315316-------------
316317
317318An admin socket command is offered for dumping metrics::
@@ -334,7 +335,7 @@ see `Prometheus`_ for more details.
334335Profiling Crimson
335336=================
336337
337- fio
338+ Fio
338339---
339340
340341``crimson-store-nbd `` exposes configurable ``FuturizedStore `` internals as an
@@ -506,7 +507,7 @@ When a Seastar application crashes, it leaves us with a backtrace of addresses,
506507The ``seastar-addr2line `` utility provided by Seastar can be used to map these
507508addresses to functions. The script expects input on ``stdin ``,
508509so we need to copy and paste the above addresses, then send EOF by inputting
509- ``control-D `` in the terminal. One might use ``echo `` or ``cat `` instead` ::
510+ ``control-D `` in the terminal. One might use ``echo `` or ``cat `` instead::
510511
511512 $ ../src/seastar/scripts/seastar-addr2line -e bin/crimson-osd
512513
0 commit comments