Skip to content

Java periodically drops core count to 6.5-9 from 20+ on an M3 Ultra 28 core studio - has happened before on an M2 Ultra - add restart check #39

Open
@obriensystems

Description

@obriensystems

running JDK 24 on ARM64
This is not thermal throttling - as a ctrl-c and restart immediately run at full concurrency

https://github.com/ObrienlabsDev/performance/blob/main/cpu/virtual/multithreaded/128bit/java-benchmark-128-cli/performance-nbi/src/main/java/dev/obrienlabs/performance/nbi/Collatz128bit.java#L113

		for (long part = 0; part < (batches + 1) ; part++) {	
			// generate a limited collection (CopyOnWriteArrayList not required as r/o) for the search space - 32 is a good
			List<ULong128> oddNumbers = LongStream
					.rangeClosed(rangeStart + (part * threads), rangeStart + ((1 + part) * threads) - 1)
					.filter(x -> x % 2 != 0) // TODO: find a way to avoid this filter using range above
					.boxed()
					.map(ULong128Impl::new)
					.collect(Collectors.toList());
			

				// filter on max value or path
			List<ULong128> results = oddNumbers
				.parallelStream()	
				.filter(num -> isCollatzMax(num, secondsStart))
				.collect(Collectors.toList());

Until we get an RCA - Add a System call

95% of the time we run at full core count
Image

periodically we get stuck at less than half the concurrency

Image

Old school

JDK 9+

        OperatingSystemMXBean osBean = (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();
        
        double processCpuLoad = osBean.getProcessCpuLoad();
        double systemCpuLoad = osBean.getSystemCpuLoad();

        System.out.println("Process CPU Load: " + processCpuLoad);
        System.out.println("System CPU Load: " + systemCpuLoad);

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions