-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Virtual memory and BW oversubscription implementation: when a Cloudlet requests more RAM or BW than there is available, its execution should be delayed #170
Comments
hello, I hope that when the task does not have enough resources, it will stop and wait for the resources to be released like the PES. |
Usually, you can't stop an app due to lack of RAM if you have virtual memory enabled, which all regular operating systems have. Unless your app is requesting a huge amount of memory, it must not stop. If the app starts to use virtual memory (disk), that one is much slower than primary memory (RAM). That is why apps should be delayed in such situations. |
Redesign Host storage to use an actual HarddriveStorage instead of just a Storage (which is now called SimpleStorage). This way, we can define disk parameters such as reading speed that is considered when virtual memory is required by Cloudlets running inside a VM on the Host. The FileStorage interface implemented by HarddriveStorage is now simpler, since we don't want to simulate individual file storage for hard drive, only for SanStorage. Adds new Host constructor to accept a HarddriveStorage instead of a long for defining the storage device. Since VM and Host have different storage devices now (SimpleStorage and HarddriveStorage, respectively), the AbstractMachine interface now is generic, to indicate the kind of storage to be used by subclasses. Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
to check the processing delay caused by the use of Virtual Memory after closing #170 Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
- Introduces cloudlet processing delay when a cloudlet requires more RAM than there is freely available. - As a simplification, there is no pre-defined swap partition to define the maximum amount of virtual memory to use. The virtual memory required just needs to be smaller than the RAM capacity. - Updates used VM resources for each processed cloudlet, instead of iterating over the cloudlets execution list at the end of the updateProcessing method. This improves simulation performance and accuracy, since for each processed cloudlet, VM resource utilization is updated right-away. Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
Finished implementation in PR #312. Check available example in the issue description above. |
Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
Redesign Host storage to use an actual HarddriveStorage instead of just a Storage (which is now called SimpleStorage). This way, we can define disk parameters such as reading speed that is considered when virtual memory is required by Cloudlets running inside a VM on the Host. The FileStorage interface implemented by HarddriveStorage is now simpler, since we don't want to simulate individual file storage for hard drive, only for SanStorage. Adds new Host constructor to accept a HarddriveStorage instead of a long for defining the storage device. Since VM and Host have different storage devices now (SimpleStorage and HarddriveStorage, respectively), the AbstractMachine interface now is generic, to indicate the kind of storage to be used by subclasses. Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
After implementing virtual memory and BW over-subscription (#170), if a Cloudlet request more RAM or BW than there is available, its execution is delayed. Since the example was making all cloudlets inside a VM to request 100% of RAM and BW, some of them won't get any RAM or BW to execute, causing wrong execution times. In such a case, a different UtilizationModel such as the UtilizationModelDynamic should be created for RAM and BW, indicating that concurrent cloudlets will use only a fraction of those resources. Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
An
UtilizationModel
defines how aCloudlet
will useVm
's RAM. When aCloudlet
requests more RAM than theVm
has available at the moment, it's shown a warning message, but theCloudlet
execution finishes at the expected time.Virtual Memory
In operating systems, when this situation happens, the OS uses virtual memory to swap data belonging to idle processes from the RAM to the disk. This opens up RAM space for the requesting application. However, since the disk is a very slow device compared to RAM, this swapping process will slow down application execution, since the app will have to wait for the SO to perform this process and then allocate the requested memory.
CloudSim Plus has classes such as
HarddriveStorage
that simulates an HD/SSD and enables defining some parameters, namely: transfer rate, seek time and latency time. Using such devices from a Host, we could delay the execution of the Cloudlet when it requests more RAM than there is available.This way, instead of just printing a warning message informing that there isn't enough RAM, we could print a message informing that virtual memory will be used and delay Cloudlet's execution.
If the cloudlet also requires a given amount of BW which isn't available, just the available amount is allocated, but that should delay the cloudlet processing too.
For instance, if the required bandwidth is 10mbps, that means the cloudlet is willing to transfer 10 mbits in one second. If just 8 mbps is allocated to the cloudlet, to transfer the same 10 mbits it will take 0,25 second more.
BW oversubscription
Concerning BW allocation, when a Cloudlets requests more BW than there is available, only the capacity available will be allocated, which must slow down cloudlet data transfer and consequently, increase cloudlet finish time. Consider the following table with sample data:
The additional delay should be computed as
required/allocated - 1
and the total transfer time as1 + additional delay
.A brief explanation of why you think this feature is useful
This will enable more accurate and realistic simulations.
References
Examples
The text was updated successfully, but these errors were encountered: