Details
-
Bug
-
Resolution: Fixed
-
Major
-
5.0.0, 5.5.0, 6.0.3, 6.5.0
-
64GB RAM
Samsung SM863 960GB
-
Untriaged
-
-
No
Description
If vbuckets are large (e.g., 100M or 200M keys per vbucket), then compaction of individual vbuckets triggers a noticeable spike in memory usage.
For instance, this relatively small vbucket temporary increased memory usage by ~15GB:
DB Info (/data/bucket-1/0.couch.2) - header at 33279463424
|
file format version: 12
|
update_seq: 100000000
|
purge_seq: 0
|
crc: CRC-32C
|
doc count: 100000000
|
deleted doc count: 0
|
data size: 30.993 GB
|
B-tree size: 7.045 GB
|
total disk size: 30.994 GB
|
Larger vbuckets sent my 64GB servers to swap.
The amount of RAM allocated during the compaction process depends on the size of the index. I am pretty sure we can come up with a good formula for that.
Steps:
- Create a cluster with 4 nodes, 1 bucket, and 4 vbuckets (no replicas)
- Disable auto-compaction
- Load 800M items (~512B)
- Trigger compaction
Some graphs: http://cbmonitor.sc.couchbase.com/reports/html/?snapshot=hera_510-1137_compact_5197
Attachments
Issue Links
- relates to
-
MB-25994 Duration of compaction becomes impractical at large scale (vbucket size > 100GB)
-
- Open
-
For Gerrit Dashboard: MB-25982 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
120535,1 | MB-25982: Compaction of large vbuckets causes a significant increase in memory usage | mad-hatter | couchstore | Status: ABANDONED | 0 | -1 |
120588,1 | MB-25982: Compaction of large vbuckets causes a significant increase in memory usage | mad-hatter | couchstore | Status: ABANDONED | 0 | -1 |
120589,2 | MB-25982: Compaction of large vbuckets causes a significant increase in memory usage | mad-hatter | couchstore | Status: ABANDONED | 0 | -1 |
120601,4 | MB-25982: Reduce memory usage during compaction | mad-hatter | couchstore | Status: MERGED | +2 | +1 |