Skip to content

Conversation

@brinkcoder
Copy link

When adding the numastats collector to our instance, we encountered the following error: METRICDATA/CCMS > TODO: unhandled case: native-scope=memoryDomain, requested-scope=socket. To address this, we added the GetMemoryDomainsBySocket function to cluster.go, which resolves the issue.

While reviewing cluster.go, we noticed triple-nested loops accompanied by comments such as TODO: Optimize this, there must be a more efficient way/algorithm. This PR introduces that optimization.

We implemented a topology mapping for each cluster and subcluster, which is initialized and cached in memory. This allows buildQueries and buildNodeQueries to perform simple lookups instead of iterating over every HWThread. After running this change in our environment for one week, we observed no error messages in the logs. However, we’d appreciate it if the maintainers could review this to ensure we haven’t inadvertently introduced any issues.

add memoryDomain to graph query and fix typo for scope granularity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant