8000 fix(vm): cpu usage/idle handled by single worker by JimMoen · Pull Request #12663 · emqx/emqx · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@JimMoen
Copy link
Member
@JimMoen JimMoen commented Mar 7, 2024

Fixes https://emqx.atlassian.net/browse/EMQX-11897

Release version: v/e5.6.0

Summary

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Added property-based tests for code which performs user input validation
  • Changed lines covered in coverage report
  • Change log has been added to changes/(ce|ee)/(feat|perf|fix|breaking)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • Created PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • [ ] If changed package build workflow, pass this action (manual trigger)
  • [ ] Change log has been added to changes/ dir for user-facing artifacts update

@JimMoen JimMoen requested review from a team and lafirest as code owners March 7, 2024 10:19
@JimMoen JimMoen changed the title Emqx 11897/fix cpu usage/api fix(vm): cpu usage/idle handled by single worker Mar 7, 2024
@JimMoen JimMoen force-pushed the EMQX-11897/fix-cpu-usage/api branch from 8c871e1 to 230c491 Compare March 8, 2024 07:19
@JimMoen JimMoen force-pushed the EMQX-11897/fix-cpu-usage/api branch from 230c491 to b42922b Compare March 11, 2024 07:32
CPUHighWatermark = emqx:get_config([sysmon, os, cpu_high_watermark]) * 100,
CPULowWatermark = emqx:get_config([sysmon, os, cpu_low_watermark]) * 100,
CPUVal = emqx_vm:cpu_util(),
CPUVal = cpu_sup:util(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change? for accuracy?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cpu_sup:util/0 will be called in single gen_server emqx_os_mon, no need to warp it in emqx_cpu_sup_worker process.

qzhuyan
qzhuyan previously approved these changes Mar 11, 2024
@JimMoen JimMoen merged commit 20cd47a into emqx:release-56 Mar 12, 2024
@JimMoen JimMoen deleted the EMQX-11897/fix-cpu-usage/api branch March 12, 2024 17:28
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.

3 participants

0