[SERVER-20668] Index hash map outside of the lock Created: 28/Sep/15  Updated: 15/Oct/15  Resolved: 08/Oct/15

Status: Closed
Project: Core Server
Component/s: Diagnostics, Performance
Affects Version/s: None
Fix Version/s: 3.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Martin Bligh Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: QuInt A (10/12/15)
Participants:

 Description   

Things like Top use a global lock to index into a hash map and increment two counters - most of the work inside that lock is doing the hash calculation, and removing it gives us 10% more perf on insert (writecmd path, 32 threads)

So we believe that doing the hash calc outside the lock would be a significant performance boost for every operation for larger servers.



 Comments   
Comment by Githook User [ 08/Oct/15 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-20668 Support prehashing StringMap keys

This allows computing the hash outside of a mutex guarding the StringMap.
This commit applies this optimization in Top::record().
Branch: master
https://github.com/mongodb/mongo/commit/804ad14001e1a58538974a327e9943c338fd0925

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