[SERVER-16426] d_migrate getActive() mtx is very hot Created: 05/Dec/14  Updated: 24/Jan/15  Resolved: 18/Dec/14

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.8.0-rc2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Davide Italiano Assignee: Randolph Tan
Resolution: Duplicate Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File cmdcachemutex.png    
Issue Links:
Duplicate
is duplicated by SERVER-16432 Chunk migration data structures not p... Closed
Related
is related to SERVER-16342 Top stats lock is hot Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

This shows up a lot, together with Top stats lock (see SERVER-16342), in insert only workload(s), e.g. sysbench, when the storage engine is WT.
Not sure why that code is called when mongod is run as standalone. Probably can be avoided.

Waiting Call Stack
1 of 1: 100.0% (62.142s of 62.142s)
 
mongod!lock+0x20 - mutex.hpp:154
mongod!lock+0 - locks.hpp:412
mongod!unique_lock+0 - locks.hpp:290
mongod!scoped_lock+0 - mutex.h:115
mongod!_getActive+0 - d_migrate.cpp:689
mongod!mongo::MigrateFromStatus::logOp+0x1d - d_migrate.cpp:326
mongod!mongo::logOpForSharding+0x26 - d_migrate.cpp:781
mongod!mongo::repl::logOp+0xb9 - oplog.cpp:442
mongod!singleInsert+0x1ef - batch_executor.cpp:1112
mongod!insertOne+0x195 - batch_executor.cpp:1050
mongod!mongo::WriteBatchExecutor::execOneInsert+0x5f - batch_executor.cpp:1077
mongod!mongo::WriteBatchExecutor::execInserts+0x24f - batch_executor.cpp:871
mongod!mongo::WriteBatchExecutor::bulkExecute+0x33 - batch_executor.cpp:754
mongod!mongo::WriteBatchExecutor::executeBatch+0x394 - batch_executor.cpp:262
mongod!mongo::WriteCmd::run+0x172 - write_commands.cpp:144
mongod!mongo::_execCommand+0x33 - dbcommands.cpp:1231
mongod!mongo::Command::execCommand+0xc24 - dbcommands.cpp:1445
mongod!mongo::_runCommands+0x289 - dbcommands.cpp:1520
mongod!runCommands+0x32 - find.cpp:131
mongod!mongo::runQuery+0x4a - find.cpp:527
mongod!receivedQuery+0x1e4 - instance.cpp:221
mongod!mongo::assembleResponse+0x940 - instance.cpp:391
mongod!mongo::MyMessageHandler::process+0xdf - db.cpp:194
mongod!mongo::PortMessageServer::handleIncomingMsg+0x410 - message_server_port.cpp:234
libpthread-2.18.so!start_thread+0xc2 - [Unknown]:[Unknown]
libc-2.18.so!__clone+0x6c - [Unknown]:[Unknown]

VTune output attached.



 Comments   
Comment by Randolph Tan [ 18/Dec/14 ]

Changes in SERVER-16432 made it such that MigrateFromStatus::_mutex is no longer acquired inside MigrateFromStatus::logOp unless the write is touching the ns being migrated.

Comment by Andy Schwerin [ 10/Dec/14 ]

I expect this to be fixed as a side-effect of SERVER-16432, in which Randolph will be cleaning up the synchronization rules for chunk migration data structures in mongod.

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