Skip to content

feat: add a function to get number of logical cpu cores #4879

@Lloyd-Pottiger

Description

@Lloyd-Pottiger

Feature Request

Is your feature request related to a problem? Please describe:

Now we can only get number of physical cpu cores by dbms/src/Common/getNumberOfPhysicalCPUCores.cpp.

  1. getNumberOfPhysicalCPUCores() will return number of logical cpu cores in some cases which is misleading.
  2. In most cases, number of logical cpu cores matters rather than physical cpu cores especially in cloud env.

Describe the feature you'd like:

Add a function to get number of logical cpu cores which support different env like docker/k8s, cgroup subsystem.

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

Metadata

Metadata

Labels

type/feature-requestCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions