-
Notifications
You must be signed in to change notification settings - Fork 183
DOC-12489 magma default storage engine #3813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/8.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,31 @@ See xref:install:upgrade-procedure-selection.adoc#swap-rebalance[Swap Rebalance] | |
|
||
Before upgrading, consider the following version compatibility concerns. | ||
|
||
[#8-0-storage-backend] | ||
=== New Default Storage Backend in Couchbase Server Version 8.0 | ||
|
||
After you have fully upgraded a cluster to Couchbase Server 8.0.x and later, the default storage backend for buckets is Magma with 128 vBuckets. | ||
Previous versions of Couchbase Server used Couchstore with 1024 vBuckets as the default storage backend. | ||
|
||
This new default results in two behavior changes from previous versions: | ||
|
||
* If you create a bucket and do not specify the storage backend, your bucket will use the Magma storage backend instead of the Couchstore backend. | ||
* If you specify Magma as the storage backend but do not set the new `numVBuckets` parameter, the bucket will have 128 vBuckets instead of the prior default of 1024 vBuckets. | ||
Magma buckets with 128 vBuckets is a new feature in Couchbase Server 8.0 and later. | ||
|
||
These behavior changes could cause issues if you rely on the prior behavior, especially if you use deployment scripts. | ||
If you have deployment scripts that create buckets, review them to determine if you need to make changes. | ||
|
||
For example, suppose your deployment script does not specify the storage backend when it creates a bucket that you intend to use with the xref:views/views-mapreduce-intro.adoc[] feature. | ||
On versions prior to Couchbase Server 8.0, your script created a Couchstore bucket with 1024 vBuckets, | ||
In version 8.0, due to change in the default backend, your script creates a bucket with the Magma storage backend with 128 vBuckets. | ||
Attempting to use MapReduce Views with this bucket results in errors, because Magma buckets do not support this feature. | ||
|
||
Another concern is that versions of Couchbase Server earlier than 8.0 do not support XDCR replication between buckets with different numbers of vBuckets. | ||
Therefore, you cannot replicate between a bucket you create with the new default backend setting and buckets on an earlier server version. | ||
To able to replicate with a bucket on an earlier version of Couchbase Server, explicitly set the new bucket's storage backend to Couchstore or to Magma with 1024 vBuckets during creation. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo -- missing a word -- "To able to" should be "To be able to". |
||
|
||
For more information about storage backends, see xref:buckets-memory-and-storage/storage-engines.adoc#storage-engines[]. | ||
|
||
// So long as upgrading from 6.x is supported, this notice will need to stay in some form in each new release. | ||
=== Upgrading to Version 7.x With Earlier Versions of .NET SDK | ||
|
@@ -43,7 +68,7 @@ You cannot upgrade directly from a version of Couchbase Server earlier than 7.1 | |
For example, you can directly upgrade from version 6.6 to version 7.2.3. | ||
You cannot directly upgrade from version 6.6 to version 7.2.4. | ||
A compatibility issue with the Erlang version used by these earlier server versions prevents a direct upgrade to later versions of the server. | ||
To upgrade from server versions 6.5, 6.6, or 7.0 to version 7.6 or later, first upgrade to version between 7.1 and 7.2.3. | ||
To upgrade from server versions 6.5, 6.6, or 7.0 to version 7.6 or later, first upgrade to a version between 7.1 and 7.2.3. | ||
Then upgrade to version 7.6 or later. | ||
|
||
[#understanding-upgrade] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,45 @@ curl --get -u <username:password> \ | |
[#section-new-feature-data-service] | ||
=== Data Service | ||
|
||
[#mb-62777] | ||
https://jira.issues.couchbase.com/browse/MB-62777[MB-62777] Magma with 128 vBuckets is now the default storage engine:: | ||
In earlier versions of Couchbase Server, if you did not specify which storage engine to use when creating a new bucket, it would use Couchstore. | ||
Once you upgrade your entire cluster to Couchbase Server Enterprise 8.0, the default storage engine for new buckets is Magma with 128 vBuckets. | ||
|
||
+ | ||
Magma buckets with 128 vBuckets is a new feature that provides the advantages of the Magma storage engine while reducing the minimum memory quota. | ||
Before Couchbase Server 8.0, Magma only supported using 1024 vBuckets and had a minimum memory quota of 1{nbsp}GiB per node. | ||
Buckets that use Magma with 128 vBuckets have a minimum memory quota of 100{nbsp}MiB per node, which is the same as Couchstore. | ||
|
||
+ | ||
NOTE: These changes do not affect Couchbase Server Community Edition because it does not support the Magma storage engine. | ||
|
||
+ | ||
This change in the default storage engine does not affect existing buckets. | ||
You can still create buckets that use the Couchstore storage engine or the Magma st5orage engine with 1024 vBuckets by explicitly specifying them when you create the bucket. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo: st5orage instead of storage |
||
|
||
+ | ||
See xref:learn:buckets-memory-and-storage/storage-engines.adoc[] for more information about storage engines. | ||
|
||
+ | ||
.default behavior change | ||
[IMPORTANT] | ||
==== | ||
The new default storage backend for buckets is a behavior change that may cause issues if you rely on the previous behavior. | ||
|
||
Before upgrading to Couchbase Server 8.0, consider the following: | ||
|
||
* If you have deployment scripts that create buckets without specifying the storage engine, those scripts create Magma buckets with 128 vBuckets instead of Couchstore buckets after the upgrade. | ||
This may affect your deployment if you depend on buckets using the Couchstore storage engine. | ||
* You cannot use XDCR to replicate Magma buckets using 128 vBuckets with pre-8.0 clusters. | ||
XDCR in pre-8.0 clusters only supports replication between buckets that contain the same number of vBuckets. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment is for lines 95 and 96. I think that this level of detail is good for What's New, but the technical detail is: |
||
Pre-8.0 versions of Couchbase Server only support Couchstore and Magma buckets with 1024 vBuckets (or 64 vBuckets on macOS). | ||
|
||
+ | ||
If you're manually deploying a new cluster, set the number of vBuckets to 1024 for any Magma bucket you need to replicate with a pre-8.0 cluster. | ||
If you have a deployment script that creates Magma buckets for replication with pre-8.0 clusters, have it set the number of vBuckets to 1024. | ||
To set this value, use the `numVbuckets` parameter in xref:rest-api:rest-bucket-create.adoc#numvbuckets[the REST API] or `--num-vbuckets` in the xref:cli:cbcli/couchbase-cli-bucket-create.adoc[`couchbase-cli` command line tool]. | ||
==== | ||
|
||
https://jira.issues.couchbase.com/browse/MB-9418[MB-9418]:: | ||
The previous warmup behavior was to load values and not complete warmup until the Bucket reaches one of: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,119 @@ | ||
= Storage Engines | ||
:description: pass:q[Couchbase supports two different backend storage mechanisms: Couchstore and Magma.] | ||
:description: pass:q[Couchbase supports two different backend storage engines: Couchstore and Magma.] | ||
|
||
[abstract] | ||
{description} | ||
It is important to understand which backend storage is best suited to your requirements. | ||
These storage engines organize the data both on disk ad in memory. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo: organize the data both on disk ad in memory |
||
This page explains how to choose a backend storage to suit your needs. | ||
|
||
== Couchstore | ||
|
||
Couchstore is the default bucket storage engine. | ||
It is optimized for high performance with large data sets, | ||
while using fewer system resources (the minimum bucket size for the Couchstore backend is 100{nbsp}MB). | ||
If you have a small data set that can fit in memory, then you should consider using Couchstore. | ||
|
||
[#storage-engine-magma] | ||
== Magma | ||
|
||
[.edition]#{enterprise}# | ||
|
||
Magma is designed for high performance with very large datasets that do not fit in memory. | ||
It is ideal for use cases that rely primarily on disk access. | ||
The performance of disk access will be as good as the underlying disk sub-systems -- | ||
for example, using NVMe SSDs will give higher performance. | ||
Magma is designed for high performance with large datasets that do not fit in memory. | ||
It's ideal for use cases that rely primarily on data stored on disk. | ||
The performance of disk access is as good as the underlying disk sub-systems. | ||
For example, using NVMe SSDs gives better performance than spinning drives. | ||
|
||
In order to get maximum performance from Magma for disk-oriented workloads, it is recommended to set the Writer Threads to `Disk i/o optimized`. This setting will ensure there are enough threads to sustain high write rates. | ||
When you create a bucket using the Magma storage engine, you choose the number of xref:learn:buckets-memory-and-storage/vbuckets.adoc[vBuckets] a bucket uses. | ||
Magma supports two vBucket configurations: 128 or 1024. | ||
This choice affects the minimum memory quota for the bucket. | ||
The 128 vBucket configuration is the default for new buckets in Couchbase Server Enterprise Edition 8.0 and later. | ||
It has a minimum memory quota of 100{nbsp}MiB per node. | ||
|
||
To learn more about Writer Thread settings, see xref:manage:manage-settings/general-settings.adoc#data-settings[Data Settings] | ||
NOTE: Magma buckets with 128 vBuckets are only available in clusters that have fully migrated to Couchbase Server 8.0 or later. | ||
|
||
Magma can work with very low amounts of memory for large datasets: a minimum memory-to-data ratio of 1% is required. | ||
For example, if a node is holding 5{nbsp}TB of data, Magma can be used with only 64{nbsp}GB RAM. | ||
Magma using 1024 vBuckets has a minimum memory quota of 1{nbsp}GiB per node. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I liked the "Which Storage Engine Should You Use?", but since that section is further down in the page, I'm thinking that this may be a good place to just note here: If you can allocate at least 1 GiB memory per node to your bucket, you should choose the 1024 vBucket option for Magma as you will get better performance at scale. |
||
|
||
As your dataset grows, Magma has a minimum memory-to-data ratio of 1%. | ||
For example, a node with 5{nbsp}TiB data in a Magma bucket must allocate at least 51{nbsp}GiB of RAM for the bucket. | ||
|
||
.Magma Supported Services | ||
|=== | ||
|Couchbase Version |Services Supported | ||
=== Magma Writer Thread Settings | ||
|
||
|*Version 7.1* | ||
|Query, Index, XDCR, Backup | ||
Couchbase Server lets you set the number of threads for reading and writing data to the disk. | ||
Under some circumstances, you may want to set the Writer Threads to `Disk i/o optimized` for Magma buckets. | ||
This setting makes sure there are enough threads to sustain high write rates. | ||
|
||
|*Version 7.1.2 and Higher* | ||
|[[magma-support-ref]]Search, Eventing, Analytics<<magma-support-note, ^[1]^>> | ||
|=== | ||
To learn more about how you should configure the Writer Thread settings for your Magma bucket, see xref:manage:manage-settings/general-settings.adoc#data-settings[Data Settings] | ||
|
||
== Couchstore | ||
|
||
[horizontal] | ||
[[magma-support-note]]<<magma-support-ref, ^1^>>:: If these services are required in versions prior to 7.1.2, Couchstore should be used. | ||
Couchstore is the original storage engine for Couchbase Server. | ||
It's the only storage engine available in Couchbase Server Community Edition. | ||
Couchstore is designed for high performance with datasets that fit in memory. | ||
It has a minimum memory requirement of 100{nbsp}MB per node, and a minimum memory-to-data ratio of 10%. | ||
If you have a small dataset whose working set (frequently accessed data) can fit in memory, then you should consider using Couchstore. | ||
|
||
== Couchstore and Magma at a Glance | ||
== Couchstore verses Magma at a Glance | ||
|
||
The following table summarizes the differences between Couchstore and Magma storage engines. | ||
|
||
|=== | ||
| {empty} | Couchstore |Magma | ||
| {empty} | Couchstore |Magma 128 vBuckets | Magma 1024 vBuckets | ||
|
||
| Minimum bucket memory quota | ||
| 100{nbsp}MB | ||
| [[quota-ref]]1{nbsp}GB<<quota-note, ^[1]^>> | ||
| 100{nbsp}MiB | ||
| 100{nbsp}MiB | ||
| 1{nbsp}GiB | ||
|
||
| Minimum memory to data ratio | ||
| 10% | ||
| 1% | ||
| 1% | ||
|
||
| Maximum data per node | ||
| 3{nbsp}TB | ||
| 10{nbsp}TB, but with much higher possibility of data imbalance. | ||
| 10{nbsp}TB | ||
|
||
|=== | ||
[horizontal] | ||
[[quota-note]]<<quota-ref, ^1^>>:: Magma's minimum memory requirement is higher at 1GB per node due to the more complex data structures it has to maintain. | ||
|
||
== When should you use Couchstore? | ||
|
||
The choice of Couchstore or Magma is set at the bucket level xref:manage:manage-buckets/create-bucket.adoc[when the bucket is created]. | ||
A single Couchbase cluster can have a mix of Couchstore and Magma buckets. | ||
== Which Storage Engine Should You Use? | ||
|
||
You should use the Couchstore backend if: | ||
The choice of which storage engine to use depends on your use case and the size of your dataset. | ||
As of Couchbase Serve 8.0, the Magma is the recommended storage engine for most use cases. | ||
The choice between 128 and 1024 vBuckets gives you flexibility when configuring your bucket. | ||
|
||
* You have a dataset with a working set that will fit into available memory (and the working set is >{nbsp}20%). | ||
* You are running the Couchbase server on low-end hardware. | ||
* You are running a version prior to 7.1.2, and your bucket needs to support the Search, Eventing, or Analytics Service. | ||
* You are running the legacy xref:learn:views/views-intro.adoc[MapReduce Views] Service, which will not run on Magma storage. | ||
When to choose Magma with 128 vBuckets:: | ||
You should use the Magma backend with 128 vBuckets if any of the following are true: | ||
|
||
== When should you use Magma? | ||
+ | ||
* You want to minimize memory use and have a working dataset that does not fit in the available memory or is more than 20% of the total dataset. | ||
Magma with 128 vBuckets is more efficient in this case than Couchstore. | ||
* You want to conserve memory as your dataset grows. | ||
Because Magma has a 1% memory-to-data ratio, its memory requirements grow more slowly than Couchstore's 10% memory-to-data ratio. | ||
* You have a dataset size that's less than 100{nbsp}GiB. | ||
With this small dataset size, the 128 vBucket configuration saves you memory verses the minimum 1{nbsp}GiB memory required by the 1024 vBucket Magma configuration. | ||
* You're configuring a POC or testing system and plan to use Magma with 1024 vBuckets in production. | ||
|
||
You should use the Magma backend if: | ||
When to choose Magma with 1024 vBuckets:: | ||
You should use the Magma backend with 1024 vBuckets if any of the following are true: | ||
|
||
* Your working set is much larger than the available memory, and you need high disk-access speed. | ||
* You need to store and access large amounts of data (several terabytes) using a small amount of memory. | ||
+ | ||
* Your working set is larger than the available memory (or you expect it to outgrow memory), and you need high disk-access speed. | ||
* You need to store and access large amounts of data (multiple terabytes) using a small amount of memory. | ||
In this case, the 1024 vBucket configuration is less likely to have data imbalance issues than the 128 vBucket configuration. | ||
Also, Magma with 1024 vBuckets uses less CPU for operations such as compaction verse the 128 vBucket configuration. | ||
* Your applications make heavy use of transactions with persistence-based durability. | ||
* Your dataset will grow beyond Couchstore's 3{nbsp}TB limit. | ||
|
||
When should you choose Couchstore?:: | ||
You should use the Couchstore backend if any of the following are true: | ||
|
||
+ | ||
* You're using Couchbase Server Community Edition which only supports the Couchstore storage engine. | ||
* You have a dataset with a working set that fits into available memory and the working set is less than 20% of the total dataset. | ||
* You're running Couchbase Server on low-end hardware. | ||
* You're running the legacy xref:learn:views/views-intro.adoc[] Service, which does not run on Magma storage. | ||
|
||
|
||
== Migrating Between Storage Engines | ||
== Migrating between Storage Engines | ||
|
||
You can migrate a bucket to use a different storage engine. | ||
Consider migrating a bucket if it no longer meets the criteria explained in the previous sections. | ||
For example, suppose you have a bucket using the Couchstore backend that has grown to the point where it no longer fits in memory. | ||
For example, suppose you have a bucket using the Couchstore backend whose working dataset has grown to the point where it no longer fits in memory. | ||
In this case, you should migrate the bucket to use Magma as a storage backend. | ||
|
||
To learn how to migrate a bucket's storage backend, see xref:manage:manage-buckets/migrate-bucket.adoc[]. |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are giving a link to the MapReduce Views page here, could we have the same note that we have in Views intro page saying that Views are deprecated and will be removed in a future version in the MapReduce Views page?
Link to Views intro page -- https://docs.couchbase.com/server/current/learn/views/views-intro.html