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
Enable broker to destroy a VM and return the list of unfinished Cloudlets #209
Comments
The There may be different places where you can request the destruction of VMs. Give me more details and I try to think about possible approaches. |
Sure! The idea is to start simulation in sync mode and process it in a following loop: while(simulation.isRunning()) {
simulation.runFor(1.0);
// gather metrics from the simulation, e.g. the number of VMs being run
if(vmsCount > 100) {
List<Vm> idleVms = getIdleVms(simulation);
Vm toDestroy;
if(idleVms.size() > 0) {
toDestroy = idleVms.get(0);
} else {
int randomIdToDestroy = ...;
toDestroy = getVmById(simulation, randomIdToDestroy);
}
toDestroy.getHost().destroyVm(toDestroy);
} My concern is that if I call |
If you destroy a VM with running Cloudlets, that is what is expected to happen. Migrating Cloudlets (apps) to another VM is not a realistic task. We may migrate containers, not apps, since a container has everything inside (configs, dependencies, etc) and are managed as a black box, such as VMs. Maybe the proper way is to resubmit the Cloudlets to another VMs. |
@manoelcampos |
I think there is some room for optimization: e.g. instead of |
Hello @pkoperek Thanks for your contribution. I fixed lots of performance issues but for sure there is room for improvement. About the Instead of looking up for elements into the list, in rare cases (such as when parsing traces from the Google Cluster Data) the simulation just needs to traverse this list. I think that is supposed to be faster in a LinkedList than in a HashMap. |
Thanks! My concern (and idea :)) comes from a scenario with ~60k cloudlets where they were almost constantly rescheduled (a vm having a lot of cloudlets scheduled would get killed). I noticed that one of the hotspots was caused by using a list here (e.g. this forces you to iterate over it to find out which elements should be removed). |
Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
Detailed information about how the feature should work
If I understand correctly, while executing the simulation, a VM can be only removed by calling
DatacenterBrokerAbstract.requestIdleVmDestruction
. This requires the VM to not have any Cloudlet on the exec list.To enable more rich interaction with simulation environment, I would like to be able to destroy a VM (even if it is currently processing Cloudlets). The cloudlets could be either cancelled (and the caller would have to manually re-submit them) or could be re-scheduled on another VM internally.
Tbh I'm not sure what would be the best solution here.
An example scenario where this feature should be used
I would like to be able to deploy an autonomous agent (which is supposed to manage the resources of the cloud) - in the simplest scenario it could just adjust the number of VMs running.
A brief explanation of why you think this feature is useful
This would be very useful for implementation of a simulation environment for autonomous agents, in which they could interact with the environment directly.
Examples Available
The text was updated successfully, but these errors were encountered: