Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
6.5.0
Description
Currently CouchKVStore opens and closed the underlying couchstore file on every call to saveDocs(). Profiling has highlighted that the underlying OS close() call (and to a lesser extent the open() call) are costly - on Linux with XFS there appears to be non-trivial work to
release various allocated resources - close() takes around 7% of the total flusher runtime.
To improve this, keep the couchstore Db instance for each vBucket open across saveDocs() calls. This increases KV-Engine's FD usage (potentially 1024 more FDs open at once than before), but should reduce the costs associated with open/close.
Attachments
Issue Links
- depends on
-
MB-36379 Provide an API to set storage engine file descriptor limit
- Closed
Gerrit Reviews
For Gerrit Dashboard: MB-36572 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
116673,9 | MB-36572: keep couchstore files open across writes | master | kv_engine | Status: ABANDONED | -2 | -1 |
134919,25 | MB-36572: Use CouchKVStoreFileCache | master | kv_engine | Status: MERGED | +2 | +1 |
134969,5 | MB-36572: Set non-zero file descriptors in unit tests | master | kv_engine | Status: MERGED | +2 | +1 |
134973,6 | MB-36572: Move DbHolder to new file | master | kv_engine | Status: MERGED | +2 | +1 |
134979,15 | MB-36572: Add CouchKVStoreFileCache | master | kv_engine | Status: MERGED | +2 | +1 |
135066,1 | MB-36572: cv test | master | kv_engine | Status: ABANDONED | 0 | -1 |
135727,11 | MB-36572: Swap ordering of dbfileRev map and collections locks at warmup | master | kv_engine | Status: MERGED | +2 | +1 |
135869,4 | MB-41357: Revert "MB-36572: Use CouchKVStoreFileCache" | master | kv_engine | Status: MERGED | +2 | +1 |
135972,9 | MB-36572: Free read and write buffers on successful commit | master | couchstore | Status: MERGED | +2 | +1 |
135980,9 | MB-36572: Don't pre-allocate read and write buffers in BufferedFileOps | master | couchstore | Status: MERGED | +2 | +1 |
136029,3 | MB-36572: Use CouchKVStoreFileCache for writing | master | kv_engine | Status: ABANDONED | -1 | -1 |
136141,5 | MB-36572: Always cache deleteCount in CouchKVStore | master | kv_engine | Status: MERGED | +2 | +1 |
136142,6 | MB-36572: Drop VBElement lock before calling setupDeferredDeletion | master | kv_engine | Status: MERGED | +2 | +1 |
136174,9 | MB-36572: Use CouchKVStoreFileCache for reading | master | kv_engine | Status: MERGED | +2 | +1 |
136175,6 | MB-36572: Use CouchKVStoreFileCache for writing | master | kv_engine | Status: MERGED | +2 | +1 |
137509,1 | Revert "MB-36572: Use CouchKVStoreFileCache for reading" | master | kv_engine | Status: ABANDONED | 0 | 0 |