[SERVER-23069] Improve tcmalloc freelist statistics Created: 10/Mar/16  Updated: 20/Nov/16  Resolved: 25/Mar/16

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: 3.3.2
Fix Version/s: 3.2.9, 3.3.4

Type: Improvement Priority: Major - P3
Reporter: Kyle Suarez Assignee: Kyle Suarez
Resolution: Done Votes: 0
Labels: code-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-23594 Add option to specify TCMalloc statis... Closed
is related to SERVER-22906 MongoD uses excessive memory over and... Closed
is related to SERVER-20306 75% excess memory usage under WiredTi... Closed
Backwards Compatibility: Fully Compatible
Backport Completed:
Sprint: Integration 11 (03/14/16), Integration 12 (04/04/16)
Participants:

 Description   

TCMalloc doesn't give detailed statistics on the state of the freelist, which makes it difficult to analyze severe memory fragmentations like those in SERVER-22906 or SERVER-20306.

Improve the TCMalloc serverStatus() output by traversing the freelists for the different size classes, giving us more information. Add a new function in TCMalloc that exposes these statistics efficiently, allowing us to create a BSON object out of them rather than returning a text blob that cannot be parsed.

See also: https://github.com/gperftools/gperftools/issues/727



 Comments   
Comment by Githook User [ 18/Jul/16 ]

Author:

{u'username': u'ksuarz', u'name': u'Kyle Suarez', u'email': u'ksuarz@gmail.com'}

Message: SERVER-23069 improve tcmalloc freelist stats

Walks the size classes in TCMalloc's central freelist, exposing interesting
statistics via a callback.

serverStatus() now includes this information in lieu of the TCMalloc dump stats
text block.

(cherry picked from commit a1d9d2251734bc4077255ae33e17f5a210697839)
Branch: v3.2
https://github.com/mongodb/mongo/commit/475099387db16d73f5113aa7ef6b28e5e71bc3f9

Comment by Githook User [ 25/Mar/16 ]

Author:

{u'username': u'ksuarz', u'name': u'Kyle Suarez', u'email': u'ksuarz@gmail.com'}

Message: SERVER-23069 improve tcmalloc freelist stats

Walks the size classes in TCMalloc's central freelist, exposing interesting
statistics via a callback.

serverStatus() now includes this information in lieu of the TCMalloc dump stats
text block.
Branch: master
https://github.com/mongodb/mongo/commit/a1d9d2251734bc4077255ae33e17f5a210697839

Comment by Githook User [ 25/Mar/16 ]

Author:

{u'username': u'ksuarz', u'name': u'Kyle Suarez', u'email': u'ksuarz@gmail.com'}

Message: SERVER-23069 improve tcmalloc freelist stats

Walks the size classes in TCMalloc's central freelist, exposing interesting
statistics via a callback.

serverStatus() now includes this information in lieu of the TCMalloc dump stats
text block.
Branch: memstats
https://github.com/mongodb/mongo/commit/a1d9d2251734bc4077255ae33e17f5a210697839

Comment by Kyle Suarez [ 24/Mar/16 ]

Pull request upstream to gperftools: https://github.com/gperftools/gperftools/pull/785

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