[SERVER-45932] TaskExecutorPool wrong core count Created: 03/Feb/20  Updated: 29/Oct/23  Resolved: 07/Feb/20

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.3.4

Type: Improvement Priority: Minor - P4
Reporter: Billy Donahue Assignee: Amirsaman Memaripour
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2020-02-10
Participants:

 Description   

Feels like TaskExecutorPool should be looking at getNumAvailableCores, which would be less than getNumCores in a vCPU-restricted container.

size_t TaskExecutorPool::getSuggestedPoolSize() {
 auto poolSize = taskExecutorPoolSize.load();
 if (poolSize > 0) {
 return poolSize;
 }
ProcessInfo p;
 unsigned numCores = p.getNumCores();
// Never suggest a number outside the range [4, 64].
 return std::max(4U, std::min(64U, numCores));
}
 

 

 



 Comments   
Comment by Githook User [ 07/Feb/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@10gen.com'}

Message: SERVER-45932 Use getNumAvailableCores() in TaskExecutorPool
Branch: master
https://github.com/mongodb/mongo/commit/592bb96b9cd7c00b8741afaec23152ec7adc4909

Generated at Thu Feb 08 05:10:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.