Pushing hardware to its limits

In the epoch of efficient and fast processors, performance becomes one of the most crucial aspects when choosing and working with hardware. We want our computers to execute their tasks with possibly highest speeds. But what really influences the performance of our platforms? It’s the processor’s manufacturer design one may say. In this post, I will show You how firmware may boost Your silicon to higher performance level. On the example of PC Engines apu2c4 platform, I will present Core Performance Boost feature.

Core Performance Boost

BOOST

Core Performance Boost (CPB) is a feature that allows increasing the frequency of the processor’s core exceeding its nominal values. Similarly to Intel’s Turbo Boost Technology, AMD Core Performance Boost temporarily raises the frequency of a single core when the operating system requests the highest processor performance.

Enabling the CPB feature is relatively easy since coreboot uses proprietary initialization code from AMD for the apu2 processor called AGESA, which have support for CPB initialization.

In order to enable CPB feature one must add following lines to OEM Customize in src/mainboard/pcengines/apu2/OemCustomize.c:

These values will be passed to AGESA, which will handle initialization of the CPB feature.

Performance tests

How to prove the performance gain without tests and benchmarks? First of all, I have performed a few tests using memtest86+ in BIOS and Linux OS utilities like stress/stress-ng, dd etc. Furthermore, I have launched one benchmark in order to show how performance increased by enabling the CPB feature.

All test have been performed on Debian Linux installed on mSATA SSD:

In fact, it can be any other OS that is supporting tools used in this post.

Core Performance Boost disabled

First, let’s try the firmware without CPB. Stressing 1 core:

One can see that the frequency during the stress test is limited to 1000MHz and total bogo ops are equal 580 for single core.

Another test may be a raw memory dd:

Note the average throughput is 2.3 GB/s without Core Performance Boost.

BIOS Memtest86+ payload

Notice the cache and memory speeds:

UnixBench benchmark

I have also selected the UnixBench to test the processor performance.

How to run:

Running the benchmark takes a while. Be patient.

Pay attention to System Benchmarks Index Scores
Benchmark index score for single core test is 258.7, while on all 4 cores is 688.9. These values will be taken as reference for calculating the performance gain.

Core Performance Boost enabled

Let’s now try the firmware with CPB enabled.

Stressing 1 core:

The frequency reported by sysfs, unfortunately, did not change. Let’s try stress-ng:

Stress-ng launched on 1 core reported 591 bogo ops, which is 2% more than without CPB (was 580 bogo ops). Not a difference at all.

Raw memory dd:

We can see that the speed increased from ~2.5Gb/s to ~3.0Gb/s (~20% increase). Compared to the results without CPB enabled, these actually prove that the feature works, because when the boost is on, the core frequency should increase, along with performance.

BIOS Memtest86+ payload

Notice how the memory and cache speeds changed:

The lowest performance gain from CPB is ~40%, which is quite significant.

UnixBench benchmark

We clearly see that the overall score has increased:

  • for 1 parallel copy of tests score increased from 258.7 to 310.2 (20% change)
  • for 4 parallel copy of tests score increased from 688.9 to 689.8 (~0% change)

Summary

Enabling the CPB feature resulted in the performance increase and my experiments show, that it is true. Although some methods did not report any change, it is still software which may not report it correctly. stress and stress-ng seems not to be the right tools to measure the performance.

Another reason of wrong reports is that the core performance states (P-states) in boosted mode are not described in ACPI (Advanced Configuration and Power Interface) system (and they shouldn’t be as AMD BIOS and Kernel Developer Guide states). As a result operating system does not know about the fact of processor’s transition to the state with higher, boosted performance.

CPB feature increases frequency only of one single core if the rest of the cores is not stressed. The overall boost result is 20%, which implies the frequency increase from 1000MHz to 1200MHz. However, the processor specification states, that the frequency should be 1400MHz. A similar result has been achieved with memtest86+ (approximately 40% memory speed gain). The benchmark result is also biased by the background operations that OS must do besides the tests.

The feature will be introduced in v4.9.0.2 firmware release for PC Engines. I hope this post was useful for you. Please try it out yourselves and feel free to share your results.

If you think we can help in improving the performance of your platform or you looking for someone who can boot your product by leveraging advanced features of used hardware platform, feel free to boot a call with us or drop us email to contact<at>3mdeb<dot>com. Are You interested in similar content? Feel free to sing up to our newsletter