Repository navigation
Add benchmark to measure VM and Host memory across CloudSim Plus versions - #7
Merged
Merged
Conversation
…plus#586 ListenersMemoryBenchmark prints the heap retained by each VmSimple and HostSimple. scripts/listeners-memory-before-after.sh builds CloudSim Plus at the #586 commit and at its parent (using git worktrees) and runs the benchmark with each version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The script that built CloudSim Plus at the #586 commit and its parent is removed. The cloudsimplus-8 profile sets the CloudSim Plus version to 8.5.1 (the new cloudsimplus.version property, which defaults to the project version), so the benchmarks can be built and run against both versions. ListenersNotificationBenchmark is excluded in that profile, since it uses the Listeners class from CloudSim Plus 9 (see #8). The pinned logback-classic 1.4.5 is removed. It was mixed with logback-core 1.5.34 from CloudSim Plus 9, failing when a VM was created. Each CloudSim Plus version already brings its matching logback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
manoelcampos
added a commit
that referenced
this pull request
Oct 20, 2026
…ions (PR #7) ListenersMemoryBenchmark prints the heap retained by each VmSimple and HostSimple. The new cloudsimplus-8 Maven profile builds the benchmarks with CloudSim Plus 8.5.1, so both versions can be compared. The pinned logback-classic 1.4.5 is removed, since it clashed with the logback from CloudSim Plus 9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 20, 2026
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.
Measures the memory used by each VM and Host, to compare CloudSim Plus 8.5.1 (before cloudsimplus/cloudsimplus#586, where listener lists start as the shared
List.of()) with the current version. Related to Optimization 3.1 of cloudsimplus/cloudsimplus#523.Changes
ListenersMemoryBenchmark: a plainmain(not JMH, since we need the memory kept in the heap, not time or allocation rate). It creates 100,000 VMs and then 100,000 Hosts, measures the used heap after a GC before and after creating them, and prints the bytes kept by each object (median of 5 rounds). It must run with-XX:+UseSerialGC, soSystem.gc()does a full collection.pom.xml:cloudsimplus.versionproperty (default:${project.version}).cloudsimplus-8profile sets it to8.5.1. It excludesListenersNotificationBenchmark, which uses theListenersclass from CloudSim Plus 9 (to be fixed by ListenersNotificationBenchmark shouldn't depend on the Listeners class from CloudSim Plus 9 #8).logback-classic1.4.5 was removed. It was mixed withlogback-core1.5.34 from CloudSim Plus 9, failing when a VM was created. Each CloudSim Plus version brings its matching logback.CLAUDE.md: documents the new benchmark.How to run
Results
VmSimpleHostSimpleThese results include all changes since 8.5.1, not only #586.
Running the benchmark with CloudSim Plus built at the #586 commit and at its parent showed that #586 alone saves:
ArrayLists × 24 B);HashSetwith itsHashMap, 64 B, + 2 emptyArrayLists, 48 B).So other changes since 8.5.1 made Hosts about 144 B bigger.
Run with JDK 25.0.4 (Corretto), compressed oops.
🤖 Generated with Claude Code