-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MB-49382 (7.1.0 2012) Indexer use cgroups CPU and mem info when enabled
1. cpu_throttle.go should use cgroup CPU usage stats when cgroups are supported. This is so the usage is correctly calculated against the number of CPUs allocated to the cgroup rather than the whole node. If not supported fall back to the standard algorithm of CPU ticks in different categories that is collected for the whole node. 2. Indexer set number of CPUs to min(node, cgroup, GSI) available CPUs, where cgroup is sigar num_cpu_prc when cgroups are supported and GSI is config value indexer.settings.max_cpu_percent (exposed on UI as Advanced Index Settings / Indexer Threads). 3. Log message to console if, in #2, GSI > min(node, cgroup) and use the latter instead. 4. planner/proxy.go RetrievePlanFromCluster was calling getIndexSettings() to set CpuQuota based on runtime.NumCPUs() and indexer.settings.max_cpu_percent, but the code in that method was incorrect. Replaced with a call to runtime.GOMAXPROCS(0) which will now get the logical min(node, cgroup, GSI) per #2 above. (Note that CpuQuota is not used in Planner anyway -- its enforcement is commented out in planner/planner.go Validate().) This changes eliminates REST calls to all remote indexer nodes and a use of ClusterInfoCache. 5. Replace direct lookup of indexer.settings.memory_quota with new Config.GetIndexerMemoryQuota() method that takes cgroup setting into account (sigar memory_max) if cgroups are supported. Change-Id: I3c906070d78ba51888a6c07c7dd05959fba9b27b
- Loading branch information
1 parent
4b83dc9
commit 8351d36
Showing
10 changed files
with
277 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.