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

Confusing ways to enable state and utilization histories #177

Open
manoelcampos opened this issue Apr 5, 2019 · 4 comments
Open

Confusing ways to enable state and utilization histories #177

manoelcampos opened this issue Apr 5, 2019 · 4 comments
Labels
design Project's design improvement enhancement good-first-issue A good issue to start contributing to the project resource-utilization Features related to the utilization of resources by a Host, VM or Cloudlet

Comments

@manoelcampos
Copy link
Collaborator

manoelcampos commented Apr 5, 2019

Host's state history stores data about CPU utilization and allocated and requested MIPS. The host.getStateHistory() method just returns a List containing the data. If the user wants to compute some statistics, he/she has to do it manually.
On the other hand, Host's utilization history stores only CPU utilization. The host.getUtilizationHistory() method returns a map of DoubleSummaryStatistics that enables automatically computing several statistics (such as mean and sum).

Since usually this data is collected but not used, the researcher needs to enable the storage of such data. To enable Host's state history, one has to call host.enableStateHistory(). This way, the Host will collect the data and from the VM's state history.
To enable Host's utilization history, one has to call vm.getUtilizationHistory().enable(). This way, VMs will collect and store the data that is used by the Host.

As can be seen, the way to enable, store and compute both histories is different and confusing.
At least the way to enable both histories have to be consistent.

Detailed information about how the feature should work

Both state and utilization histories could be enabled directly on the Hosts, instead of on being enabled on the Hosts and the other on the VMs.

A brief explanation of why you think this feature is useful

Consistency in how to use state history and utilization history will avoid confusing the researchers.

@manoelcampos manoelcampos added enhancement resource-utilization Features related to the utilization of resources by a Host, VM or Cloudlet labels Apr 5, 2019
@manoelcampos manoelcampos changed the title Confusing way to enable state history and utilization history Confusing way to enable state and utilization histories Apr 5, 2019
@manoelcampos manoelcampos added the design Project's design improvement label May 9, 2019
@manoelcampos manoelcampos added the good-first-issue A good issue to start contributing to the project label May 18, 2019
@manoelcampos manoelcampos changed the title Confusing way to enable state and utilization histories Confusing ways to enable state and utilization histories Jun 3, 2019
@manoelcampos
Copy link
Collaborator Author

State and utilization history should not be stored be the framework. This has to be a user's decision. This way, such features should be removed

@Qomolang
Copy link

I beg your twice thinking about keeping such features by framework, they are very important in prediction-based work.
If you decided to remove these features, I wonder whether there would be an example for how to keep the history by user himself

@Qomolang
Copy link

Qomolang commented Feb 3, 2022

State and utilization history should not be stored be the framework. This has to be a user's decision. This way, such features should be removed

In fact, vm.getUtilizationHistory() has been removed, can I get the utilization history of vm for now? @manoelcampos

@manoelcampos
Copy link
Collaborator Author

manoelcampos commented Feb 3, 2022

I beg your twice thinking about keeping such features by framework, they are very important in prediction-based work.
If you decided to remove these features, I wonder whether there would be an example for how to keep the history by user himself

I understand collecting data is useful. I personally do this in my own projects. However, the format and way each researcher needs to collect and store this data is usually different. The framework should not impose how and when these data is collected. That is why such features will be removed in the future. I'll make sure to provide some examples for that.

If you want, for instance, collect CPU utilisation for each Host, you can keep a Map<Host, List<Double>> to store such a data, or a Map<Host, DoubleSummaryStatistics> that largely reduces memory utilization (since individual samples are not stored) and provides lots of statistical methods (such as mean and standard deviation).

Where and when to collect such a data is up to you. You can do it in lots of different ways. For instance, you can set a datacenter scheduling interval and create a OnClockTick Listener to collect that data periodically.

In fact, vm.getUtilizationHistory() has been removed, can I get the utilization history of vm for now? @manoelcampos

It was just renamed for clarity to vm.getCpuUtilizationStats(). Check VmsCpuUsageExample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Project's design improvement enhancement good-first-issue A good issue to start contributing to the project resource-utilization Features related to the utilization of resources by a Host, VM or Cloudlet
Projects
None yet
Development

No branches or pull requests

2 participants