Granulate / gprofiler

gProfiler is a system-wide profiler, combining multiple sampling profilers to produce unified visualization of what your CPU is spending time on.
https://profiler.granulate.io
Apache License 2.0
745 stars 54 forks source link

Limit gProfiler memory & CPU usage #529

Open Jongy opened 1 year ago

Jongy commented 1 year ago

The easiest way to place a hard limit on the memory used by gProfiler, as gProfiler is a privileged app, is to use cgroups. We have such API in granulate-utils - see this file. We can use it to place gProfiler in a cgroup & set its limit to e.g 1GB to ensure we don't grow too much, e.g due to https://github.com/Granulate/gprofiler/issues/528

Jongy commented 1 year ago

The same can be applied on CPU limits

Creatone commented 1 year ago

Hello @Jongy! I am interested in working on this issue. Can I be assigned to it?

Jongy commented 1 year ago

Hi @Creatone ! You're welcome to try it :)

Let's define an MVP:

Good luck :)