Processing time and Migrations

10 views
Skip to first unread message

Kaiyi Huang

unread,
Dec 10, 2021, 10:14:26 PM12/10/21
to CloudSim Plus: Cloud Simulation Framework
Hello, I have a question regarding processing times. I have several allocation policies set up with the same environment (VM stats, Host stats, Cloudlet count) and one of them has significantly more migrations than others. However, at the end of the simulations, the total amount of time that the cloudlets spent processing as given by the getActualCpuTime function is effectively identical for all of them.

Is this because CloudSim continues processing cloudlets even while the VMs are being migrated?

Thanks,
Kaiyi

Prof. Manoel Campos

unread,
Dec 14, 2021, 7:56:40 AM12/14/21
to clouds...@googlegroups.com
Hello Kaiyi,

I think the issue is related to this one.
The CPU time just considers the time the cloudlet started and the time it finishes, while it should return the total time the CPU was used.
This has been this way since CloudSim. With lots of issues inherited from it, it's difficult for me to fix all of them.

Could you provide a minimum scenario and show the expected results and actual results?
I'll try to fix that.

Manoel Campos da Silva Filho Software Engineer

Computer Science and Engineering Ph.D. Student at University of Beira Interior (Portugal)

Professor at Federal Institute of Education, Science and Technology of Tocantins (Brazil)

http://manoelcampos.com


 about.me


--
If you received an answer that worked for you, please be kind and reply to let everybody knows it worked.
http://cloudsimplus.org
---
You received this message because you are subscribed to the Google Groups "CloudSim Plus: Cloud Simulation Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudsim-plu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudsim-plus/0d7dd870-da8f-4d34-a797-ccc42e35ca3fn%40googlegroups.com.

Kaiyi Huang

unread,
Dec 14, 2021, 2:45:16 PM12/14/21
to CloudSim Plus: Cloud Simulation Framework

Hi Manoel,

My project can be found at https://github.com/kaiyihuang/newcloudsimplussocial, and I have experienced both the symptoms described in the issue you linked, but it doesn't appear to be the same as this one.

If you run my examples included under custom (sorry for not following your advice to use CloudSim Plus as a maven link, as I did have to modify the core files a bit to get metrics), you can see that I specifically had a separate time calculation to include the amount of time a cloudlet spent in queue due to not having an appropriate VM under the constraints imposed by the project. This results in the different algorithms having different times in that regard.

However, when only the CPU times of the cloudlets are tallied up, the results for all three algorithms are nearly identical, this is in spite of the fact that one algorithm only has 21 migrations and another one has nearly 400. Logically I would expect that migrations would impact the amount of time between the cloudlet's start and finish time due to well,  being migrated, but this appears not to be the case. My hypothesis is that CloudSim is still processing the VMs while they are being migrated.

Hope that helps,
Thanks,
Kaiyi

Prof. Manoel Campos

unread,
Dec 14, 2021, 4:18:59 PM12/14/21
to clouds...@googlegroups.com

My project can be found at https://github.com/kaiyihuang/newcloudsimplussocial, and I have experienced both the symptoms described in the issue you linked, but it doesn't appear to be the same as this one.
If you run my examples included under custom (sorry for not following your advice to use CloudSim Plus as a maven link, as I did have to modify the core files a bit to get metrics), you can see that I specifically had a separate time calculation to include the amount of time a cloudlet spent in queue due to not having an appropriate VM under the constraints imposed by the project.

Please provide a minimum example in a single class that shows the issue, including just the code that matters for the context of the issue. Provide a table or image with expected and actual results.
 
 
Logically I would expect that migrations would impact the amount of time between the cloudlet's start and finish time due to well,  being migrated, but this appears not to be the case. My hypothesis is that CloudSim is still processing the VMs while they are being migrated.

In real environments, applications keep running even during VM live migration. That what happens for pre or post-copy VM migrations.
Only after the VM is copied to the target host, including its memory pages too. This way, only a small downtime is expected when the VM on the source host is stopped and connections migrated to the VM on the target host.
Since CloudSim or CloudSim Plus don't simulate low level characteristics of live VM migration, this additional overhead and downtime is not considered. That explains why you are getting the same execution time even if VMs are migrated.
In this case, it's not a bug, it's just an implementation simplification.

Implementing that would require additional research to understand exactly how these live migration algorithms work to properly simulate this overhead/downtime in the simplest way. I've researched these algorithms more than 6 years ago and I don't know their specifics anymore.

Therefore, this may be a feature to be implemented on the simulator, but unfortunately, such a feature is not a priority in the short term.
Anyway, try to create a minimum example that I check if there is some bug or small improvement I can implement, as commented in the previous message. The example must run on the official version of CloudSim Plus, so that I can check if it's a framework issue or something you introduced.

About copying CloudSim Plus code into your project, if you had to do that, probably you are doing something wrong.
If CloudSim Plus is updated to fix critical bugs or include new features, (which happens frequently), you may struggle to update your clone/fork.
 

Kaiyi Huang

unread,
Dec 14, 2021, 6:41:54 PM12/14/21
to CloudSim Plus: Cloud Simulation Framework
Hi Manoel,

Thanks for answering the question regarding VM migration and processing time, that answered my question and was the "issue" I had. It's not an issue now!

I don't think I'm actually experiencing the issue you described, or rather, not anything new. The code uses SpaceShared so cloudlets are executed one after the other, and the time that the cloudlets spend in the DatacenterBroker queue isn't computed as part of  getActualCpuTime as you described.

Reply all
Reply to author
Forward
0 new messages