Skip to content

[supervisor] track cpu/memory usage analytics#12680

Merged
roboquat merged 1 commit into
mainfrom
ak/perf_anayltics
Sep 7, 2022
Merged

[supervisor] track cpu/memory usage analytics#12680
roboquat merged 1 commit into
mainfrom
ak/perf_anayltics

Conversation

@akosyakov

@akosyakov akosyakov commented Sep 6, 2022

Copy link
Copy Markdown
Member

Description

This PR adds analytics to track cpu and memory consumption by individual workspace instances. It adds 2 new events gitpod_cpu_changed and gitpod_memory_changed correspondingly. Each event has buckets property and reported whenever a workspace instance hit higher bucket.

  • CPU buckets: 1, 2, 3, 4, 5, 6 CPUs
  • Memory buckets: 1, 2, 4, 8, 16 Gb

It will allow us to segment users by perf requirements and also correlate with other event like active language to see requirements from different languages. Mixpanel is capable to breakdown arrays to individual properties. I've verified it with IDE lab project.

Related Issue(s)

Fixes #

How to test

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview
  • /werft analytics=segment|TEZnsG4QbLSxLfHfNieLYGF4cDwyFWoe

@akosyakov

akosyakov commented Sep 6, 2022

Copy link
Copy Markdown
Member Author

/werft run

👍 started the job as gitpod-build-ak-perf-anayltics.2
(with .werft/ from main)

@roboquat roboquat added size/L and removed size/M labels Sep 6, 2022
@akosyakov
akosyakov marked this pull request as ready for review September 6, 2022 11:54
@akosyakov
akosyakov requested a review from a team September 6, 2022 11:54
@akosyakov akosyakov changed the title [supervisor] track cpu/memory buckets [supervisor] track cpu/memory usage analytics Sep 6, 2022
@akosyakov

akosyakov commented Sep 6, 2022

Copy link
Copy Markdown
Member Author

/werft run

👍 started the job as gitpod-build-ak-perf-anayltics.5
(with .werft/ from main)

@akosyakov akosyakov self-assigned this Sep 6, 2022
@akosyakov

akosyakov commented Sep 6, 2022

Copy link
Copy Markdown
Member Author

/werft run with-clean-slate-deployment=true

👍 started the job as gitpod-build-ak-perf-anayltics.6
(with .werft/ from main)

@akosyakov

akosyakov commented Sep 6, 2022

Copy link
Copy Markdown
Member Author

/werft run with-clean-slate-deployment=true

👍 started the job as gitpod-build-ak-perf-anayltics.7
(with .werft/ from main)

@andreafalzetti

andreafalzetti commented Sep 6, 2022

Copy link
Copy Markdown
Contributor

I took down the prev env (too much memory usage testing) 🤦‍♂️

/werft run

👍 started the job as gitpod-build-ak-perf-anayltics.8
(with .werft/ from main)

@andreafalzetti

andreafalzetti commented Sep 6, 2022

Copy link
Copy Markdown
Contributor

the prev env is back now, but werft failed so I am trying with:

/werft run with-clean-slate-deployment=true

👍 started the job as gitpod-build-ak-perf-anayltics.9
(with .werft/ from main)

@andreafalzetti andreafalzetti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code changes LGTM 🍪

I've tested it and it works as advertised. I was able to get the CPU to hit the biggest bucket and the reporting worked quite well.

Screenshot 2022-09-06 at 21 26 15

For the memory I also tried to stress it to see reports and I saw up to 4GB, and saw no more reporting but I think it's due to my approach for stressing the memory which is too agressive, I think: cat /dev/zero | head -c 5G | tail, and it basically very quickly kills the workspace.

If you have another way to consume more memory, I am interested to know.

/hold

in case someone wants to review/test further

@mustard-mh

Copy link
Copy Markdown
Contributor

If you have another way to consume more memory, I am interested to know.

Files in /tmp folder will calc as workspace's MEM, you can generate big files here. @andreafalzetti

@akosyakov

Copy link
Copy Markdown
Member Author

/unhold

@roboquat
roboquat merged commit 4425cc6 into main Sep 7, 2022
@roboquat
roboquat deleted the ak/perf_anayltics branch September 7, 2022 07:17
@roboquat roboquat added the deployed: IDE IDE change is running in production label Sep 7, 2022
@roboquat roboquat added the deployed Change is completely running in production label Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deployed: IDE IDE change is running in production deployed Change is completely running in production release-note-none size/L team: IDE

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants