Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reporting] calculation of CPU utilization seems wrong in Ubuntu Linux #118273

Closed
tsullivan opened this issue Nov 11, 2021 · 3 comments
Closed

[Reporting] calculation of CPU utilization seems wrong in Ubuntu Linux #118273

tsullivan opened this issue Nov 11, 2021 · 3 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Reporting:Screenshot Reporting issues pertaining to PNG/PDF file export good first issue low hanging fruit impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:medium Medium Level of Effort old Used to help sort old issues on GH Projects which don't support the Created search term. Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)

Comments

@tsullivan
Copy link
Member

tsullivan commented Nov 11, 2021

Kibana version: 7.16

Ubuntu/Focal

When running tests in an Ubuntu VM that has 1 CPU, the PNG/PDF report execution logs show CPU is always 0:

{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T01:33:39.791+00:00","message":"Chromium consumed CPU 0% Memory 65.48MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvua1hwf01ra8f5fe5bzs65u.browser-driver"},"process":{"pid":2278}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T01:34:14.757+00:00","message":"Chromium consumed CPU 0% Memory 64.48MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvua1jtj01ra8f5fe53j900z.browser-driver"},"process":{"pid":2278}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T01:58:35.006+00:00","message":"Chromium consumed CPU 0% Memory 65.23MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuaxkyq00zx8f5fe5btyrbo.browser-driver"},"process":{"pid":1293}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T01:59:08.974+00:00","message":"Chromium consumed CPU 0% Memory 64.23MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuaxm9g00zx8f5fe56kr6ao.browser-driver"},"process":{"pid":1293}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T01:59:43.081+00:00","message":"Chromium consumed CPU 0% Memory 67.23MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuaxmca00zx8f5fe588z0a8.browser-driver"},"process":{"pid":1293}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T02:00:18.766+00:00","message":"Chromium consumed CPU 0% Memory 66.73MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuaxmss00zx8f5fe51jfqme.browser-driver"},"process":{"pid":1293}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T02:00:52.483+00:00","message":"Chromium consumed CPU 0% Memory 64.23MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuaxmzt00zx8f5fe55qdsxw.browser-driver"},"process":{"pid":1293}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T02:01:20.642+00:00","message":"Chromium consumed CPU 0% Memory 67.73MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuaxna000zx8f5fe5bshlnu.browser-driver"},"process":{"pid":1293}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T02:02:07.757+00:00","message":"Chromium consumed CPU 0% Memory 66.73MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuaxnks00zx8f5fe51o37t2.browser-driver"},"process":{"pid":1293}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T02:02:36.512+00:00","message":"Chromium consumed CPU 0% Memory 70.23MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuaxnwy00zx8f5fe58wujt6.browser-driver"},"process":{"pid":1293}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T02:03:31.496+00:00","message":"Chromium consumed CPU 0% Memory 66.23MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuaxo9v00zx8f5fe502a1hx.browser-driver"},"process":{"pid":1293}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T02:04:10.130+00:00","message":"Chromium consumed CPU 0% Memory 65.23MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuaxom400zx8f5fe57cxagc.browser-driver"},"process":{"pid":1293}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T02:04:48.849+00:00","message":"Chromium consumed CPU 0% Memory 68.23MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuaxoz200zx8f5fe5f2fg5j.browser-driver"},"process":{"pid":1293}}

This seems wrong as these tests shows the event loop blocking behavior filed here: #118260

CentOS/8.1

The same setup in CentOS 8.1 shows more reasonable CPU utilization numbers.

{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T01:49:56.248+00:00","message":"Chromium consumed CPU 33.24% Memory 65.23MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuamdto026t8f5fe532be2h.browser-driver"},"process":{"pid":2837}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T01:50:28.860+00:00","message":"Chromium consumed CPU 41.56% Memory 65.48MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuamenk026t8f5fe54bgo50.browser-driver"},"process":{"pid":2837}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T01:51:12.961+00:00","message":"Chromium consumed CPU 33.24% Memory 58.23MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuamfls026t8f5fe585sn82.browser-driver"},"process":{"pid":2837}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T01:51:45.280+00:00","message":"Chromium consumed CPU 43.56% Memory 64.98MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuamgjc026t8f5fe5blqbdz.browser-driver"},"process":{"pid":2837}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T01:52:32.402+00:00","message":"Chromium consumed CPU 35.06% Memory 64.23MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuamhos026t8f5fe536y95k.browser-driver"},"process":{"pid":2837}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T01:53:02.788+00:00","message":"Chromium consumed CPU 45.17% Memory 64.98MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuamj2n026t8f5fe5gc85dw.browser-driver"},"process":{"pid":2837}}
{"ecs":{"version":"8.0.0"},"@timestamp":"2021-11-11T01:53:50.568+00:00","message":"Chromium consumed CPU 33.15% Memory 64.48MB","log":{"level":"DEBUG","logger":"plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.kvuaml9v026t8f5fe5dwa5ft.browser-driver"},"process":{"pid":2837}}

Both of the systems have 1 CPU, but slightly different memory available.

Vagrant file: https://github.com/tsullivan/vagrant/blob/8.1.0/Vagrantfile

@tsullivan tsullivan added the bug Fixes for quality problems that affect the customer experience label Nov 11, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 11, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServicesUx)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Nov 11, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:small Small Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:medium Medium Level of Effort and removed impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:small Small Level of Effort labels Nov 23, 2021
@petrklapka petrklapka added (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Team:AppServicesSv Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) and removed Team:AppServicesUx labels Oct 24, 2022
@tsullivan tsullivan added Feature:Reporting:Screenshot Reporting issues pertaining to PNG/PDF file export and removed (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead labels Aug 1, 2024
@petrklapka petrklapka added the good first issue low hanging fruit label Sep 23, 2024
@petrklapka
Copy link
Member

This is calculated by Chromium api call. Since this goes back to 7.16, this may not even be valid any more. Investigate if it still happens as a first issue and report back findings!

@petrklapka petrklapka added the old Used to help sort old issues on GH Projects which don't support the Created search term. label Sep 25, 2024
@tsullivan
Copy link
Member Author

Looks like this is no longer happening. I am viewing logs from Kibana 8.14 running in Linux Ubuntu 20.04 (Kubernetes) and the CPU calculation looks fine.

[2024-09-25T01:31:25.068+00:00][DEBUG][plugins.reporting.pdf-export-v2.execute-job:b5c71a49-b676-47e8-94b3-79fdf715e4aa.screenshotting.browser-driver] Chromium consumed CPU 0.59% Memory 44.31MB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Reporting:Screenshot Reporting issues pertaining to PNG/PDF file export good first issue low hanging fruit impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:medium Medium Level of Effort old Used to help sort old issues on GH Projects which don't support the Created search term. Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)
Projects
None yet
Development

No branches or pull requests

3 participants