Impact of TTL indexes

34 views
Skip to first unread message

Joe Waller

unread,
Apr 23, 2014, 1:52:54 PM4/23/14
to mongod...@googlegroups.com
Hi,

I have a question about the impact of TTL indexes. We have a system under considerable load and we plan to use TTL indexes to clean out documents from one of our collections. From the documentation it appears that the background cleanup process runs every 60 secs. Does this mean that the TTL index will be completed loaded into memory every 60 secs (and misses will cause page faults) ? I am worried that if the TTL index is large it will impact the working set of the system every 60 seconds. If anybody has any experience with this I would appreciate your input.

thanks,
Joe

Andrew Ryder

unread,
May 26, 2014, 11:13:58 PM5/26/14
to mongod...@googlegroups.com
Hi Joe!

The TTL Monitor effectively performs a query on the TTL index every 60 seconds to request the set of documents where docMember < ( timeNow - TTL ). This much of the index at least must be loaded in memory to perform the query. However, if you are modifying/inserting documents into this collection then some portion of the index will be present in memory anyway being updated to reflect your insertions/modifications.

Hopefully this answers your question.

Kind regards,
Andrew

Reply all
Reply to author
Forward
0 new messages