[SERVER-6718] option to disable index prefetching as part of multithreaded replication Created: 05/Aug/12  Updated: 19/Mar/13  Resolved: 08/Aug/12

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.2.0-rc0
Fix Version/s: 2.2.0-rc1

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

Issue Links:
Related
is related to DOCS-417 Add doc for option to disable index p... Closed
Participants:

 Description   

For certain workloads, index prefetching for replicated ops can hurt performance on secondaries.



 Comments   
Comment by auto [ 08/Aug/12 ]

Author:

{u'date': u'2012-08-08T14:46:48-07:00', u'email': u'milkie@10gen.com', u'name': u'Eric Milkie'}

Message: SERVER-6718 initialize member variable to intended default
Branch: master
https://github.com/mongodb/mongo/commit/e6f62bb3cd09822635bb9eb241041acd50aaed92

Comment by auto [ 08/Aug/12 ]

Author:

{u'date': u'2012-08-08T08:32:39-07:00', u'email': u'milkie@10gen.com', u'name': u'Eric Milkie'}

Message: SERVER-6718 new parameter to control replication index prefetching behavior

New parameter replIndexPrefetch.
Settable via the command line or use setParameter() command on a running server.
Only valid on a server started with --replSet parameter.
This allows a user to disable the prefetching of all index pages prior to the application
of a replicated op on a secondary.
For most use cases, prefetching all indexes for a given op will provide good performance.
For use cases that do many in-place updates to documents in a collection with many indexes
that are unaffected by such updates, using the '_id_only' setting may provide better performance
than the 'all' setting. The '_id_only' setting only prefetches index pages for the _id index,
which will always be used to find the document needed to be updated.
The 'none' setting will be used for debugging only; there should be no production use cases for
this setting.
getParameter() supports getting the current value of this parameter.
Branch: master
https://github.com/mongodb/mongo/commit/c7d800c733ecbfdde9e2594c11d1b25cd1e7ceeb

Comment by Eric Milkie [ 07/Aug/12 ]

Modified proposal:
Command line flag --replIndexPrefetch
Parameter replIndexPrefetch
values: none, _id_only, all
"all" is the default if unspecified.

Comment by Eric Milkie [ 06/Aug/12 ]

Proposal is to add another config option to the replica set config:
[, indexPrefetch : <behavior> ]

where <behavior> can be one of ["off","_id","all"]

"off" : no prefetching for indexes
"id" : only the _id index will be prefetched
"all" (default) : every index will be prefetched

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