How can I add more than one VM if overloading in CloudSim Plus?
I am trying to do horizontal auto-scaling in the CloudSim Plus simulator. I need to scale up the application by more than one VM. I am trying to modify the example LoadBalancerByHorizontalVmScalingExample provided by CloudSim Plus.
The example has a setVmSupplier()
function which has a createVm()
parameter which returns only one VM. Moreover, the setVmSupplier()
function accepts only one VM and not a list of VMs. I am not able to modify the function even in the superclass. How can I provide more than one VM?
java cloud cloudsim
add a comment |
I am trying to do horizontal auto-scaling in the CloudSim Plus simulator. I need to scale up the application by more than one VM. I am trying to modify the example LoadBalancerByHorizontalVmScalingExample provided by CloudSim Plus.
The example has a setVmSupplier()
function which has a createVm()
parameter which returns only one VM. Moreover, the setVmSupplier()
function accepts only one VM and not a list of VMs. I am not able to modify the function even in the superclass. How can I provide more than one VM?
java cloud cloudsim
add a comment |
I am trying to do horizontal auto-scaling in the CloudSim Plus simulator. I need to scale up the application by more than one VM. I am trying to modify the example LoadBalancerByHorizontalVmScalingExample provided by CloudSim Plus.
The example has a setVmSupplier()
function which has a createVm()
parameter which returns only one VM. Moreover, the setVmSupplier()
function accepts only one VM and not a list of VMs. I am not able to modify the function even in the superclass. How can I provide more than one VM?
java cloud cloudsim
I am trying to do horizontal auto-scaling in the CloudSim Plus simulator. I need to scale up the application by more than one VM. I am trying to modify the example LoadBalancerByHorizontalVmScalingExample provided by CloudSim Plus.
The example has a setVmSupplier()
function which has a createVm()
parameter which returns only one VM. Moreover, the setVmSupplier()
function accepts only one VM and not a list of VMs. I am not able to modify the function even in the superclass. How can I provide more than one VM?
java cloud cloudsim
java cloud cloudsim
edited Nov 21 '18 at 9:45
honk
4,887114349
4,887114349
asked Nov 20 '18 at 23:27
Manasi PatilManasi Patil
11
11
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You don't have to make the VmSupplier return a list of VMs.
If you need that more than one VM is created, you just need to ensure
the isVmOverloaded method in the mentioned example contains a condition that will remain true after being called in different times.
If at the time the VM is checked it is still overloaded, the HorizontalVmScaling object will call the VmSupplier function to create a new VM. This is how you ensure that multiple VMs are created to balance the load.
If the answer was helpful, please upvote and give us a star for CloudSim Plus at http://github.com/manoelcampos/cloudsim-plus
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53403155%2fhow-can-i-add-more-than-one-vm-if-overloading-in-cloudsim-plus%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You don't have to make the VmSupplier return a list of VMs.
If you need that more than one VM is created, you just need to ensure
the isVmOverloaded method in the mentioned example contains a condition that will remain true after being called in different times.
If at the time the VM is checked it is still overloaded, the HorizontalVmScaling object will call the VmSupplier function to create a new VM. This is how you ensure that multiple VMs are created to balance the load.
If the answer was helpful, please upvote and give us a star for CloudSim Plus at http://github.com/manoelcampos/cloudsim-plus
add a comment |
You don't have to make the VmSupplier return a list of VMs.
If you need that more than one VM is created, you just need to ensure
the isVmOverloaded method in the mentioned example contains a condition that will remain true after being called in different times.
If at the time the VM is checked it is still overloaded, the HorizontalVmScaling object will call the VmSupplier function to create a new VM. This is how you ensure that multiple VMs are created to balance the load.
If the answer was helpful, please upvote and give us a star for CloudSim Plus at http://github.com/manoelcampos/cloudsim-plus
add a comment |
You don't have to make the VmSupplier return a list of VMs.
If you need that more than one VM is created, you just need to ensure
the isVmOverloaded method in the mentioned example contains a condition that will remain true after being called in different times.
If at the time the VM is checked it is still overloaded, the HorizontalVmScaling object will call the VmSupplier function to create a new VM. This is how you ensure that multiple VMs are created to balance the load.
If the answer was helpful, please upvote and give us a star for CloudSim Plus at http://github.com/manoelcampos/cloudsim-plus
You don't have to make the VmSupplier return a list of VMs.
If you need that more than one VM is created, you just need to ensure
the isVmOverloaded method in the mentioned example contains a condition that will remain true after being called in different times.
If at the time the VM is checked it is still overloaded, the HorizontalVmScaling object will call the VmSupplier function to create a new VM. This is how you ensure that multiple VMs are created to balance the load.
If the answer was helpful, please upvote and give us a star for CloudSim Plus at http://github.com/manoelcampos/cloudsim-plus
edited Feb 12 at 21:19
answered Dec 7 '18 at 11:33
Manoel CamposManoel Campos
16029
16029
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53403155%2fhow-can-i-add-more-than-one-vm-if-overloading-in-cloudsim-plus%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown