[SERVER-13994] do not aggressively pre-fetch data for parallelCollectionScan Created: 19/May/14  Updated: 11/Jul/16  Resolved: 01/Jul/14

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 2.6.1
Fix Version/s: 2.6.4, 2.7.3

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: David Storch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
Tested
Backport Completed:
Participants:

 Description   
Issue Status as of Jul 22, 2014

ISSUE SUMMARY
The parallelCollectionScan command pre-fetches the first extent for each cursor upon construction of the cursors. During cursor iteration, when a cursor needs to hop to the next extent, it also pre-fetches that extent. This can result in pre-fetching of large amounts of data. Performance tests show that disabling pre-fetching is more performant overall in most cases.

USER IMPACT
For large numbers of cursors with a big collection, this can mean aggressive pre-fetching of many gigabytes. This can cause large, unwanted spikes in disk IO.

WORKAROUNDS
None.

AFFECTED VERSIONS
All production releases up to version 2.6.3 are affected by this issue.

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

RESOLUTION DETAILS
Pre-fetching was disabled for the parallelCollectionScan command.

Original description

The parallelCollectionScan command pre-fetches the first extent for each cursor upon construction of the cursors. During cursor iteration, when a cursor needs to hop to the next extent, it also pre-fetches that extent.

For large numbers of cursors with a big collection, this can mean aggressive pre-fetching of many gigabytes. This can cause large, unwanted spikes in disk IO.



 Comments   
Comment by Githook User [ 21/Jul/14 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-13994 turn off pre-fetching for parallelCollectionScan command
Branch: v2.6
https://github.com/mongodb/mongo/commit/f46bbf5de280cd9a184fc837e887895ac1aa0057

Comment by David Storch [ 01/Jul/14 ]

Fixed in master branch by this commit:

commit 6da81951c0b49c728267b1804f97613e1245aca1
Author: Mathias Stearn <mathias@10gen.com>
Date:   Mon Apr 21 15:12:20 2014 -0400
 
    SERVER-13630 OplogStart and ParallelCollectionScan no longer rely on storage impl

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