[SERVER-19178] In WiredTiger capped collection truncates, avoid walking lists of deleted items Created: 29/Jun/15  Updated: 10/Mar/16  Resolved: 06/Jul/15

Status: Closed
Project: Core Server
Component/s: WiredTiger
Affects Version/s: 3.0.4
Fix Version/s: 3.0.5

Type: Improvement Priority: Major - P3
Reporter: Michael Cahill (Inactive) Assignee: Michael Cahill (Inactive)
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-18875 Oplog performance on WT degrades over... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   
Issue Status as of Jul 14, 2015

ISSUE SUMMARY
Capped collection handling in WiredTiger is inefficient because of way that WiredTiger tracks and expires documents in the capped collection.

WiredTiger uses a specific internal cursor to find the "beginning of the capped collection". Combined with asynchronous deletion of expired capped collection records, this is inefficient for collections with high numbers of inserts because requests have to process large number of expired documents.

USER IMPACT
Capped collection performance degrades over time. Note that the oplog is a capped collection, so users running replica sets with WiredTiger may be impacted by this issue even if no other capped collections are used.

RESOLUTION DETAILS
WiredTiger now caches the current "first" unexpired document in a capped collection. This change improves performance for all capped collections, but is particular important for the performance of replication because the oplog depends on capped collection performance.

AFFECTED VERSIONS
MongoDB 3.0.0 through 3.0.4.

FIX VERSION
The fix is included in the 3.0.5 production release.

Original description

Backport part of SERVER-18875 to MongoDB 3.0 to address the most serious performance issues with long-running workloads using capped collections.



 Comments   
Comment by Githook User [ 01/Jul/15 ]

Author:

{u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

Message: SERVER-19178 Fix a bug positioning cursors for capped collection truncates
Branch: v3.0
https://github.com/mongodb/mongo/commit/0e10c86f515c28c626567a642ba20b93adca0459

Comment by Ramon Fernandez Marina [ 29/Jun/15 ]

michael.cahill, I'm reopening this ticket as there are a number of failures in Evergreen related to it: https://evergreen.mongodb.com/version/mongodb_mongo_v3.0_a3321c8b69b35e8d0416227bfcea97b849f1ce1f

Comment by Githook User [ 29/Jun/15 ]

Author:

{u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

Message: SERVER-19178 In WiredTiger capped collection truncates, avoid walking lists of deleted items.
Branch: v3.0
https://github.com/mongodb/mongo/commit/a3321c8b69b35e8d0416227bfcea97b849f1ce1f

Generated at Thu Feb 08 03:50:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.