diff --git a/docs/config/client.en.md b/docs/config/client.en.md index 3673bd86..332f9c17 100644 --- a/docs/config/client.en.md +++ b/docs/config/client.en.md @@ -13,6 +13,7 @@ affect their interaction with the cluster. - [client_retry_interval](#client_retry_interval) - [client_eio_retry_interval](#client_eio_retry_interval) - [client_retry_enospc](#client_retry_enospc) +- [client_wait_up_timeout](#client_wait_up_timeout) - [client_max_dirty_bytes](#client_max_dirty_bytes) - [client_max_dirty_ops](#client_max_dirty_ops) - [client_enable_writeback](#client_enable_writeback) @@ -70,6 +71,19 @@ and clients are not blocked and just get EIO error code instead. Retry writes on out of space errors to wait until some space is freed on OSDs. +## client_wait_up_timeout + +- Type: seconds +- Default: 16 +- Can be changed online: yes + +Wait for this number of seconds until PGs are up when doing operations +which require all PGs to be up. Currently only used by object listings +in delete and merge-based commands ([vitastor-cli rm](../usage/cli.en.md#rm), merge and so on). + +The default value is calculated as `1 + OSD lease timeout`, which is +`1 + etcd_report_interval + max_etcd_attempts*2*etcd_quick_timeout`. + ## client_max_dirty_bytes - Type: integer diff --git a/docs/config/client.ru.md b/docs/config/client.ru.md index e941e642..4357cbc7 100644 --- a/docs/config/client.ru.md +++ b/docs/config/client.ru.md @@ -13,6 +13,7 @@ - [client_retry_interval](#client_retry_interval) - [client_eio_retry_interval](#client_eio_retry_interval) - [client_retry_enospc](#client_retry_enospc) +- [client_wait_up_timeout](#client_wait_up_timeout) - [client_max_dirty_bytes](#client_max_dirty_bytes) - [client_max_dirty_ops](#client_max_dirty_ops) - [client_enable_writeback](#client_enable_writeback) @@ -72,6 +73,19 @@ RDMA и хотите повысить пиковую производитель Повторять запросы записи, завершившиеся с ошибками нехватки места, т.е. ожидать, пока на OSD не освободится место. +## client_wait_up_timeout + +- Тип: секунды +- Значение по умолчанию: 16 +- Можно менять на лету: да + +Время ожидания поднятия PG при операциях, требующих активности всех PG. +В данный момент используется листингами объектов в командах, использующих +удаление и слияние ([vitastor-cli rm](../usage/cli.ru.md#rm), merge и подобные). + +Значение по умолчанию вычисляется как `1 + время lease OSD`, равное +`1 + etcd_report_interval + max_etcd_attempts*2*etcd_quick_timeout`. + ## client_max_dirty_bytes - Тип: целое число diff --git a/docs/config/osd.en.md b/docs/config/osd.en.md index 9fda3ff9..d762206a 100644 --- a/docs/config/osd.en.md +++ b/docs/config/osd.en.md @@ -316,7 +316,7 @@ for hot data and slower disks - HDDs and maybe SATA SSDs - but will slightly decrease write performance for fast disks because page cache is an overhead itself. -Choose "directsync" to use [immediate_commit](layout-cluster.ru.md#immediate_commit) +Choose "directsync" to use [immediate_commit](layout-cluster.en.md#immediate_commit) (which requires disable_data_fsync) with drives having write-back cache which can't be turned off, for example, Intel Optane. Also note that *some* desktop SSDs (for example, HP EX950) may ignore O_SYNC thus making diff --git a/docs/config/pool.en.md b/docs/config/pool.en.md index 16a032b2..fa34665a 100644 --- a/docs/config/pool.en.md +++ b/docs/config/pool.en.md @@ -43,7 +43,7 @@ Parameters: - [osd_tags](#osd_tags) - [primary_affinity_tags](#primary_affinity_tags) - [scrub_interval](#scrub_interval) -- [used_for_fs](#used_for_fs) +- [used_for_app](#used_for_app) Examples: @@ -377,24 +377,37 @@ of the OSDs containing a data chunk for a PG. Automatic scrubbing interval for this pool. Overrides [global scrub_interval setting](osd.en.md#scrub_interval). -## used_for_fs +## used_for_app - Type: string -If non-empty, the pool is marked as used for VitastorFS with metadata stored -in block image (regular Vitastor volume) named as the value of this pool parameter. +If non-empty, the pool is marked as used for a separate application, for example, +VitastorFS or S3, which allocates Vitastor volume IDs by itself and does not use +image/inode metadata in etcd. -When a pool is marked as used for VitastorFS, regular block volume creation in it +When a pool is marked as used for such app, regular block volume creation in it is disabled (vitastor-cli refuses to create images without --force) to protect -the user from block volume and FS file ID collisions and data loss. +the user from block volume and FS/S3 volume ID collisions and data loss. -[vitastor-nfs](../usage/nfs.ru.md), in its turn, refuses to use pools not marked +Also such pools do not calculate per-inode space usage statistics in etcd because +using it for an external application implies that it may contain a very large +number of volumes and their statistics may take too much space in etcd. + +Setting used_for_app to `fs:` tells Vitastor that the pool is used for VitastorFS +with VitastorKV metadata base stored in a block image (regular Vitastor volume) named +``. + +[vitastor-nfs](../usage/nfs.en.md), in its turn, refuses to use pools not marked for the corresponding FS when starting. This also implies that you can use one pool only for one VitastorFS. -The second thing that is disabled for VitastorFS pools is reporting per-inode space -usage statistics in etcd because a FS pool may store a very large number of files -and statistics for them all would take a lot of space in etcd. +If you plan to use the pool for S3, set its used_for_app to `s3:`. `` may +be basically anything you want (for example, `s3:standard`) - it's not validated +by Vitastor S3 components in any way. + +All other values except prefixed with `fs:` or `s3:` may be used freely and don't +mean anything special for Vitastor core components. For now, you can use them as +you wish. # Examples diff --git a/docs/config/pool.ru.md b/docs/config/pool.ru.md index 3a68d199..d7557ceb 100644 --- a/docs/config/pool.ru.md +++ b/docs/config/pool.ru.md @@ -42,7 +42,7 @@ - [osd_tags](#osd_tags) - [primary_affinity_tags](#primary_affinity_tags) - [scrub_interval](#scrub_interval) -- [used_for_fs](#used_for_fs) +- [used_for_app](#used_for_app) Примеры: @@ -256,7 +256,7 @@ PG в Vitastor эферемерны, то есть вы можете менят ## raw_placement -- Type: string +- Тип: строка Низкоуровневые правила генерации PG в форме DSL (доменно-специфичного языка). Используйте, только если действительно знаете, зачем вам это надо :) @@ -383,26 +383,39 @@ OSD с "all". Интервал скраба, то есть, автоматической фоновой проверки данных для данного пула. Переопределяет [глобальную настройку scrub_interval](osd.ru.md#scrub_interval). -## used_for_fs +## used_for_app -- Type: string +- Тип: строка -Если непусто, пул помечается как используемый для файловой системы VitastorFS с -метаданными, хранимыми в блочном образе Vitastor с именем, равным значению -этого параметра. +Если непусто, пул помечается как используемый для отдельного приложения, например, +для VitastorFS или S3, которое распределяет ID образов в пуле само и не использует +метаданные образов/инодов в etcd. -Когда пул помечается как используемый для VitastorFS, создание обычных блочных -образов в нём отключается (vitastor-cli отказывается создавать образы без --force), -чтобы защитить пользователя от коллизий ID файлов и блочных образов и, таким -образом, от потери данных. +Когда пул помечается используемым для такого приложения, создание обычных блочных +образов в нём запрещается (vitastor-cli отказывается создавать образы без --force), +чтобы защитить пользователя от коллизий ID блочных образов и томов ФС/S3, и, +таким образом, от потери данных. + +Также для таких пулов отключается передача статистики в etcd по отдельным инодам, +так как использование для внешнего приложения подразумевает, что пул может содержать +очень много томов и их статистика может занять слишком много места в etcd. + +Установка used_for_app в значение `fs:` сообщает о том, что пул используется +для VitastorFS с базой метаданных VitastorKV, хранимой в блочном образе с именем +``. [vitastor-nfs](../usage/nfs.ru.md), в свою очередь, при запуске отказывается -использовать для ФС пулы, не выделенные для неё. Это также означает, что один -пул может использоваться только для одной VitastorFS. +использовать для ФС пулы, не помеченные, как используемые для неё. Это также +означает, что один пул может использоваться только для одной VitastorFS. -Также для ФС-пулов отключается передача статистики в etcd по отдельным инодам, -так как ФС-пул может содержать очень много файлов и статистика по ним всем -заняла бы очень много места в etcd. +Если же вы планируете использовать пул для данных S3, установите его used_for_app +в значение `s3:`, где `` - любое название по вашему усмотрению +(например, `s3:standard`) - конкретное содержимое `` пока никак не проверяется +компонентами Vitastor S3. + +Все остальные значения used_for_app, кроме начинающихся на `fs:` или `s3:`, не +означают ничего особенного для основных компонентов Vitastor. Поэтому сейчас вы +можете использовать их свободно любым желаемым способом. # Примеры diff --git a/docs/config/src/osd.yml b/docs/config/src/osd.yml index 93d0e266..24206fa1 100644 --- a/docs/config/src/osd.yml +++ b/docs/config/src/osd.yml @@ -315,7 +315,7 @@ decrease write performance for fast disks because page cache is an overhead itself. - Choose "directsync" to use [immediate_commit](layout-cluster.ru.md#immediate_commit) + Choose "directsync" to use [immediate_commit](layout-cluster.en.md#immediate_commit) (which requires disable_data_fsync) with drives having write-back cache which can't be turned off, for example, Intel Optane. Also note that *some* desktop SSDs (for example, HP EX950) may ignore O_SYNC thus making diff --git a/docs/usage/cli.en.md b/docs/usage/cli.en.md index d84d620a..e304bea3 100644 --- a/docs/usage/cli.en.md +++ b/docs/usage/cli.en.md @@ -398,7 +398,8 @@ Optional parameters: | `--raw_placement ` | Specify raw PG generation rules ([details](../config/pool.en.md#raw_placement)) | | `--primary_affinity_tags tags` | Prefer to put primary copies on OSDs with all specified tags | | `--scrub_interval