Repository navigation
Update to the CloudSim Plus 9 Processor API (cloudsimplus#595) - #39
Merged
Merged
Conversation
3 tasks
- Hosts and VMs are created with a CoreCapacity instead of a List<Pe> and (mips, pes) arguments. - A single immutable CoreCapacity is reused for all Hosts/VMs with the same capacity, documenting why that is safe. - getPesNumber()/getMips() on Hosts and VMs use the machine Processor. - Cloudlet.getPesNumber() is now getRequiredCores(). - PeVerticalScaling methods are now CpuVerticalScaling ones. - Rename *_PES constants to *_CORES. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
manoelcampos
force-pushed
the
592-core-capacity
branch
from
October 25, 2026 00:31
4760512 to
aeba154
Compare
8 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the project to the CloudSim Plus API changed by cloudsimplus/cloudsimplus#595 (#592), which replaced the
List<Pe>of Hosts and VMs with a singleProcessorinstance (containing the number of cores and MIPS capacity).Changes
new HostSimple(ram, bw, storage, peList)with aList<Pe>ofPeSimpleobjectsnew HostSimple(ram, bw, storage, new CoreCapacity(cores, mips))new VmSimple(mips, pes),new VmSimple(id, mips, pes)new VmSimple(new CoreCapacity(cores, mips)),new VmSimple(id, new CoreCapacity(cores, mips))host/vm.getPesNumber(),host/vm.getMips()getProcessor().getCores(),getProcessor().getMips()cloudlet.getPesNumber()cloudlet.getRequiredCores()*_PESconstants*_COREShost.getTotalAllocatedMips()host.getVmScheduler().getTotalAllocatedMips()vm.get/setPeVerticalScaling()get/setCpuVerticalScaling()Helper methods that only built PE lists (such as
createPeList()) were removed, and their callers now create theCoreCapacitydirectly.Reusing
CoreCapacityobjectsIn 58 examples, all Hosts (or VMs) with the same capacity now use a single
private static final CoreCapacity HOST_CAPACITY/VM_CAPACITY. A comment next to each constant explains why.CoreCapacityis an immutable record, so it never changes after it's created. Each Host/VM copies its values into its ownProcessor. Changing one machine's capacity (such as by vertical scaling) changes only that machine'sProcessor, never the shared object or the other machines.ProcessorSimplecopies the values and doesn't keep the record, reusing it doesn't reduce the memory retained by the simulation. Use immutable records for configuration values to reduce memory footprint cloudsimplus#603 lists the classes where immutable, shared records would reduce it.Capacities built from local variables or method parameters (such as Hosts with different numbers of cores) are still created inline.
Verification
mvn clean compilepasses.LargeScaleExampleandPerformanceExample1reach the timeout, as expected for their scale.MinTimeBetweenEventsExamplefails withIndexOutOfBoundsExceptioninCloudletsTableBuilder.column(9, ...): it accesses columns beforebuild()creates them. That code wasn't changed by #595, so the failure isn't caused by this migration.CI needs the
9.0.0-SNAPSHOTwith #595 published to the Maven Central snapshots repository.🤖 Generated with Claude Code