golemfactory / yagna

An open platform and marketplace for distributed computations
GNU General Public License v3.0
387 stars 61 forks source link

[Requestor Dashboard] Make it possible to monitor memory usage of an activity #2873

Open cryptobench opened 11 months ago

cryptobench commented 11 months ago

Background

During the recent cooldown sprint I started creating a Yagna artifact dashboard which would give the user the ability to visually browse what's going on with their requestor. This however resulted in the discovery that the REST API is lacking endpoints that are useful for not only this topic alone.

What

In the dashboard we would like to have the ability to view the current memory usage of a running activity. Right now we are able to display the amount of CPU usage, but memory is still missing which will help shape a more complete picture of whats going on inside the provider. Alongside this, we would of course also need a way within the REST API to query this type of data.

In a meeting with Witek and Reqc we were informed that this required probably a bit of changes to the ExeUnit so that it actively queries the current usage inside the vm and not just display a flat line containing the allocated amount of memory to the VM.

Here's a reference image of what was envisioned

image
nieznanysprawiciel commented 11 months ago

Usage counters can be queried using this endpoint: https://github.com/golemfactory/ya-client/blob/2bb679e3bb1d61eddd713d7f19ee127595f27162/specs/activity-api.yaml#L334