diff --git a/modules/manage/assets/images/manage-settings/addBucketButton.png b/modules/manage/assets/images/manage-settings/addBucketButton.png deleted file mode 100644 index 9fb53588d3..0000000000 Binary files a/modules/manage/assets/images/manage-settings/addBucketButton.png and /dev/null differ diff --git a/modules/manage/assets/images/manage-settings/auto-compact-defaultNewUI.png b/modules/manage/assets/images/manage-settings/auto-compact-defaultNewUI.png index 0241f2187c..0cfe5486aa 100644 Binary files a/modules/manage/assets/images/manage-settings/auto-compact-defaultNewUI.png and b/modules/manage/assets/images/manage-settings/auto-compact-defaultNewUI.png differ diff --git a/modules/manage/assets/images/manage-settings/auto-compaction-tab.png b/modules/manage/assets/images/manage-settings/auto-compaction-tab.png deleted file mode 100644 index 9e84a7ec42..0000000000 Binary files a/modules/manage/assets/images/manage-settings/auto-compaction-tab.png and /dev/null differ diff --git a/modules/manage/assets/images/manage-settings/bucket-auto-compaction-settings-couchstore.png b/modules/manage/assets/images/manage-settings/bucket-auto-compaction-settings-couchstore.png new file mode 100644 index 0000000000..5019dc2987 Binary files /dev/null and b/modules/manage/assets/images/manage-settings/bucket-auto-compaction-settings-couchstore.png differ diff --git a/modules/manage/assets/images/manage-settings/bucket-auto-compaction-settings.png b/modules/manage/assets/images/manage-settings/bucket-auto-compaction-settings.png new file mode 100644 index 0000000000..a7a643bf99 Binary files /dev/null and b/modules/manage/assets/images/manage-settings/bucket-auto-compaction-settings.png differ diff --git a/modules/manage/assets/images/manage-settings/edit-bucket-definition-button.png b/modules/manage/assets/images/manage-settings/edit-bucket-definition-button.png deleted file mode 100644 index e9ba523708..0000000000 Binary files a/modules/manage/assets/images/manage-settings/edit-bucket-definition-button.png and /dev/null differ diff --git a/modules/manage/assets/images/manage-settings/override-default-auto-compaction.png b/modules/manage/assets/images/manage-settings/override-default-auto-compaction.png deleted file mode 100644 index 9e6760e961..0000000000 Binary files a/modules/manage/assets/images/manage-settings/override-default-auto-compaction.png and /dev/null differ diff --git a/modules/manage/pages/manage-settings/configure-compact-settings.adoc b/modules/manage/pages/manage-settings/configure-compact-settings.adoc index 0c9b2c30e9..f8cf5df11a 100644 --- a/modules/manage/pages/manage-settings/configure-compact-settings.adoc +++ b/modules/manage/pages/manage-settings/configure-compact-settings.adoc @@ -1,5 +1,5 @@ = Auto-Compaction -:description: pass:q[Auto-Compaction settings determine the _compaction process_; whereby databases and their respective view-indexes are compacted.] +:description: pass:The auto-Compaction settings controls if and when Couchbase Server compacts data files and view indexes.] :page-aliases: settings:configure-compact-settings :imagesdir: ../../assets/images @@ -9,106 +9,108 @@ [#understanding-auto-compaction] == Understanding Auto-Compaction -Auto-Compaction is enabled by default for all Couchbase buckets. -However, settings can be overridden on a per bucket basis. +Auto-compaction reclaims disk space by removing stale and deleted data from on-disk storage files. +By default, Couchbase Server performs auto-compaction all Couchbase buckets. +You can override the auto-compaction settings on a per-bucket basis. +You can also change the default auto-compaction settings which apply to all buckets that do not have overrides. -Auto-compaction settings affect _on-disk_ data, and therefore do not apply to Ephemeral buckets. +Auto-compaction settings affect on-disk data, and therefore do not apply to Ephemeral buckets. -Full and Cluster administrators can configure compaction settings with xref:manage:manage-settings/configure-compact-settings.adoc#configure-auto-compaction-with-the-ui[Couchbase Web Console], the Couchbase xref:manage:manage-settings/configure-compact-settings.adoc#configure-auto-compaction-with-the-cli[CLI], or the xref:manage:manage-settings/configure-compact-settings.adoc#configure-auto-compaction-with-the-rest-api[REST] API. +Users with the Full or Cluster administrator roles can configure compaction settings using <>, the <>, or the <>. -Note that in Couchbase Server Enterprise Edition, auto-compaction does not apply to memory-optimized index storage, and there are no settings necessary for configuring the auto-compaction of Global Secondary Indexes using standard index storage. +In Couchbase Server Enterprise Edition, auto-compaction does not apply to memory-optimized index storage. +Also, unlike Couchbase Server Community Edition, it does not have settings for configuring the auto-compaction of Global Secondary Indexes using standard index storage. See xref:indexes:storage-modes.adoc#standard-index-storage[Standard Index Storage] for information. [#configure-auto-compaction-with-the-ui] == Configure Auto-Compaction with the UI -Instructions on accessing Auto-Compaction settings are provided below. +You can override the global auto-compaction settings for a bucket either when you create or edit it using the Couchbase Server Web Console. [#for-a-new-bucket] -=== For a New Bucket +=== Configure Auto-Compaction for a New Bucket -To access the auto-compaction settings-panel for an new, individual bucket, proceed as follows: +To configure auto-compaction for an new bucket: -. Access the *Buckets* screen provided by the Couchbase Web Console. -Left-click on the *ADD BUCKET* tab: -+ -[#add-bucket-button] -image::manage-settings/addBucketButton.png[,100,align=left] +. In the main menu, click *Buckets*. +. Click *ADD BUCKET* -. When the *Add Data Bucket* dialog appears, add appropriate data into the initial fields; then left-click on the [.ui]*Advanced bucket settings* tab: -+ -[#show_advanced_settings] -image::manage-settings/show-advanced-settings.png[,360,align=left] -+ -The dialog now expands, and displays additional configuration-options. +. In the *Add Data Bucket* dialog, enter a name and select other options for your new bucket. +Under *Bucket Type*, you must select *Couchbase* to be able to edit the auto-compaction settings. +You cannot set the auto-compaction settings for Ephemeral buckets. -. Access the [.ui]*Auto-Compaction* panel, and check the [.ui]*Override the default auto-compaction settings?* checkbox: +. Click *Advanced bucket settings* to expand the dialog. + +. Under *Auto-Compaction*, select *Override the default auto-compaction settings?*. +The dialog expands again, and displays auto-compaction settings available for this bucket. +The fields you see depend on the storage backend you selected: ++ +[#auto_compact_magma] +.Magma Bucket Auto-Compaction Settings +image::manage-settings/bucket-auto-compaction-settings.png[width=75%] + -[#override_default_auto_compaction] -image::manage-settings/override-default-auto-compaction.png[,370,align=left] +.Couchstore Bucket Auto-Compaction Settings +image::manage-settings/bucket-auto-compaction-settings-couchstore.png[width=75%] + -The dialog expands again, and displays Auto-Compaction settings available for this bucket. +See <> for descriptions of the available settings. + [#for-an-existing-bucket] -=== For an Existing Bucket +=== Configure Auto-Compaction for an Existing Bucket -To access the auto-compaction settings-panel for an individual, existing bucket, proceed as follows: +To change the auto-compaction settings for an existing bucket: -. Left-click on the information-row for the bucket, on the *Buckets* screen of Couchbase Web Console. -When the *Edit* button appears, left-click on it: -+ -[#edit-bucket-definition-button] -image::manage-settings/edit-bucket-definition-button.png[,300,align=left] -+ -This brings up the [.ui]*Edit Bucket Settings* dialog. +. In the *Buckets* page's list of buckets, click the entry for the bucket you want to edit. + +. Click *Edit*. -. Left-click on the [.ui]*Show advanced bucket settings* tab. +. In the *Edit Bucket Settings* dialog, click *Show advanced bucket settings*. -. Access the [.ui]*Auto-Compaction* panel, and check the [.ui]*Override the default auto-compaction settings?* checkbox. -The dialog expands, thereby showing the available Auto-Compaction settings. +. Under *Auto-Compaction*, select *Override the default auto-compaction settings?* if it's not already selected. +The dialog expands to show the Auto-Compaction settings. +The settings are the same as those available in the <>. +They depend on the storage backend used by the bucket. ++ +See <> for descriptions of the available settings. [#for-no-override-buckets] -=== To Establish Defaults for All Buckets +=== Configure Default Auto-Compaction Settings -To access the auto-compaction settings-screen that provides defaults for all buckets not otherwise assigned customized settings, proceed as follows: +To set the default the auto-compaction settings that apply to all buckets that do not override them: -. Left-click on the [.ui]*Settings* tab, in the vertical navigation-bar at the left-hand side. +. In the main menu, click *Settings*. + +. In the *Settings* page, click the *Auto-Compaction* tab. + +See <> for descriptions of the available settings. -. When the [.ui]*Settings* screen appears, left-click on the [.ui]*Auto-Compaction* tab, on the horizontal control-bar at the top: -+ -[#auto_compaction_tab] -image::manage-settings//auto-compaction-tab.png[,360,align=left] -+ -This brings up the [.ui]*Auto-Compaction* screen. -=== Establishing Auto-Compaction Settings +[#configure-auto-compaction-settings] +=== Auto-Compaction Settings -The [.ui]*Auto-Compaction* view of the [.ui]*Settings* screen appears as follows. -(Note that the [.ui]*Index Fragmentation* settings are only displayed for Couchbase Server Community Edition.) +The default auto-compaction settings page appears as follows: [#auto_compact_defaultNewUI] image::manage-settings/auto-compact-defaultNewUI.png[,820,align=left] -All settings on this screen are also provided on the dialogs whereby you establish custom-settings for an individual new or existing bucket -- with the exception of the settings for <>, which can only be established on a cluster-wide basis. +The auto-compaction settings for individual buckets is similar to the default settings page, but the available fields depend on the bucket's storage-backend. -Settings constitute _conditions_, which must be met for the compaction-process to be triggered. -The settings are described below. +NOTE: The Couchbase Server Community Edition auto-compaction settings contains fields to control <>. +Couchbase Server Enterprise Edition does not have these settings. -[#database-fragmentation] -=== Database Fragmentation - -The [.ui]*Database Fragmentation* panel appears as follows: +All of the auto-compaction settings are conditions which must be met to trigger the auto-compaction process. +The following sections describe the settings in both the default auto-compaction settings and the individual bucket settings dialogs. -[#database_fragmentationNewUI] -image::manage-settings/database-fragmentationNewUI.png[,420,align=left] +[#database-fragmentation] +==== Database Fragmentation -Compaction is triggered when database-fragmentation reaches the point specified by means of this interface. +When database-fragmentation reaches the point specified by means of this interface. You can specify the fragmentation-level as a percentage (the upper field, selected by checking the adjacent checkbox); or as a number of megabytes (the lower). [#view-fragmentation] -=== View Fragmentation +==== View Fragmentation -The [.ui]*View Fragmentation* panel appears as follows: +The *View Fragmentation* panel appears as follows: [#view_fragmentation_interface] image::manage-settings/view-fragmentation-interface.png[,420,align=left] @@ -117,9 +119,11 @@ Compaction is triggered when view-fragmentation reaches the point specified by m You can specify the fragmentation-level as a percentage (the upper field, selected by checking the adjacent checkbox); or as a number of megabytes (the lower). [#time-interval] -=== Time Interval +==== Time Interval -The [.ui]*Time Interval* pane provides a number of settings whereby compaction is scheduled: +The *Time Interval* section lets you limit he hours where Couchbase Server can compact Couchstore buckets. +This setting only appears for buckets using the Couchstore storage engine. +It does not appear for Magma buckets. [#time_interval_interface] image::manage-settings/time-interval-interface.png[,420,align=left] @@ -130,16 +134,17 @@ Note that each left-hand field specifies the hour-of-the-day; while each right-h Checkboxes are provided to allow you to specify: first, that compaction can be aborted if the specified time is exceeded; secondly, that database and view compaction are executed simultaneously (implying a heavier processing and disk I/O load, during the compaction-process). -For example, the following, completed [.ui]*Time Interval* pane specifies that compaction should run between 1:00 am and 2:30 am; should be aborted if not completed in time; and should feature parallel compaction of database and indexes: +For example, the following, completed *Time Interval* pane specifies that compaction should run between 1:00 am and 2:30 am; should be aborted if not completed in time; and should feature parallel compaction of database and indexes: [#time_interval_interface_completed] image::manage-settings/time-interval-interface-completed.png[,310,align=left] [#index-fragmentation] -=== Index Fragmentation +==== Index Fragmentation +[.edition]#{community}# -The [.ui]*Index Fragmentation* panel, which is only available in Couchbase Server Community Edition, provides settings that cannot be overridden at individual bucket-level. -The panel appears as follows: +The *Index Fragmentation* settings are only available in Couchbase Server Community Edition. +It provides settings that cannot be overridden at individual bucket-level. [#index_fragmentation] image::manage-settings/index-fragmentation.png[,520,align=left] @@ -156,28 +161,28 @@ Check the checkbox, then specify a fragmentation-level as a percentage, in the i Turns on writes with _circular reuse_ for index-storage, and triggers the compaction-job based on a time-interval. To specify when compaction is permitted to run, select appropriate _days of the week_, by checking the appropriate checkboxes; then, select the start-time on each of those days; and optionally, an end-time. + -Optionally, check the [.ui]*Abort compaction if run time exceeds the set time interval* checkbox: if you do so, compaction is aborted if the specified end-time is exceeded. +Optionally, select the *Abort compaction if run time exceeds the set time interval* if you want Couchbase Server to abort compaction if it exceeds the end-time you set. -Note that whenever you change the compaction settings for the index, the system starts the global secondary index process on all the nodes. +NOTE: whenever you change the compaction settings for the index, the system starts the global secondary index process on all the nodes. -See xref:indexes:storage-modes.adoc#standard-index-storage[Standard Index Storage] for information on append-only and circular write modes. +See xref:indexes:storage-modes.adoc#standard-index-storage[Standard Index Storage] for information about append-only and circular write modes. [#tombstone-purge-interval] -=== Metadata Purge Interval +==== Metadata Purge Interval -Sets the frequency of the metadata (or _tombstone_) purge interval, for _Couchbase_ buckets only. -The default value is three days. +Sets the frequency of the metadata (or tombstone) purge interval, for Couchbase buckets only. +The default value is 3 days. The panel appears as follows: [#meta_data_purge_interface] image::manage-settings/meta-data-purge-interface.png[,240,align=left] -_Tombstones_ are records of expired or deleted items. +Tombstones are records of expired or deleted items. They include key and metadata. Tombstones are used in Couchbase Server to provide eventual consistency of data between clusters. The specified number of days will elapse before tombstones for expired or deleted items are _permanently_ removed. -The default value is three days. +The default value is 3 days. The permitted range of values is `0.04` to `60` (where `0.04` equals one hour, and `1` equals one day. [CAUTION] @@ -311,7 +316,7 @@ curl -i -X POST http://10.143.192.101:8091/controller/setAutoCompaction \ This example establishes fragmentation thresholds and sizes for database and view, and specifies the time-period during which compaction should occur. It specifies that compaction be aborted if it should overrun this time-period. -Parallel compaction for database and view is switched _off_. -The tombstone purge interval is set to 3 days; and _circular_ standard compaction is specified for particular days and hours. +Parallel compaction for database and view is switched off. +The tombstone purge interval is set to 3 days; and circular standard compaction is specified for particular days and hours. See xref:rest-api:rest-autocompact-set.adoc[Setting Auto-Compaction], for more information.