
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Sat, 04 Apr 2026 17:41:41 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Measuring Hyper-Threading and Turbo Boost]]></title>
            <link>https://blog.cloudflare.com/measuring-hyper-threading-and-turbo-boost/</link>
            <pubDate>Tue, 05 Oct 2021 12:58:35 GMT</pubDate>
            <description><![CDATA[ Contemporary x86 processors implement some variants of Hyper-Threading and Turbo Boost. We decided to learn about the implications of these two technologies. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>We often put together experiments that measure hardware performance to improve our understanding and provide insights to our hardware partners. We recently wanted to know more about Hyper-Threading and Turbo Boost. The last time we assessed these two technologies was when we were still <a href="/a-tour-inside-cloudflares-g9-servers/">deploying the Intel Xeons</a> (Skylake/Purley), but beginning with our Gen X servers we <a href="/technical-details-of-why-cloudflare-chose-amd-epyc-for-gen-x-servers/">switched over to the AMD EPYC</a> (Zen 2/Rome). This blog is about our latest attempt at quantifying the performance impact of Hyper-Threading and Turbo Boost on our AMD-based servers running our software stack.</p><p>Intel briefly introduced Hyper-Threading with NetBurst (Northwood) back in 2002, then reintroduced Hyper-Threading six years later with Nehalem along with Turbo Boost. AMD presented their own implementation of these technologies with Zen in 2017, but AMD’s version of Turbo Boost actually dates back to AMD K10 (Thuban), in 2010, when it used to be called Turbo Core. Since Zen, Hyper-Threading and Turbo Boost are known as simultaneous multithreading (SMT) and Core Performance Boost (CPB), respectively. The underlying implementation of Hyper-Threading and Turbo Boost differs between the two vendors, but the high-level concept remains the same.</p><p>Hyper-Threading or simultaneous multithreading creates a second hardware thread within a processor’s core, also known as a logical core, by duplicating various parts of the core to support the context of a second application thread. The two hardware threads execute simultaneously within the core, across their dedicated and remaining shared resources. If neither hardware threads contend over a particular shared resource, then the throughput can be drastically increased.</p><p>Turbo Boost or Core Performance Boost opportunistically allows the processor to operate beyond its rated base frequency as long as the processor operates within guidelines set by Intel or AMD. Generally speaking, the higher the frequency, the faster the processor finishes a task.</p>
    <div>
      <h2>Simulated Environment</h2>
      <a href="#simulated-environment">
        
      </a>
    </div>
    
    <div>
      <h3>CPU Specification</h3>
      <a href="#cpu-specification">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/STcQJqLbUhlxNm7hYmEc7/b33ed9909e4c56c6db4eb7d8090447dc/image2-12.png" />
            
            </figure><p>Our <a href="/cloudflares-gen-x-servers-for-an-accelerated-future/">Gen X or 10th generation servers</a> are powered by the <a href="https://www.amd.com/en/products/cpu/amd-epyc-7642">AMD EPYC 7642</a>, based on the Zen 2 microarchitecture. The vast majority of the Zen 2-based processors along with its successor Zen 3 that our <a href="/the-epyc-journey-continues-to-milan-in-cloudflares-11th-generation-edge-server/">Gen 11 servers are based on</a>, supports simultaneous multithreading and Core Performance Boost.</p><p>Similar to Intel’s Hyper-Threading, AMD implemented 2-way simultaneous multithreading. The AMD EPYC 7642 has 48 cores, and with simultaneous multithreading enabled it can simultaneously execute 96 hardware threads. Core Performance Boost allows the AMD EPYC 7642 to operate anywhere between 2.3 to 3.3 GHz, depending on the workload and limitations imposed on the processor. With Core Performance Boost disabled, the processor will operate at 2.3 GHz, the rated base frequency on the AMD EPYC 7642. We took our usual simulated traffic pattern of 10 KiB cached assets over HTTPS, <a href="/keepalives-considered-harmful/">provided by our performance team</a>, to generate a sustained workload that saturated the processor to 100% CPU utilization.</p>
    <div>
      <h3>Results</h3>
      <a href="#results">
        
      </a>
    </div>
    <p>After establishing a baseline with simultaneous multithreading and Core Performance Boost disabled, we started enabling one feature at a time. When we enabled Core Performance Boost, the processor operated near its peak turbo frequency, hovering between 3.2 to 3.3 GHz which is more than 39% higher than the base frequency. Higher operating frequency directly translated into 40% additional requests per second. We then disabled Core Performance Boost and enabled simultaneous multithreading. Similar to Core Performance Boost, simultaneous multithreading alone improved requests per second by 43%. Lastly, by enabling both features, we observed an 86% improvement in requests per second.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2NfKzNxMrKrtufGQuYjcHp/483e38c99e370940454158898f7fbe76/image4-8.png" />
            
            </figure><p>Latencies were generally lowered by either or both Core Performance Boost and simultaneous multithreading. While Core Performance Boost consistently maintained a lower latency than the baseline, simultaneous multithreading gradually took longer to process a request as it reached tail latencies. Though not depicted in the figure below, when we examined beyond p9999 or 99.99th percentile, simultaneous multithreading, even with the help of Core Performance Boost, exponentially increased in latency by more than 150% over the baseline, presumably due to the two hardware threads contending over a shared resource within the core.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4aLHnhtg8eOGWoUCBe2g98/2865b9db5d5746d47c510ea6e80eec8f/image7-4.png" />
            
            </figure>
    <div>
      <h2>Production Environment</h2>
      <a href="#production-environment">
        
      </a>
    </div>
    <p>Moving into production, since our <a href="https://radar.cloudflare.com/">traffic fluctuates throughout the day</a>, we took four identical Gen X servers and measured in parallel during peak hours. The only changes we made to the servers were enabling and disabling simultaneous multithreading and Core Performance Boost to create a comprehensive test matrix. We conducted the experiment in two different regions to identify any anomalies and mismatching trends. All trends were alike.</p><p>Before diving into the results, we should preface that the baseline server operated at a higher CPU utilization than others. Every generation, our servers deliver a noticeable improvement in performance. So our load balancer, named Unimog, <a href="/unimog-cloudflares-edge-load-balancer/">sends a different number of connections to the target server based on its generation</a> to balance out the CPU utilization. When we disabled simultaneous multithreading and Core Performance Boost, the baseline server’s performance degraded to the point where Unimog encountered a “guard rail” or the lower limit on the requests sent to the server, and so its CPU utilization rose instead. Given that the baseline server operated at a higher CPU utilization, the baseline server processed more requests per second to meet the minimum performance threshold.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4f2ViyRNLst20bSKZ5I9fe/4fddc3014f888809e9b0a9f120234004/image8-5.png" />
            
            </figure>
    <div>
      <h3>Results</h3>
      <a href="#results">
        
      </a>
    </div>
    <p>Due to the skewed baseline, when core performance boost was enabled, we only observed 7% additional requests per second. Next, simultaneous multithreading alone improved requests per second by 41%. Lastly, with both features enabled, we saw an 86% improvement in requests per second.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6E6GlehsjYmQmKnpjxgkut/cb7c54930c5d90c16d8ce45ecea429fe/image6-6.png" />
            
            </figure><p>Though we lack concrete baseline data, we can normalize requests per second by CPU utilization to approximate the improvement for each scenario. Once normalized, the estimated improvement in requests per second from core performance boost and simultaneous multithreading were 36% and 80%, respectively. With both features enabled, requests per second improved by 136%.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6OGBo0BJ9POefn6afYw5Mc/97f445ce481673d379a7f52ec2907be6/image5-6.png" />
            
            </figure><p>Latency was not as interesting since the baseline server operated at a higher CPU utilization, and in turn, it produced a higher tail latency than we would have otherwise expected. All other servers maintained a lower latency due to their lower CPU utilization in conjunction with Core Performance Boost, simultaneous multithreading, or both.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4JPkPm4EP6DXEGd99nSyVo/5adb7926ab3a25c02ecf4b7c5e74d14b/image1-10.png" />
            
            </figure><p>At this point, our experiment did not go as we had planned. Our baseline is skewed, and we only got half useful answers. However, we find experimenting to be important because we usually end up finding other helpful insights as well.</p><p>Let’s add power data. Since our baseline server was operating at a higher CPU utilization, we knew it was serving more requests and therefore, consumed more power than it needed to. Enabling Core Performance Boost allowed the processor to run up to its peak turbo frequency, increasing power consumption by 35% over the skewed baseline. More interestingly, enabling simultaneous multithreading increased power consumption by only 7%. Combining Core Performance Boost with simultaneous multithreading resulted in 58% increase in power consumption.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5Qxyi4d9qWZDxc7F09w0bv/73b88a522a15b35d5796478fdb11b6de/image3-6.png" />
            
            </figure><p>AMD’s implementation of simultaneous multithreading appears to be power efficient as it achieves 41% additional requests per second while consuming only 7% more power compared to the skewed baseline. For completeness, using the data we have, we bridged performance and power together to obtain performance per watt to summarize power efficiency. We divided the non-normalized requests per second by power consumption to produce the requests per watt figure below. Our Gen X servers attained the best performance per watt by enabling just simultaneous multithreading.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5ZY19SD0eKHUmUo6Zx3bCA/2b0250f752aea47f944a4c6d0b77bf5c/image9-4.png" />
            
            </figure>
    <div>
      <h2>Conclusion</h2>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>In our assessment of AMD’s implementation of Hyper-Threading and Turbo Boost, the original experiment we designed to measure requests per second and latency did not pan out as expected. As soon as we entered production, our baseline measurement was skewed due to the imbalance in CPU utilization and only partially reproduced our lab results.</p><p>We added power to the experiment and found other meaningful insights. By analyzing the performance and power characteristics of simultaneous multithreading and Core Performance Boost, we concluded that simultaneous multithreading could be a power-efficient mechanism to attain additional requests per second. Drawbacks of simultaneous multithreading include long tail latency that is currently curtailed by enabling Core Performance Boost. While the higher frequency enabled by Core Performance Boost provides latency reduction and more requests per second, we are more mindful that the increase in power consumption is quite significant.</p><p>Do you want to help shape the Cloudflare network? This blog was a glimpse of the work we do at Cloudflare. <a href="https://www.cloudflare.com/careers/">Come join us</a> and help complete the feedback loop for our developers and hardware partners.</p> ]]></content:encoded>
            <category><![CDATA[Hardware]]></category>
            <category><![CDATA[AMD]]></category>
            <category><![CDATA[EPYC]]></category>
            <category><![CDATA[Partners]]></category>
            <category><![CDATA[Performance]]></category>
            <guid isPermaLink="false">6eb1jfSeTaXx6866LDX8Nl</guid>
            <dc:creator>Sung Park</dc:creator>
        </item>
        <item>
            <title><![CDATA[Designing Edge Servers with Arm CPUs to Deliver 57% More Performance Per Watt]]></title>
            <link>https://blog.cloudflare.com/designing-edge-servers-with-arm-cpus/</link>
            <pubDate>Tue, 27 Jul 2021 12:59:23 GMT</pubDate>
            <description><![CDATA[ Using Arm, Cloudflare can now securely process over ten times as many Internet requests for every watt of power consumed, than we did for servers designed in 2013.  ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3LVPZk5aGg9j3ssCFOMVv2/7f1f2d76ba04f023e6f3f86712e3f9f4/Arm-CPUs-1.png" />
            
            </figure><p>Cloudflare has millions of free customers. Not only is it something we’re incredibly proud of in the context of helping to build a better Internet — but it’s something that has made the Cloudflare service measurably better. One of the ways we’ve benefited is that it’s created a very strong imperative for Cloudflare to maintain a network that is as efficient as possible. There’s simply no other way to serve so many free customers.</p><p>In the spirit of this, we are very excited about the latest step in our energy-efficiency journey: turning to Arm for our server CPUs. It has been a long journey getting here — we first started testing Arm CPUs all the way back in <a href="/arm-takes-wing/">November 2017</a>. It’s only recently, however, that the quantum of energy efficiency improvement from Arm has become clear.  Our first deployment of an Arm-based CPU, designed by Ampere, was earlier this month – July 2021.</p><p>Our most recently deployed generation of edge servers, Gen X, used AMD Rome CPUs. Compared with that, the newest Arm based CPUs process an incredible <b>57% more Internet requests</b> per watt. While AMD has a sequel, Milan (and which Cloudflare will also be deploying), it doesn’t achieve the same degree of energy efficiency that the Arm processor does — managing only 39% more requests per watt than Rome CPUs in our existing fleet. As Arm based CPUs become more widely deployed, and our software is further optimized to take advantage of the Arm architecture, we expect further improvements in the energy efficiency of Arm servers.</p><p>Using Arm, Cloudflare can now securely process over ten times as many Internet requests for every watt of power consumed, than we did for servers designed in <a href="/a-tour-inside-cloudflares-latest-generation-servers/">2013</a>.</p><p>(In the graphic below, for 2021, the perforated data point refers to x86 CPUs, whereas the bold data point refers to Arm CPUs)</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3v5MYy7AdUHaWlj6rqnYqv/fdf0d4b3cd30df28b3e544ebfeb17524/image1-26.png" />
            
            </figure><p>As Arm server CPUs demonstrate their performance and become more widely deployed, we hope this will inspire x86 CPUs manufacturers (such as Intel and AMD) to urgently take energy efficiency more seriously. This is especially important since, worldwide, x86 CPUs continue to represent the vast majority of global data center energy consumption.</p><p>Together, we can reduce the carbon impact of Internet use. The environment depends on it.</p> ]]></content:encoded>
            <category><![CDATA[Impact Week]]></category>
            <category><![CDATA[Performance]]></category>
            <category><![CDATA[Sustainability]]></category>
            <category><![CDATA[Hardware]]></category>
            <guid isPermaLink="false">7nfv93CtdrvizCQW4AMpVD</guid>
            <dc:creator>Nitin Rao</dc:creator>
            <dc:creator>James Allworth</dc:creator>
            <dc:creator>Sung Park</dc:creator>
        </item>
        <item>
            <title><![CDATA[ARMs Race: Ampere Altra takes on the AWS Graviton2]]></title>
            <link>https://blog.cloudflare.com/arms-race-ampere-altra-takes-on-aws-graviton2/</link>
            <pubDate>Thu, 11 Mar 2021 12:00:00 GMT</pubDate>
            <description><![CDATA[ A comparison between the Ampere Altra and the AWS Graviton2, the two ARM Neoverse N1-based processors. ]]></description>
            <content:encoded><![CDATA[ <p>Over three years ago, we embraced the ARM ecosystem after <a href="/arm-takes-wing/">evaluating the Qualcomm Centriq</a>. The Centriq and its Falkor cores delivered a significant reduction in power consumption while maintaining a comparable performance against the processor that was powering our server fleet at the time. By the time we completed <a href="/porting-our-software-to-arm64/">porting our software stack to be compatible with ARM</a>, Qualcomm decided to <a href="https://www.theregister.com/2018/12/10/qualcomm_layoffs/">exit the server business</a>. Since then, we have been waiting for another server-grade ARM processor with hopes to improve our power efficiencies across our <a href="https://www.cloudflare.com/network/">global network</a>, which now spans more than 200 cities in over 100 countries.</p><p>ARM has introduced the Neoverse N1 platform, the blueprint for creating power-efficient processors licensed to institutions that can customize the original design to meet their specific requirements. Ampere licensed the Neoverse N1 platform to create the Ampere Altra, a processor that allows companies that own and manage their own fleet of servers, like ourselves, to take advantage of the expanding ARM ecosystem. We have been working with Ampere to determine whether Altra is the right processor to power our first generation of ARM edge servers.</p><p>The AWS Graviton2 is the only other Neoverse N1-based processor publicly accessible, but only made available through Amazon’s cloud product portfolio. We wanted to understand the differences between the two, so we compared Ampere’s single-socket server, named Mt. Snow, equipped with the Ampere Altra Q80-30 against an EC2 instance of the AWS Graviton2.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4gIm083qtHDE0lsyNQ9trI/871b344d6f1a3abc480c43ebec66973b/image22.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4p4UD5vZMIdLhnicWpFoNn/50f867f2a2841f22a9f0468594417926/image13-1.png" />
            
            </figure><p>The Mt. Snow 1P server equipped with the Ampere Altra Q80-30</p><p>The Ampere Altra and AWS Graviton2 alike are based on the Neoverse N1 platform by ARM, manufactured on the TSMC 7nm process. The N1 reference core features an 11-stage out-of-order execution pipeline along with the <a href="https://www.arm.com/solutions/infrastructure">following specifications</a> in ARM nomenclature.</p>
<table>
<thead>
  <tr>
    <th>Pipeline Stage</th>
    <th>Width</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>Fetch</td>
    <td>4 instructions/cycle</td>
  </tr>
  <tr>
    <td>Decode</td>
    <td>4 instructions/cycle</td>
  </tr>
  <tr>
    <td>Rename</td>
    <td>4 Mops/cycle</td>
  </tr>
  <tr>
    <td>Dispatch</td>
    <td>8 µops/cycle</td>
  </tr>
  <tr>
    <td>Issue</td>
    <td>8 µops/cycle</td>
  </tr>
  <tr>
    <td>Commit</td>
    <td>8 µops/cycle</td>
  </tr>
</tbody>
</table>
<p>A <a href="https://developer.arm.com/ip-products/processors/neoverse/neoverse-n1">N1 core</a> contains 64KiB of L1 instruction and 64KiB of L1 data caches and a dedicated L2 cache that can be implemented with up to 1MiB per core. The L3 cache or the System Level Cache can be implemented with up to 256MiB (up to 4MiB per slice, up to 64 slices) shared by all cores.</p>

<table>
<thead>
  <tr>
    <th>Cache Hierarchy</th>
    <th>Capacity</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>L1i Cache</td>
    <td>64 KiB</td>
  </tr>
  <tr>
    <td>L1d Cache</td>
    <td>64 KiB</td>
  </tr>
  <tr>
    <td>L2 Cache</td>
    <td>Up to 1 MiB</td>
  </tr>
  <tr>
    <td>L3 Cache</td>
    <td>Up to 256 MiB</td>
  </tr>
</tbody>
</table>    
<p>A pair of N1 cores can optionally be combined into a dual-core configuration through the Component Aggregation Layer, then placed inside the mesh interconnects named the Coherent Mesh Network or <a href="https://developer.arm.com/ip-products/system-ip/corelink-interconnect/corelink-coherent-mesh-network-family/corelink-cmn-600">CMN-600</a> that supports up to 64 pairs of cores, totaling 128 cores.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/13WYF0ug8Fll9whw3hAYQc/b2120a5ab9238d7fb88a45a9216bc955/image14-2.png" />
            
            </figure><p>Component Aggregation Layer (CAL) supports up to two N1 cores</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/38oEPfzBX5YmBmZPvDfE4q/732ba4ed273fabe97a548dd6604d0ed9/image7-3.png" />
            
            </figure><p>Coherent Hub Interface (CHI) is used to connect components to the Mesh Cross Point (XP)</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2xr86zntLVgCyTRqPOyZt6/a1662c7cb04adddf99c1c754a318783f/image17-1.png" />
            
            </figure><p>Coherent Mesh Network (CMN-600) can be scaled up to 8x8 XPs supporting up to 128 cores</p>
    <div>
      <h2>System Specifications</h2>
      <a href="#system-specifications">
        
      </a>
    </div>
    
<table>
<thead>
  <tr>
    <th></th>
    <th>AWS (Annapurna Labs)</th>
    <th>Ampere</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>Processor Model</td>
    <td>AWS Graviton2</td>
    <td>Ampere Altra Q80-30</td>
  </tr>
  <tr>
    <td>ISA</td>
    <td>ARMv8.2</td>
    <td>ARMv8.2+</td>
  </tr>
  <tr>
    <td>Core / Thread Count</td>
    <td>64C / 64T</td>
    <td>80C / 80T</td>
  </tr>
  <tr>
    <td>Operating Frequency</td>
    <td>2.5 GHz</td>
    <td>3.0 GHz</td>
  </tr>
  <tr>
    <td>L1 Cache Size</td>
    <td>8 MiB (64 x 128 KiB)</td>
    <td>10 MiB (80 x 128 KiB)</td>
  </tr>
  <tr>
    <td>L2 Cache Size</td>
    <td>64 MiB (64 x 1 MiB)</td>
    <td>80 MiB (80 x 1 MiB)</td>
  </tr>
  <tr>
    <td>L3 Cache Size</td>
    <td>32 MiB</td>
    <td>32 MiB</td>
  </tr>
  <tr>
    <td>System Memory</td>
    <td>256 GB (8 x 32 GB DDR4-3200)</td>
    <td>256 GB (8 x 32 GB DDR4-3200)</td>
  </tr>
</tbody>
</table>
<p>We can verify that the two processors are based on the Neoverse N1 platform by checking <code>CPU part</code> inside <code>cpuinfo</code>, which returns <code>0xd0c</code>, the <a href="https://developer.arm.com/documentation/100616/0301/register-descriptions/aarch64-system-registers/midr-el1--main-id-register--el1">designated part number for the Neoverse N1</a>.</p>
            <pre><code>sung@ampere-altra:~$ cat /proc/cpuinfo | grep 'CPU part' | head -1
CPU part	: 0xd0c</code></pre>
            
            <pre><code>sung@aws-graviton2:~$ cat /proc/cpuinfo | grep 'CPU part' | head -1
CPU part	: 0xd0c</code></pre>
            <p>Ampere backported various features into the Ampere Altra notably, <a href="https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability">speculative side-channel attack mitigations</a> that include Meltdown and Spectre (variants 1 and 2) from the ARMv8.5 instruction set architecture, giving Altra the “+” designation in their ISA (ARMv8.2+).</p><p>The Ampere Altra consists of 25% more physical cores and 20% higher operating frequency than the AWS Graviton2. Because of Altra’s higher core-count and frequency, we should expect the Ampere Altra to perform up to 50% better than the AWS Graviton2 in compute-bound workloads.</p><p>Both Ampere and AWS decided to implement 1MiB of L2 cache per core, but only 32MiB of L3 or System Level Cache, although the CMN-600 specification allows up to 256MiB. This leaves the Ampere Altra with a lower L3 cache-per-core ratio than the AWS Graviton2 and places Altra at a potential disadvantage in situations where the <a href="/impact-of-cache-locality/">application’s working set does not fit within the L3 cache</a>.</p>
    <div>
      <h2>Methodology</h2>
      <a href="#methodology">
        
      </a>
    </div>
    <p>We imaged both systems with Debian Buster and downloaded our open-source benchmark suite, <a href="https://github.com/cloudflare/cf_benchmark">cf_benchmark</a>. This benchmark suite executes 49 different workloads over approximately 15 to 30 minutes. Each workload utilizes a library that has either been used in our stack or considered at one point or another. Due to the relatively short duration of the benchmark and the libraries called by the workloads, we run cf_benchmark as our smoke test on any new system brought in for evaluation. We recommend cf_benchmark to our technology partners when we discuss new hardware, primarily processors, to ensure these workloads can compile and run successfully.</p><p>We ran cf_benchmark multiple times and observed no significant run-to-run variations. Similar to industry standard benchmarks, we calculated the overall score using geometric mean to provide a more conservative result than arithmetic mean across all 49 workloads and category scores using their respective subset of workloads.</p><p>In single-core scenarios, cf_benchmark will spawn a single application thread, occupying a single hardware thread. In multi-core scenarios, cf_benchmark will spawn as many application threads as needed until all hardware threads on the processor are occupied. Neither processors implemented <a href="https://en.wikipedia.org/wiki/Simultaneous_multithreading">simultaneous multithreading</a>, so each physical core can only execute one hardware thread at a time.</p>
    <div>
      <h2>Overall Performance Results</h2>
      <a href="#overall-performance-results">
        
      </a>
    </div>
    <p>Given Altra’s advantage in both operating frequency and sheer core-count, the Ampere Altra took the lead across single and multi-core performance.</p><p>In single-core performance, the Ampere Altra outperformed the AWS Graviton2 by 16%. The differences in operating frequencies between the two processors gave the Ampere Altra a proportional advantage of up to 20% in more than half of our single-core workloads.</p><p>In multi-core performance, the Ampere Altra continued to maintain its edge over the AWS Graviton2 by 31%. We expected the Ampere Altra to attain a theoretical advantage between 20% to 50% due to Altra’s higher operating frequency and core count while taking inherent overheads associated with increasing core count into consideration, primarily scaling out the mesh network. We observed that the majority of our multi-core workloads fell within this 20% to 50% range.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7hR6z2vf42BIvNqGDe7Fzo/d5334d860decb6ccc04213ba88016302/image27.png" />
            
            </figure>
    <div>
      <h2>Categorized Results</h2>
      <a href="#categorized-results">
        
      </a>
    </div>
    <p>In OpenSSL and LuaJIT, the Ampere Altra scaled proportionally with its operating frequency in single-core performance and continued to scale out with its core count in multi-core performance. The Ampere Altra maintained its lead in the vast majority of compression and Golang workloads with the exception of Brotli level 9 compression and some Golang multi-core workloads that were not able to keep the two processors busy at 100% CPU utilization.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7rgDArSL0EoMlSPBYXOPX0/5c85608e43ddc417565b18b12ead1fb7/image9-2.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4Xk9KE86pFwyLKTumNkXG6/4713fc65624711bea6a0d21fb0ccc8a8/image29.png" />
            
            </figure>
    <div>
      <h2>OpenSSL</h2>
      <a href="#openssl">
        
      </a>
    </div>
    <p>As described <a href="/arm-takes-wing/">previously</a>, we use a fork of OpenSSL, named BoringSSL, in places such as for <a href="https://www.cloudflare.com/learning/ssl/what-happens-in-a-tls-handshake/">TLS handshake</a> handling. The original OpenSSL comes with a built-in benchmark called `speed` that measures single and multi-core performance. The asymmetric and <a href="/it-takes-two-to-chacha-poly/">symmetric</a> crypto workloads found here saturated the processors at 100% CPU utilization. Altra’s performance aligned with our expectations throughout this entire category by maintaining a consistent 20% advantage over the AWS Graviton2 in single-core and continued to scale with its core count and performed, on average, 47% better in multi-core performance.</p>
    <div>
      <h3>Public Key Cryptography</h3>
      <a href="#public-key-cryptography">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6WTE3GQC2F1PJGKCOJlIBn/872241c8d731b3a23ba4fa1a6be58c42/image4-9.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/WyA8y24VhaTVc6KSGMwgA/94b04a984a96434c5e27f580eae4781b/image6-4.png" />
            
            </figure>
    <div>
      <h3>Symmetric Key Cryptography</h3>
      <a href="#symmetric-key-cryptography">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/IAWDbmAmeDB398TEqlFz7/ab9e3db71dd253ebb31f86bdc294bd07/image3-10.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6Vjjz0U0no96OWEUoPOyrL/43cc9a669378a0acc7b811d05def6848/image28.png" />
            
            </figure>
    <div>
      <h2>LuaJIT</h2>
      <a href="#luajit">
        
      </a>
    </div>
    <p>We commonly describe LuaJIT as the <a href="/an-epyc-trip-to-rome-amd-is-cloudflares-10th-generation-edge-server-cpu/">glue that holds Cloudflare together</a>. LuaJIT has a <a href="/pushing-nginx-to-its-limit-with-lua/">long history</a> here at Cloudflare for the same reason it is widely used in the videogame industry, where performance and responsiveness are non-negotiable requirements.</p><p>Although we have been transitioning from LuaJIT <a href="/building-fast-interpreters-in-rust/">to Rust</a>, we welcomed the <a href="https://developer.arm.com/documentation/100616/0400/functional-description/level-1-memory-system/cache-behavior/instruction-cache-coherency?lang=en">instruction cache coherency</a> implemented into the Ampere Altra. The instruction cache coherency aims to address the <a href="https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/caches-and-self-modifying-code">drawbacks associated with LuaJIT</a>, such as its self-modifying properties, where the next instruction that needs to be fetched is not in the instruction cache, but rather the data cache. With this feature enabled, the instruction cache becomes coherent or made aware of changes made in the data cache. The L2 cache becomes inclusive of the L1 instruction cache, meaning any cache lines found in the L1 instruction cache should also be present in the L2 cache. Furthermore, L2 cache intercepts any invalidations or stores made to any of the L2’s cache lines and propagates those changes up to the L1 instruction cache.</p><p>The Ampere Altra performed well within single-core performance except for fasta where both processors stalled at the front-end of the pipeline. In the multi-core version of fasta, Altra did not spend as many cycles stalled in the front-end likely due to Ampere's implementation of the instruction cache coherency. All other workloads continued to scale in multi-core workloads with binary trees coming in at 73%. Spectral was omitted since the multi-core variant failed to run on both servers.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1PTr1VFKBOtT3OJa2p1OIL/6c89fe575583d30dc7758ac071853be9/image25.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1v8ZAjMln1cgNxC74M6rFH/f64281063db5deafcdb2c0df3d2f12cb/image18-1.png" />
            
            </figure>
    <div>
      <h2>Compression</h2>
      <a href="#compression">
        
      </a>
    </div>
    <p><a href="/results-experimenting-brotli/">Brotli and Gzip</a> are the two primary types of compression we use at Cloudflare. We find value in highly efficient compression algorithms as it helps us find a balance between spending more resources on a faster processor or having a larger storage capacity in addition to being able to transfer contents faster. The Ampere Altra performed well on both compression types with the exception of Brotli level 9 and Gzip level 4 multi-core performance.</p>
    <div>
      <h3>Brotli</h3>
      <a href="#brotli">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3XaMt4Zk04Sci4xEwYbEfZ/452e4a8fdd91eb329f72d5931ebf6fd4/image2-6.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/8HNEM6fNB1ZHdJBi9WXwq/0ac8c02525138234f57138f63785ccf7/image30.png" />
            
            </figure><p>Out of the entire benchmark suite, Brotli level 9 caused the largest delta between the Ampere Altra and the AWS Graviton2. Although we do not use <a href="/arm-takes-wing/">Brotli level 7 and above</a> when performing dynamic compression, we decided to investigate further.</p><p>From historical observations, we noticed that most processors tend to experience significant performance degradation at level 9. Compression workloads generally consist of a higher branch instructions mix, and we found approximately 15% to 20% of the dynamic instructions to be branch instructions. Intuitively, we first looked at the misprediction rate since a high miss rate will quickly add up penalty cycles. However, to our surprise, we found the misprediction rate at level 9 very low.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/386axQVNM8iSnFqudd6Ogm/05018c18024e803c3cd0b9119dec2ecc/image15-3.png" />
            
            </figure><p>By analyzing our dataset further, we found the common underlying cause appeared to be the high number of page faults incurred at level 9. Ampere has demonstrated that by increasing the page size from 4K to 64K bytes, we can alleviate the bottleneck and bring the Ampere Altra at parity with the AWS Graviton2. We plan to experiment with large page sizes in the future as we continue to evaluate Altra.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3DKo7g8rI17OWj0EYTaajg/0fd048aa115e975a5596ea6d4484e7c3/image16-1.png" />
            
            </figure>
    <div>
      <h3>Gzip</h3>
      <a href="#gzip">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Ysrj5aCW6xRAhfvaAU18x/6a4097d080255082d82f4e500b115850/image1-12.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6Kq3MvWAn8SU4x6aMtXB70/d8ed96d3a91d806b2169533e3c3d320f/image19-1.png" />
            
            </figure>
    <div>
      <h2>Golang</h2>
      <a href="#golang">
        
      </a>
    </div>
    <p>LuaJIT, Rust, C++, and Go are some of our <a href="/go-at-cloudflare/">primary languages</a>; the Golang workloads found here include <a href="/go-crypto-bridging-the-performance-gap/">cryptography</a>, compression, regular expression, and string manipulation. The Ampere Altra performed proportionally to its operating frequency against the AWS Graviton2 in the vast majority of single-core performance. In multi-core performance, the workloads that could not saturate the processors to 100% CPU utilization did not scale proportionally to the two processor’s respective operating frequencies and core count.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/57IXPa7WCSeZKgL1uxFnwZ/1464a91c07a9d37f2f54a5c2a40cf4e3/image11-1.png" />
            
            </figure>
    <div>
      <h3>Go Cryptography</h3>
      <a href="#go-cryptography">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2sFiAVlYH3Yf7HRMHcs4lD/5d5767056e6bbdfcb1806a9a64837896/image8-3.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4MtZ4a8jzSBvuILTK63K5N/bee30dc62c8c19906b025be68093a6c0/image23.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5hUMrhpmi50JSnqTFSHCEI/f414af6ea4350c6001d3215414c476d9/image26.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Q4pFSFuq2vIdFqXRZTDuc/a150996a34937b5dc6a6abb03f8e6b81/image21-6.png" />
            
            </figure>
    <div>
      <h3>Go Compression &amp; String</h3>
      <a href="#go-compression-string">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6eO7U4KLBUdakYPkZAMDEm/a9a49d5d059be39825c2492876e612c8/image24.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2jfNL4hgXTgikqd1xxKGS/c9bd212d89e2a34f64a71bc076323815/image10-3.png" />
            
            </figure>
    <div>
      <h3>Go Regex</h3>
      <a href="#go-regex">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6hmpFGmyyhgx9cnCkTtbeJ/237481ec63e1f82fbdf42e986b9ed3a1/image12-1.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5NNwnydydlXjw9iTomiML6/bc6e5bd6a72555f2db48c56b54b76a74/image20.png" />
            
            </figure>
    <div>
      <h2>Frequency, Power &amp; Thermals</h2>
      <a href="#frequency-power-thermals">
        
      </a>
    </div>
    <p>We were unable to collect any telemetry on the AWS Graviton2. Power would have been an interesting data point on the AWS Graviton2, but the EC2 instance did not expose either frequency or power sensors. The Ampere model we tested was the Altra Q80-30, rated with an operating frequency of 3.0GHz and a thermal design power (TDP) of 210W.</p><p>The Ampere Altra maintained a sustained operating frequency throughout cf_benchmark while Altra’s dynamic voltage and frequency scaling (DVFS) mechanism occasionally lowered its operating frequency in between workloads as needed to reduce power consumption. Package power varied depending on the workload, but Altra never consumed anywhere near its rated TDP while the default fan curve maintained the temperature below 70C. At the system level, by simply querying the baseboard management controller over <a href="https://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface">IPMI</a>, we observed that the Ampere server consumed no more than 300W. More power-efficient servers directly translates to more <a href="/an-introduction-to-three-phase-power-and-pdus/">flexibility over how we can populate our racks</a> and we hope this trend will continue in production.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/p2T05N3TKr8JDSNhHYs89/192ec5af3153877a60a39acceea1f7f4/image31.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/12tiKqNAFC8IK9o76MiJ6F/62186a14aed6c406d84553a7ec14fc55/image5-10.png" />
            
            </figure>
    <div>
      <h2>Conclusion</h2>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>In our top-down evaluation, the Ampere Altra largely performed as we had expected throughout our benchmarking suite. We regularly observed the two Neoverse N1 processors perform to their respective operating frequency and core count, with the Ampere Altra coming on top in these key areas over the AWS Graviton2. The Ampere Altra yielded a better single-core performance due to higher operating frequency and multiplied its impact even further by scaling out with a higher core count in multi-core performance against the AWS Graviton2. We also found our Ampere evaluation server consuming less power than we had anticipated and hope this trend will continue in production.</p><p>Throughout this initial set of testing and learning more about the underlying architecture, there were many parts we found interesting when compared against contemporary x86 counterparts such as the absence of simultaneous multithreading or dynamic frequency boost. We look forward to seeing which design philosophy makes more sense for the cloud. We are currently assessing Altra’s performance against our fleet of servers and collaborating with Ampere to define an ARM edge server based on Altra that could be deployed at scale.</p> ]]></content:encoded>
            <category><![CDATA[Hardware]]></category>
            <category><![CDATA[Data Center]]></category>
            <category><![CDATA[Cloudflare Network]]></category>
            <category><![CDATA[Partners]]></category>
            <guid isPermaLink="false">2687iQec2rCYsiH8d1qEzz</guid>
            <dc:creator>Sung Park</dc:creator>
        </item>
        <item>
            <title><![CDATA[Gen X Performance Tuning]]></title>
            <link>https://blog.cloudflare.com/gen-x-performance-tuning/</link>
            <pubDate>Thu, 27 Feb 2020 14:00:00 GMT</pubDate>
            <description><![CDATA[ We have partnered with AMD to get the best performance out of this processor and today, we are highlighting our tuning efforts that led to an additional 6% performance. Thermal design power (TDP) and dynamic power, amongst others, play a critical role when tuning a system.  ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6TT8W5Et00ZvvobGvrgMEY/1424f7ef2b4d6cc216b4a7ababc750ee/image7-3.png" />
            
            </figure><p>We are using AMD 2nd Gen EPYC 7642 for our <a href="/cloudflares-gen-x-servers-for-an-accelerated-future/">tenth generation “Gen X” servers</a>. We found <a href="/an-epyc-trip-to-rome-amd-is-cloudflares-10th-generation-edge-server-cpu/">many aspects of this processor compelling</a> such as its <a href="/impact-of-cache-locality/">increase in performance due to its frequency bump and cache-to-core ratio</a>. We have partnered with AMD to get the best performance out of this processor and today, we are highlighting our tuning efforts that led to an additional 6% performance.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/616TtlNrwVkyeHby6ReKSD/8127c8a658986889c1d54810ecd9433f/image14.png" />
            
            </figure>
    <div>
      <h2>Thermal Design Power &amp; Dynamic Power</h2>
      <a href="#thermal-design-power-dynamic-power">
        
      </a>
    </div>
    <p>Thermal design power (TDP) and dynamic power, amongst others, play a critical role when tuning a system. Many share a common belief that thermal design power is the maximum or average power drawn by the processor. The 48-core <a href="https://www.amd.com/en/products/cpu/amd-epyc-7642">AMD EPYC 7642</a> has a TDP rating of 225W which is just as high as the 64-core <a href="https://www.amd.com/en/products/cpu/amd-epyc-7742">AMD EPYC 7742</a>. It comes to mind that fewer cores should translate into lower power consumption, so why is the AMD EPYC 7642 expected to draw just as much power as the AMD EPYC 7742?</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/420qeX6xoS09gLZaWH9F8p/051cc471d235fce238703d227f65a5f7/image10-2.png" />
            
            </figure><p><i>TDP Comparison between the EPYC 7642, EPYC 7742 and top-end EPYC 7H12</i></p><p>Let’s take a step back and understand that TDP does not always mean the maximum or average power that the processor will draw. At a glance, TDP may provide a good estimate about the processor’s power draw; TDP is really about how much heat the processor is expected to generate. TDP should be used as a guideline for designing cooling solutions with appropriate thermal capacitance. The cooling solution is expected to indefinitely dissipate heat up to the TDP, in turn, this can help the chip designers determine a power budget and create new processors around that constraint. In the case of the AMD EPYC 7642, the extra power budget was spent on retaining all of its 256 MiB L3 cache and the cores to operate at a higher sustained frequency as needed during our peak hours.</p><p>The overall power drawn by the processor depends on many different factors; dynamic or active power establishes the relationship between power and frequency. Dynamic power is a function of capacitance - the chip itself, supply voltage, frequency of the processor, and activity factor. The activity factor is dependent on the characteristics of the workloads running on the processor. Different workloads will have different characteristics. Some examples include <a href="/cloudflare-workers-unleashed/">Cloudflare Workers</a> or <a href="/seamless-remote-work-with-cloudflare-access/">Cloudflare for Teams</a>, the hotspots in these or any other particular programs will utilize different parts of the processor, affecting the activity factor.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/12AEwpVHIGoT9XGcqHo83V/319acd3abb48e14d48d5defd4dc8a0c4/image-7.png" />
            
            </figure>
    <div>
      <h2>Determinism Modes &amp; Configurable TDP</h2>
      <a href="#determinism-modes-configurable-tdp">
        
      </a>
    </div>
    <p>The latest AMD processors continue to implement AMD Precision Boost which opportunistically allows the processor to operate at a higher frequency than its base frequency. How much higher can the frequency go depends on many different factors such as electrical, thermal, and power limitations.</p><p>AMD offers a knob known as determinism modes. This knob affects power and frequency, placing emphasis one over the other depending on the determinism selected. <a href="https://www.amd.com/system/files/2017-06/Power-Performance-Determinism.pdf">There is a white paper</a> posted on AMD's website that goes into the nuanced details of determinism, and remembering how frequency and power are related - this was the simplest definition I took away from the paper:</p><p><b>Performance Determinism</b> - Power is a function of frequency.</p><p><b>Power Determinism</b> - Frequency is a function of power.</p><p>Another knob that is available to us is Configurable Thermal Design Power (cTDP), this knob allows the end-user to reconfigure the factory default thermal design power. The AMD EPYC 7642 is rated at 225W; however, we have been given guidance from AMD that this particular part can be reconfigured up to 240W. As mentioned previously, the cooling solution must support up to the TDP to avoid throttling. We have also done our due diligence and tested that our cooling solution can reliably dissipate up to 240W, even at higher ambient temperatures.</p><p>We gave these two knobs a try and got the results shown in the figures below using 10 KiB web assets over HTTPS <a href="/author/ivan/">provided by our performance team</a> over a sustained period of time to properly heat up the processor. The figures are broken down into the average operating frequencies across all 48 cores, total package power drawn from the socket, and the highest reported die temperature out of the 8 dies that are laid out on the AMD EPYC 7642. Each figure will compare the results we obtained from power and performance determinism, and finally, cTDP at 240W using power determinism.</p><p>Performance determinism clearly emphasized stabilizing operating frequency by matching its frequency to its lowest performing core over time. This mode appears to be ideal for tuners that emphasizes predictability over maximizing the processor’s operating frequency. In other words, the number of cycles that the processor has at its disposal every second should be predictable. This is useful if two or more cores share data dependencies. By allowing the cores to work in unison; this can prevent one core stalling another. Power determinism on the other hand, maximized its power and frequency as much as it can.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2yiJbib8HJNMkMZc7On1K4/19411800792deb9713cc65c943fc232c/image12.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2KXAIrxO2pCwpDAMlHyKW/49769b6a78d78577c13ea0109d4410ac/image11-2.png" />
            
            </figure><p>Heat generated by power can be compounded even further by ambient temperature. All components should stay within safe operating temperature at all times as specified by the vendor’s datasheet. If unsure, please reach out to your vendor as soon as possible. We put the AMD EPYC 7642 through several thermal tests and determined that it will operate within safe operating temperatures. Before diving into the figure below, it is important to mention that our fan speed ramped up over time, preventing the processor from reaching critical temperature; nevertheless, this meant that our cooling solution worked as intended - a combination of fans and a heatsink rated for 240W. We have yet to see the processors throttle in production. The figure below shows the highest temperature of the 8 dies laid out on the AMD EPYC 7642.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/S2zzgzeBBeyhzBXxkU1Zz/8c7880845e49ceec2cf761265724d046/image8-3.png" />
            
            </figure><p>An unexpected byproduct of performance determinism was frequency jitter. It took a longer time for performance determinism to achieve steady-state frequency, which contradicted predictable performance that performance determinism mode was meant to achieve.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6LK2tZgnsa8m86vPQYdjrS/87474e0b887e438d97254fde28b2f8ac/image9-1.png" />
            
            </figure><p>Finally, here are the deltas out from the real world with performance determinism and TDP set to factory default of 225W as the baseline. Deltas under 10% can be influenced by a wide variety of factors especially in production, however, none of our data showed a negative trend. Here are the averages.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2ZT2L9MokepRw2GmZbKuxE/f3facacec8efefc02cf704137f09930e/image-5.png" />
            
            </figure>
    <div>
      <h2>Nodes Per Socket (NPS)</h2>
      <a href="#nodes-per-socket-nps">
        
      </a>
    </div>
    <p>The AMD EPYC 7642 <a href="/impact-of-cache-locality/">physically lays out its 8 dies across 4 different quadrants on a single package</a>. By having such a layout, AMD supports dividing its dies into NUMA domains and this feature is called Nodes Per Socket or NPS. Available NPS options differ model-to-model, the AMD EPYC 7642 supports 4, 2, and 1 node(s) per socket. We thought it might be worth our time exploring this option despite the fact that none of these choices will end up yielding a shared last level cache. We did not observe any significant deltas from the NPS options in terms of performance.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7aTakzcywLXCq9cVbJUapE/99073a5a3e205037b7561c641258091f/image15.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/26jjqqzj8LFJecjFpq8ucU/4306eb572afd428965162fbe454172c4/image13-1.png" />
            
            </figure>
    <div>
      <h2>Conclusion</h2>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>Tuning the processor to yield an additional 6% throughput or requests per second out of the box has been a great start. Some parts will have more rooms for improvement than others.  In production we were able to achieve an additional 2% requests per seconds with power determinism, and we achieved another 4% by reconfiguring the TDP to 240W. We will continue to work with AMD as well as internal teams within Cloudflare to identify additional areas of improvement. If you like the idea of supercharging the Internet on behalf of our customers, then <a href="https://www.cloudflare.com/careers/jobs/">come join us</a>.</p> ]]></content:encoded>
            <category><![CDATA[EPYC]]></category>
            <category><![CDATA[AMD]]></category>
            <category><![CDATA[Hardware]]></category>
            <category><![CDATA[Gen X]]></category>
            <guid isPermaLink="false">5S0eOaziY4ST5v0PscTOAW</guid>
            <dc:creator>Sung Park</dc:creator>
        </item>
        <item>
            <title><![CDATA[Impact of Cache Locality]]></title>
            <link>https://blog.cloudflare.com/impact-of-cache-locality/</link>
            <pubDate>Wed, 26 Feb 2020 12:00:00 GMT</pubDate>
            <description><![CDATA[ Our Gen X servers process more requests per second per core than our previous fleet. The AMD 2nd Gen EPYC 7642 processor’s large L3 cache minimizes L3 cache misses, and the time-savings add up quickly. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>In the past, we didn't have the opportunity to evaluate as many CPUs as we do today. The hardware ecosystem was simple – Intel had consistently delivered industry leading processors. Other vendors could not compete with them on both performance and cost. Recently it all changed: AMD has been challenging the status quo with their 2nd Gen EPYC processors.</p><p>This is not the first time that Intel has been challenged; previously <a href="/arm-takes-wing/">there was Qualcomm</a>, and we worked with AMD and considered their 1st Gen EPYC processors and based on the original Zen architecture, but ultimately, <a href="/a-tour-inside-cloudflares-g9-servers/">Intel prevailed</a>. AMD did not give up and unveiled their 2nd Gen EPYC processors codenamed Rome based on the latest Zen 2 architecture.</p><blockquote><p>Playing with some new fun kit. <a href="https://twitter.com/hashtag/epyc?src=hash&amp;ref_src=twsrc%5Etfw">#epyc</a> <a href="https://t.co/1No8Cmfzwl">pic.twitter.com/1No8Cmfzwl</a></p><p>— Matthew Prince ? (@eastdakota) <a href="https://twitter.com/eastdakota/status/1192898039003766785?ref_src=twsrc%5Etfw">November 8, 2019</a></p></blockquote><p>This made many improvements over its predecessors. Improvements include a die shrink from 14nm to 7nm, a doubling of the top end core count from 32 to 64, and a larger L3 cache size. Let’s emphasize again on the size of that L3 cache, which is 32 MiB L3 cache per Core Complex Die (CCD).</p><p>This time around, we have taken steps to understand our workloads at the hardware level through the use of hardware performance counters and profiling tools. Using these specialized CPU registers and profilers, we collected data on the AMD 2nd Gen EPYC and Intel Skylake-based Xeon processors in a lab environment, then validated our observations in production against other generations of servers from the past.</p>
    <div>
      <h2>Simulated Environment</h2>
      <a href="#simulated-environment">
        
      </a>
    </div>
    <p>CPU Specifications</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/42MpuiHDcFmNWT8c5GOh96/3666d84667b56b645e29aec5cfafdfdd/image-3.png" />
            
            </figure><p>We evaluated several Intel Cascade Lake and AMD 2nd Gen EPYC processors, trading off various factors between power and performance; the AMD EPYC 7642 CPU came out on top. The majority of Cascade Lake processors have 1.375 MiB L3 cache per core shared across all cores, a common theme that started with Skylake. On the other hand, the 2nd Gen EPYC processors start at 4 MiB per core. The AMD EPYC 7642 is a unique SKU since it has 256 MiB of L3 cache. Having a cache this large or approximately 5.33 MiB sitting right next to each core means that a program will spend fewer cycles fetching data from RAM with the capability to have more data readily available in the L3 cache.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7FVYxpe6TeVh26fV12eeBw/a285e437f90b2ac809811bb3645b1130/Infrastructure-before_2x.png" />
            
            </figure><p><i>Before (Intel)</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/zMlvsRWnuL6SwUUPyLHBu/13d459bee2cf7d0c195bb74b18c49555/Infrastructure-after-_2x--1-.png" />
            
            </figure><p><i>After (AMD)</i></p><p>Traditional cache layout has also changed with the introduction of 2nd Gen EPYC, a byproduct of AMD using a multi-chip module (MCM) design. The 256 MiB L3 cache is formed by 8 individual dies or Core Complex Die (CCD) that is formed by 2 Core Complexes (CCX) with each CCX containing 16 MiB of L3 cache.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5oqKl2iToZamCbBNQBH2uj/ba9b72846f7f81c92e0ccf705f3be9c1/image6.png" />
            
            </figure><p><i>Core Complex (CCX) - Up to four cores</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6p5FRRU9VZTMWhkdNH7g4/acb4ff79d8916a20278f8c50e21c53bb/image9.png" />
            
            </figure><p><b>Core Complex Die (CCD) - Created by combining two CCXs</b></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2IyMxh74THzCubUs6H3SY1/a031494b9f0783406ef653b3e99ad598/image1-2.png" />
            
            </figure><p><i>AMD 2nd Gen EPYC 7642 - Created with 8x CCDs plus an I/O die in the center</i></p>
    <div>
      <h3>Methodology</h3>
      <a href="#methodology">
        
      </a>
    </div>
    <p>Our production traffic shares many characteristics of a sustained workload which typically does not induce large variation in operating frequencies nor enter periods of idle time. We picked out a simulated traffic pattern that closely resembled our production traffic behavior which was the Cached 10KiB png via HTTPS. We were interested in assessing the CPU’s maximum throughput or requests per second (RPS), one of our key metrics. With that being said, we did not disable Intel Turbo Boost or AMD Precision Boost, nor matched the frequencies clock-for-clock while measuring for requests per second, instructions retired per second (IPS), L3 cache miss rate, and sustained operating frequency.</p>
    <div>
      <h3>Results</h3>
      <a href="#results">
        
      </a>
    </div>
    <p>The 1P AMD 2nd Gen EPYC 7642 powered server took the lead and processed 50% more requests per second compared to our Gen 9’s 2P Intel Xeon Platinum 6162 server.</p><p>We are running a sustained workload, so we should end up with a sustained operating frequency that is higher than base clock. The AMD EPYC 7642 operating frequency or the number cycles that the processor had at its disposal was approximately 20% greater than the Intel Xeon Platinum 6162, so frequency alone was not enough to explain the 50% gain in requests per second.</p><p>Taking a closer look, the number of instructions retired over time was far greater on the AMD 2nd Gen EPYC 7642 server, thanks to its low L3 cache miss rate.</p>
    <div>
      <h3>Production Environment</h3>
      <a href="#production-environment">
        
      </a>
    </div>
    <p>CPU Specifications</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7lji8wRNR827IKHgDE3asr/3180fa701066cee223dde822b313d8ec/image-2.png" />
            
            </figure>
    <div>
      <h3>Methodology</h3>
      <a href="#methodology">
        
      </a>
    </div>
    <p>Our most predominant bottleneck appears to be the cache memory and we saw significant improvement in requests per second as well as <a href="/an-epyc-trip-to-rome-amd-is-cloudflares-10th-generation-edge-server-cpu/">time to process a request</a> due to low L3 cache miss rate. The data we present in this section was collected at a point of presence that spanned between Gen 7 to Gen 9 servers. We also collected data from a secondary region to gain additional confidence that the data we present here was not unique to one particular environment. Gen 9 is the baseline just as we have done in the previous section.</p><p>We put the 2nd Gen EPYC-based Gen X into production with hopes that the results would mirror closely to what we have previously seen in the lab. We found that the requests per second did not quite align with the results we had hoped, but the AMD EPYC server still outperformed all previous generations including outperforming the Intel Gen 9 server by 36%.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4V8uzcFfnFwUIH0leecLnm/232bd88ceb2216efa4fae242a085a140/image8.png" />
            
            </figure><p>Sustained operating frequency was nearly identical to what we have seen back in the lab.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3DhckmjQqo7b9JtllouvVL/19b3fda2e8a5a277c511269f4bc7a148/image10.png" />
            
            </figure><p>Due to the lower than expected requests per second, we also saw lower instructions retired over time and higher L3 cache miss rate but maintained a lead over Gen 9, with 29% better performance.</p>
    <div>
      <h2>Conclusion</h2>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>The single AMD EPYC 7642 performed very well during our lab testing, beating our Gen 9 server with dual Intel Xeon Platinum 6162 with the same total number of cores. Key factors we noticed were its large L3 cache, which led to a low L3 cache miss rate, as well as a higher sustained operating frequency. The AMD 2nd Gen EPYC 7642 did not have as big of an advantage in production, but nevertheless still outperformed all previous generations. The observation we made in production was based on a PoP that could have been influenced by a number of other factors such as but not limited to ambient temperature, timing, and other new products that will shape our traffic patterns in the future such as <a href="/webassembly-on-cloudflare-workers/">WebAssembly on Cloudflare Workers</a>. The AMD EPYC 7642 opens up the possibility for our upcoming Gen X server to maintain the same core count while processing more requests per second than its predecessor.</p><p>Got a passion for hardware? I think we should get in touch. We are always looking for talented and curious individuals to <a href="https://www.cloudflare.com/careers/departments/">join our team</a>. The data presented here would not have been possible if it was not for the teamwork between many different individuals within Cloudflare. As a team, we strive to work together to create highly performant, reliable, and secure systems that will form the pillars of our rapidly growing <a href="https://www.cloudflare.com/network/">network</a> that spans 200 cities in more than 90 countries and we are just getting started.</p> ]]></content:encoded>
            <category><![CDATA[Hardware]]></category>
            <category><![CDATA[Data Center]]></category>
            <category><![CDATA[Cloudflare Network]]></category>
            <category><![CDATA[Partners]]></category>
            <category><![CDATA[EPYC]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">2QRJzUFnyzSRaIXLggtDqr</guid>
            <dc:creator>Sung Park</dc:creator>
        </item>
    </channel>
</rss>