
<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>Wed, 08 Apr 2026 18:00:25 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Debugging Hardware Performance on Gen X Servers]]></title>
            <link>https://blog.cloudflare.com/debugging-hardware-performance-on-gen-x-servers/</link>
            <pubDate>Tue, 17 May 2022 12:59:23 GMT</pubDate>
            <description><![CDATA[ In Cloudflare’s global network, every server runs the whole software stack. Therefore, it's critical that every server performs to its maximum potential capacity ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5T1hkMmQNOOw0lktUx3JFF/2e5e4aa40039a6ad46c2a251eb421650/gen-x-color-Friday--twitter_2x-1.png" />
            
            </figure><p>In Cloudflare’s global network, every server runs the whole software stack. Therefore, it's critical that every server performs to its maximum potential capacity. In order to provide us better flexibility from a supply chain perspective, we buy server hardware from multiple vendors with the exact same configuration. However, after the deployment of our Gen X AMD EPYC Zen 2 (Rome) servers, we noticed that servers from one vendor (which we’ll call SKU-B) were consistently performing 5-10% worse than servers from second vendor (which we'll call SKU-A).</p><p>The graph below shows the performance discrepancy between the two SKUs in terms of percentage difference. The performance is gauged on the metric of requests per second, and this data is an average of observations captured over 24 hours.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/wvNDGyAxlthdlOg3DW5Ur/163ac5682c189dae77797fc9eda582f7/1-2.png" />
            
            </figure><p>Machines before implementing performance improvements. The average RPS for SKU-B is approximately 10% below SKU-A.</p>
    <div>
      <h3>Compute performance via DGEMM</h3>
      <a href="#compute-performance-via-dgemm">
        
      </a>
    </div>
    <p>The initial debugging efforts centered around the compute performance. We ran AMD’s <a href="http://www.netlib.org/lapack/explore-html/d1/d54/group__double__blas__level3_gaeda3cbd99c8fb834a60a6412878226e1.html">DGEMM</a> high performance computing tool to determine if CPU performance was the cause. DGEMM is designed to measure the sustained floating-point computation rate of a single server. Specifically, the code measures the floating point rate of execution of a real matrix–matrix multiplication with double precision. We ran a modified version of DGEMM equipped with specific AMD libraries to support the EPYC processor instruction set.</p><p>The DGEMM test brought out a few points related to the processor’s Thermal Design Power (TDP). TDP refers to the maximum power that a processor can draw for a thermally significant period while running a software application. The underperforming servers were only drawing 215 to 220 watts of power when fully stressed, whereas the max supported TDP on the processors is 240 watts. Additionally, their floating-point computation rate was ~100 gigaflops (GFLOPS) behind the better performing servers.</p><p>Screenshot from the DGEMM run of a good system:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2vOh2PokcYbj1v6kev1fQt/96fdec6bfa79b9cb9042c2f7d7d60119/2.png" />
            
            </figure><p>Screenshot from an underperforming system:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1OQ7wN5uXDI1Ttiv28QpzE/5389a020a89ace802506133dcaf04ce0/3.png" />
            
            </figure><p>To debug the issue, we first tried disabling idle power saving mode (also known as C-states) in the CPU BIOS configuration. The servers reported expected GFLOPS numbers and achieved max TDP. Believing that this could have been the root cause, the servers were moved back into the production test environment for data collection.</p><p>However, the performance delta was still there.</p>
    <div>
      <h3>Further debugging</h3>
      <a href="#further-debugging">
        
      </a>
    </div>
    <p>We started the debugging process all over again by comparing the BIOS settings logs of both SKU-A and SKU-B. Once this debugging option was exhausted, the focus shifted to the network interface. We ran the open source network interface tool <a href="https://iperf.fr/iperf-download.php">iPerf</a> to check if there were any bottlenecks — no issues were observed either.</p><p>During this activity, we noticed that the BIOS of both SKUs were not using the AMD Preferred I/O functionality, which allows devices on a single PCIe bus to obtain improved DMA write performance. We enabled the Preferred I/O option on SKU-B and tested the change in production. Unfortunately, there were no performance gains. After the focus on network activity, the team started looking into memory configuration and operating speed.</p>
    <div>
      <h3>AMD HSMP tool &amp; Infinity Fabric diagnosis</h3>
      <a href="#amd-hsmp-tool-infinity-fabric-diagnosis">
        
      </a>
    </div>
    <p>The Gen X systems are configured with DDR4 memory modules that can support a maximum of 2933 megatransfers per second (MT/s). With the BIOS configuration for memory clock Frequency set to Auto, the 2933 MT/s automatically configures the memory clock frequency to 1467 MHz. Double Data Rate (DDR) technology allows for the memory signal to be sampled twice per clock cycle: once on the rising edge and once on the falling edge of the clock signal. Because of this, the reported memory speed rate is twice the true memory clock frequency. Memory bandwidth was validated to be working quite well by running a <a href="https://github.com/jeffhammond/STREAM">Stream</a> benchmark test.</p><p>Running out of debugging options, we reached out to AMD for assistance and were provided a debug tool called <a href="https://github.com/amd/amd_hsmp">HSMP</a> that lets users access the Host System Management Port. This tool provides a wide variety of processor management options, such as reading and changing processor TDP limits, reading processor and memory temperatures, and reading memory and processor clock frequencies. When we ran the HSMP tool, we discovered that the memory was being clocked at a different rate from AMD’s Infinity Fabric system — the architecture which connects the memory to the processor core. As shown below, the memory clock frequency was set to 1467 MHz while the Infinity Fabric clock frequency was set to 1333 MHz.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3Cq2VxpFjJN4fesZur1auc/979823ac8ebd8961a859b23ccbaee087/4.png" />
            
            </figure><p>Ideally, the two clock frequencies need to be equal for optimized workloads sensitive to latency and throughput. Below is a snapshot for an SKU-A server where both memory and Infinity Fabric frequencies are equal.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3niJPphw3HJr2Z8CoSBCzU/28b6a48b6f881983b6a41f38563559b4/5.png" />
            
            </figure>
    <div>
      <h3>Improved Performance</h3>
      <a href="#improved-performance">
        
      </a>
    </div>
    <p>Since the Infinity Fabric clock setting was not exposed as a tunable parameter in the BIOS, we asked the vendor to provide a new BIOS that set the frequency to 1467 MHz during compile time. Once we deployed the new BIOS on the underperforming systems in production, we saw that all servers started performing to their expected levels. Below is a snapshot of the same set of systems with data captured and averaged over a 24 hours window on the same day of the week as the previous dataset. Now, the requests per second performance of SKU-B equals and in some cases exceeds the performance of SKU-A!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1sFDwVBvdiVO3gWaTtI2FG/3fa8433840f2d5bef0d8504a50a1962b/6.png" />
            
            </figure><p>Internet Requests Per Second (RPS) for four SKU-A machines and four SKU-B machines after implementing the BIOS fix on SKU-B. The RPS of SKU-B now equals the RPS of SKU-A.</p><p>Hello, I am Yasir Jamal. I recently joined Cloudflare as a Hardware Engineer with the goal of helping provide a better Internet to everyone. If you share the same interest, come <a href="https://www.cloudflare.com/careers/">join us</a>!</p> ]]></content:encoded>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Gen X]]></category>
            <category><![CDATA[Cloudflare Network]]></category>
            <category><![CDATA[Hardware]]></category>
            <guid isPermaLink="false">5YSW4T1CSOOlsvgHAheCMW</guid>
            <dc:creator>Yasir Jamal</dc:creator>
        </item>
        <item>
            <title><![CDATA[Getting to the Core: Benchmarking Cloudflare’s Latest Server Hardware]]></title>
            <link>https://blog.cloudflare.com/getting-to-the-core/</link>
            <pubDate>Fri, 20 Nov 2020 12:00:00 GMT</pubDate>
            <description><![CDATA[ A refresh of the hardware that Cloudflare uses to run analytics provided big efficiency improvements. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Maintaining a server fleet the size of Cloudflare’s is an operational challenge, to say the least. Anything we can do to lower complexity and improve efficiency has effects for our SRE (Site Reliability Engineer) and Data Center teams that can be felt throughout a server’s 4+ year lifespan.</p><p>At the Cloudflare Core, we process logs to analyze attacks and compute analytics. In 2020, our Core servers were in need of a refresh, so we decided to redesign the hardware to be more in line with our Gen X edge servers. We designed two major server variants for the core. The first is Core Compute 2020, an AMD-based server for analytics and general-purpose compute paired with solid-state storage drives. The second is Core Storage 2020, an Intel-based server with twelve spinning disks to run database workloads.</p>
    <div>
      <h2>Core Compute 2020</h2>
      <a href="#core-compute-2020">
        
      </a>
    </div>
    <p>Earlier this year, we blogged about our 10th generation edge servers or Gen X and the <a href="/technical-details-of-why-cloudflare-chose-amd-epyc-for-gen-x-servers/">improvements</a> they delivered to our edge in <a href="/an-epyc-trip-to-rome-amd-is-cloudflares-10th-generation-edge-server-cpu/">both</a> performance and <a href="/securing-memory-at-epyc-scale/">security</a>. The new Core Compute 2020 server leverages many of our learnings from the edge server. The Core Compute servers run a variety of workloads including Kubernetes, Kafka, and various smaller services.</p>
    <div>
      <h3>Configuration Changes (Kubernetes)</h3>
      <a href="#configuration-changes-kubernetes">
        
      </a>
    </div>
    <table><tr><td><p>
</p></td><td><p><b>Previous Generation Compute</b></p></td><td><p><b>Core Compute 2020</b></p></td></tr><tr><td><p>CPU</p></td><td><p>2 x Intel Xeon Gold 6262</p></td><td><p>1 x AMD EPYC 7642</p></td></tr><tr><td><p>Total Core / Thread Count</p></td><td><p>48C / 96T</p></td><td><p>48C / 96T</p></td></tr><tr><td><p>Base / Turbo Frequency</p></td><td><p>1.9 / 3.6 GHz</p></td><td><p>2.3 / 3.3 GHz</p></td></tr><tr><td><p>Memory</p></td><td><p>8 x 32GB DDR4-2666</p></td><td><p>8 x 32GB DDR4-2933</p></td></tr><tr><td><p>Storage</p></td><td><p>6 x 480GB SATA SSD</p></td><td><p>2 x 3.84TB NVMe SSD</p></td></tr><tr><td><p>Network</p></td><td><p>Mellanox CX4 Lx 2 x 25GbE</p></td><td><p>Mellanox CX4 Lx 2 x 25GbE</p></td></tr></table><p><b>Configuration Changes (Kafka)</b></p><table><tr><td><p>
</p></td><td><p><b>Previous Generation (Kafka)</b></p></td><td><p><b>Core Compute 2020</b></p></td></tr><tr><td><p>CPU</p></td><td><p>2 x Intel Xeon Silver 4116</p></td><td><p>1 x AMD EPYC 7642</p></td></tr><tr><td><p>Total Core / Thread Count</p></td><td><p>24C / 48T</p></td><td><p>48C / 96T</p></td></tr><tr><td><p>Base / Turbo Frequency</p></td><td><p>2.1 / 3.0 GHz</p></td><td><p>2.3 / 3.3 GHz</p></td></tr><tr><td><p>Memory</p></td><td><p>6 x 32GB DDR4-2400</p></td><td><p>8 x 32GB DDR4-2933</p></td></tr><tr><td><p>Storage</p></td><td><p>12 x 1.92TB SATA SSD</p></td><td><p>10 x 3.84TB NVMe SSD</p></td></tr><tr><td><p>Network</p></td><td><p>Mellanox CX4 Lx 2 x 25GbE</p></td><td><p>Mellanox CX4 Lx 2 x 25GbE</p></td></tr></table><p>Both previous generation servers were Intel-based platforms, with the Kubernetes server based on Xeon 6262 processors, and the Kafka server based on Xeon 4116 processors. One goal with these refreshed versions was to converge the configurations in order to simplify spare parts and firmware management across the fleet.</p><p>As the above tables show, the configurations have been converged with the only difference being the number of NVMe drives installed depending on the workload running on the host. In both cases we moved from a dual-socket configuration to a single-socket configuration, and the number of cores and threads per server either increased or stayed the same. In all cases, the base frequency of those cores was significantly improved. We also moved from SATA SSDs to NVMe SSDs.</p>
    <div>
      <h3>Core Compute 2020 Synthetic Benchmarking</h3>
      <a href="#core-compute-2020-synthetic-benchmarking">
        
      </a>
    </div>
    <p>The heaviest user of the SSDs was determined to be Kafka. The majority of the time Kafka is sequentially writing 2MB blocks to the disk. We created a simple FIO script with 75% sequential write and 25% sequential read, scaling the block size from a standard page table entry size of 4096B to Kafka’s write size of 2MB. The results aligned with what we expected from an NVMe-based drive.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6gqCJeXAL1sUcfVmBW3tVx/7b8a3a9a233086a321967ebb20878434/image5-5.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6jvSoQBw4BnPCkDYGyeqBH/b2c0a79f10afbdd73ee73d2545f5700f/image4-9.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1N6j9iEmdVaGiomZaoT1wH/cea3efb6d4781f8c0856743869feeb39/image3-8.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3KfgNVcwPiNMcb9Gv3T2KU/74c8932b2f69bacfa32754c4c7c1e2d8/image6-5.png" />
            
            </figure>
    <div>
      <h3>Core Compute 2020 Production Benchmarking</h3>
      <a href="#core-compute-2020-production-benchmarking">
        
      </a>
    </div>
    <p>Cloudflare runs many of our Core Compute services in Kubernetes containers, some of which are multi-core. By transitioning to a single socket, problems associated with dual sockets were eliminated, and we are guaranteed to have all cores allocated for any given container on the same socket.</p><p>Another heavy workload that is constantly running on Compute hosts is the Cloudflare <a href="/the-csam-scanning-tool/">CSAM Scanning Tool</a>. Our Systems Engineering team isolated a Compute 2020 compute host and the previous generation compute host, had them run just this workload, and measured the time to compare the fuzzy hashes for images to the NCMEC hash lists and verify that they are a “miss”.</p><p>Because the CSAM Scanning Tool is very compute intensive we specifically isolated it to take a look at its performance with the new hardware. We’ve spent a great deal of effort on software optimization and improved algorithms for this tool but investing in faster, better hardware is also important.</p><p>In these heatmaps, the X axis represents time, and the Y axis represents “buckets” of time taken to verify that it is not a match to one of the NCMEC hash lists. For a given time slice in the heatmap, the red point is the bucket with the most times measured, the yellow point the second most, and the green points the least. The red points on the Compute 2020 graph are all in the 5 to 8 millisecond bucket, while the red points on the previous Gen heatmap are all in the 8 to 13 millisecond bucket, which shows that on average, the Compute 2020 host is verifying hashes significantly faster.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6JYLpJjG9bAUuQLyeC2kyH/9168b62067b8776a7521e7d831472f74/image2-10.png" />
            
            </figure>
    <div>
      <h2>Core Storage 2020</h2>
      <a href="#core-storage-2020">
        
      </a>
    </div>
    <p>Another major workload we identified was <a href="/clickhouse-capacity-estimation-framework/">ClickHouse</a>, which performs analytics over large datasets. The last time we upgraded our servers running ClickHouse was back in <a href="/http-analytics-for-6m-requests-per-second-using-clickhouse/">2018</a>.</p>
    <div>
      <h3>Configuration Changes</h3>
      <a href="#configuration-changes">
        
      </a>
    </div>
    <table><tr><td><p>
</p></td><td><p><b>Previous Generation</b></p></td><td><p><b>Core Storage 2020</b></p></td></tr><tr><td><p>CPU</p></td><td><p>2 x Intel Xeon E5-2630 v4</p></td><td><p>1 x Intel Xeon Gold 6210U</p></td></tr><tr><td><p>Total Core / Thread Count</p></td><td><p>20C / 40T</p></td><td><p>20C / 40T</p></td></tr><tr><td><p>Base / Turbo Frequency</p></td><td><p>2.2 / 3.1 GHz</p></td><td><p>2.5 / 3.9 GHz</p></td></tr><tr><td><p>Memory</p></td><td><p>8 x 32GB DDR4-2400</p></td><td><p>8 x 32GB DDR4-2933</p></td></tr><tr><td><p>Storage</p></td><td><p>12 x 10TB 7200 RPM 3.5” SATA</p></td><td><p>12 x 10TB 7200 RPM 3.5” SATA</p></td></tr><tr><td><p>Network</p></td><td><p>Mellanox CX4 Lx 2 x 25GbE</p></td><td><p>Mellanox CX4 Lx 2 x 25GbE</p></td></tr></table><p><b>CPU Changes</b></p><p>For ClickHouse, we use a 1U chassis with 12 x 10TB 3.5” hard drives. At the time we were designing Core Storage 2020 our server vendor did not yet have an AMD version of this chassis, so we remained on Intel. However, we moved Core Storage 2020 to a single 20 core / 40 thread Xeon processor, rather than the previous generation’s dual-socket 10 core / 20 thread processors. By moving to the single-socket Xeon 6210U processor, we were able to keep the same core count, but gained 17% higher base frequency and 26% higher max turbo frequency. Meanwhile, the total CPU thermal design profile (TDP), which is an approximation of the maximum power the CPU can draw, went down from 165W to 150W.</p><p>On a dual-socket server, remote memory accesses, which are memory accesses by a process on socket 0 to memory attached to socket 1, incur a latency penalty, as seen in this table:</p><table><tr><td><p>
</p></td><td><p><b>Previous Generation</b></p></td><td><p><b>Core Storage 2020</b></p></td></tr><tr><td><p>Memory latency, socket 0 to socket 0</p></td><td><p>81.3 ns</p></td><td><p>86.9 ns</p></td></tr><tr><td><p>Memory latency, socket 0 to socket 1</p></td><td><p>142.6 ns</p></td><td><p>N/A</p></td></tr></table><p>An additional advantage of having a CPU with all 20 cores on the same socket is the elimination of these remote memory accesses, which take 76% longer than local memory accesses.</p>
    <div>
      <h3>Memory Changes</h3>
      <a href="#memory-changes">
        
      </a>
    </div>
    <p>The memory in the Core Storage 2020 host is rated for operation at 2933 MHz; however, in the 8 x 32GB configuration we need on these hosts, the Intel Xeon 6210U processor clocks them at 2666 MH. Compared to the previous generation, this gives us a 13% boost in memory speed. While we would get a slightly higher clock speed with a balanced, 6 DIMMs configuration, we determined that we are willing to sacrifice the slightly higher clock speed in order to have the additional RAM capacity provided by the 8 x 32GB configuration.</p>
    <div>
      <h3>Storage Changes</h3>
      <a href="#storage-changes">
        
      </a>
    </div>
    <p>Data capacity stayed the same, with 12 x 10TB SATA drives in RAID 0 configuration for best  throughput. Unlike the previous generation, the drives in the Core Storage 2020 host are helium filled. Helium produces less drag than air, resulting in potentially lower latency.</p>
    <div>
      <h3>Core Storage 2020 Synthetic benchmarking</h3>
      <a href="#core-storage-2020-synthetic-benchmarking">
        
      </a>
    </div>
    <p>We performed synthetic four corners benchmarking: IOPS measurements of random reads and writes using 4k block size, and bandwidth measurements of sequential reads and writes using 128k block size. We used the fio tool to see what improvements we would get in a lab environment. The results show a 10% latency improvement and 11% IOPS improvement in random read performance. Random write testing shows 38% lower latency and 60% higher IOPS. Write throughput is improved by 23%, and read throughput is improved by a whopping 90%.</p><p></p><table><tr><td><p>
</p></td><td><p><b>Previous Generation</b></p></td><td><p><b>Core Storage 2020</b></p></td><td><p><b>% Improvement</b></p></td></tr><tr><td><p>4k Random Reads (IOPS)</p></td><td><p>3,384</p></td><td><p>3,758</p></td><td><p>11.0%</p></td></tr><tr><td><p>4k Random Read Mean Latency (ms, lower is better)</p></td><td><p>75.4</p></td><td><p>67.8</p></td><td><p>10.1% lower</p></td></tr><tr><td><p>4k Random Writes (IOPS)</p></td><td><p>4,009</p></td><td><p>6,397</p></td><td><p>59.6%</p></td></tr><tr><td><p>4k Random Write Mean Latency (ms, lower is better)</p></td><td><p>63.5</p></td><td><p>39.7</p></td><td><p>37.5% lower</p></td></tr><tr><td><p>128k Sequential Reads (MB/s)</p></td><td><p>1,155</p></td><td><p>2,195</p></td><td><p>90.0%</p></td></tr><tr><td><p>128k Sequential Writes (MB/s)</p></td><td><p>1,265</p></td><td><p>1,558</p></td><td><p>23.2%</p></td></tr></table>
    <div>
      <h3>CPU frequencies</h3>
      <a href="#cpu-frequencies">
        
      </a>
    </div>
    <p>The higher base and turbo frequencies of the Core Storage 2020 host’s Xeon 6210U processor allowed that processor to achieve higher average frequencies while running our production ClickHouse workload. A recent snapshot of two production hosts showed the Core Storage 2020 host being able to sustain an average of 31% higher CPU frequency while running ClickHouse.</p><table><tr><td><p>
</p></td><td><p><b>Previous generation (average core frequency)</b></p></td><td><p><b>Core Storage 2020 (average core frequency)</b></p></td><td><p><b>% improvement</b></p></td></tr><tr><td><p>Mean Core Frequency</p></td><td><p>2441 MHz</p></td><td><p>3199 MHz</p></td><td><p>31%</p></td></tr></table>
    <div>
      <h3>Core Storage 2020 Production benchmarking</h3>
      <a href="#core-storage-2020-production-benchmarking">
        
      </a>
    </div>
    <p>Our ClickHouse database hosts are continually performing merge operations to optimize the database data structures. Each individual merge operation takes just a few seconds on average, but since they’re constantly running, they can consume significant resources on the host. We sampled the average merge time every five minutes over seven days, and then sampled the data to find the average, minimum, and maximum merge times reported by a Compute 2020 host and by a previous generation host. Results are summarized below.</p>
    <div>
      <h3>ClickHouse merge operation performance improvement</h3>
      <a href="#clickhouse-merge-operation-performance-improvement">
        
      </a>
    </div>
    <table><tr><td><p><b>Time</b></p></td><td><p><b>Previous generation</b></p></td><td><p><b>Core Storage 2020</b></p></td><td><p><b>% improvement</b></p></td></tr><tr><td><p>Mean time to merge</p></td><td><p>1.83</p></td><td><p>1.15</p></td><td><p>37% lower</p></td></tr><tr><td><p>Maximum merge time</p></td><td><p>3.51</p></td><td><p>2.35</p></td><td><p>33% lower</p></td></tr><tr><td><p>Minimum merge time</p></td><td><p>0.68</p></td><td><p>0.32</p></td><td><p>53% lower</p></td></tr></table><p>Our lab-measured CPU frequency and storage performance improvements on Core Storage 2020 have translated into significantly reduced times to perform this database operation.</p>
    <div>
      <h2>Conclusion</h2>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>With our Core 2020 servers, we were able to realize significant performance improvements, both in synthetic benchmarking outside production and in the production workloads we tested. This will allow Cloudflare to run the same workloads on fewer servers, saving CapEx costs and data center rack space. The similarity of the configuration of the Kubernetes and Kafka hosts should help with fleet management and spare parts management. For our next redesign, we will try to further converge the designs on which we run the major Core workloads to further improve efficiency.</p><p>Special thanks to Will Buckner and Chris Snook for their help in the development of these servers, and to Tim Bart for validating CSAM Scanning Tool’s performance on Compute.</p> ]]></content:encoded>
            <category><![CDATA[Hardware]]></category>
            <category><![CDATA[Kafka]]></category>
            <category><![CDATA[Kubernetes]]></category>
            <category><![CDATA[ClickHouse]]></category>
            <category><![CDATA[Gen X]]></category>
            <guid isPermaLink="false">4fzfrcZ8XekQ1ykkMxltp1</guid>
            <dc:creator>Brian Bassett</dc:creator>
        </item>
        <item>
            <title><![CDATA[Why Cloudflare Chose AMD EPYC for Gen X Servers]]></title>
            <link>https://blog.cloudflare.com/technical-details-of-why-cloudflare-chose-amd-epyc-for-gen-x-servers/</link>
            <pubDate>Sun, 01 Mar 2020 13:00:00 GMT</pubDate>
            <description><![CDATA[ Looking back at this week's posts on the design, specifications, and performance of Cloudflare’s Gen X servers using AMD CPUs. Every server can run every service. This architectural decision has helped us achieve higher efficiency across the Cloudflare network.  ]]></description>
            <content:encoded><![CDATA[ <p>From the very beginning Cloudflare used Intel CPU-based servers (and, also, Intel components for things like NICs and SSDs). But we're always interested in optimizing the cost of running our service so that we can provide products at a low cost and high gross margin.</p><p>We're also mindful of events like the <a href="/meltdown-spectre-non-technical/">Spectre and Meltdown</a> vulnerabilities and have been working with outside parties on research into mitigation and exploitation which we hope to publish later this year.</p><p>We looked very seriously at <a href="/arm-takes-wing/">ARM-based CPUs</a> and continue to keep our software up to date for the ARM architecture so that we can use ARM-based CPUs when the requests per watt is interesting to us.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1FIEEXHXXE0TW20DbFc1qG/bd65d80a3f61062de14027374907daf5/gen-x-color-Friday--twitter_2x.png" />
            
            </figure><p>In the meantime, we've deployed AMD's EPYC processors as part of Gen X server platform and for the first time are not using any Intel components at all. This week, we announced details of this tenth generation of servers. Below is a recap of why we're excited about the design, specifications, and performance of our newest hardware.</p>
    <div>
      <h2><a href="/cloudflares-gen-x-servers-for-an-accelerated-future/">Servers for an Accelerated Future</a></h2>
      <a href="#">
        
      </a>
    </div>
    <p>Every server can run every service. This architectural decision has helped us achieve higher efficiency across the Cloudflare network. It has also given us more flexibility to build new software or adopt the newest available hardware.</p><p>Notably, Intel is not inside. We are not using their hardware for any major server components such as the CPU, board, memory, storage, network interface card (or any type of accelerator).</p><p>This time, AMD is inside.</p><p>Compared with our prior server (<a href="/a-tour-inside-cloudflares-g9-servers/">Gen 9</a>), our Gen X server processes as much as 36% more requests while costing substantially less. Additionally, it enables a ~50% decrease in L3 cache miss rate and up to 50% decrease in NGINX p99 latency, powered by a CPU rated at 25% lower TDP (thermal design power) per core.</p>
    <div>
      <h2><a href="/an-epyc-trip-to-rome-amd-is-cloudflares-10th-generation-edge-server-cpu/">Gen X CPU benchmarks</a></h2>
      <a href="#">
        
      </a>
    </div>
    <p>To identify the most efficient CPU for our software stack, we ran several benchmarks for key workloads such as cryptography, compression, regular expressions, and LuaJIT. Then, we simulated typical requests we see, before testing servers in live production to measure requests per watt.    </p><p>Based on our findings, we selected the single socket 48-core AMD 2nd Gen EPYC 7642.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/40QrPSva2FXZVgsZTln51q/2c15c60f27009a1ad459ae390afc49c6/pasted-image-0.png" />
            
            </figure>
    <div>
      <h2><a href="/impact-of-cache-locality/">Impact of Cache Locality</a></h2>
      <a href="#">
        
      </a>
    </div>
    <p>The single AMD EPYC 7642 performed very well during our lab testing, beating our <a href="/a-tour-inside-cloudflares-g9-servers/">Gen 9</a> 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.</p>
    <div>
      <h2><a href="/gen-x-performance-tuning/">Gen X Performance Tuning</a></h2>
      <a href="#">
        
      </a>
    </div>
    <p>Partnering with AMD, we tuned the 2nd Gen EPYC 7642 processor to achieve additional 6% performance. We achieved this by using power determinism and configuring the CPU's Thermal Design Power (TDP).</p>
    <div>
      <h2><a href="/securing-memory-at-epyc-scale/">Securing Memory at EPYC Scale</a></h2>
      <a href="#">
        
      </a>
    </div>
    <p>Finally, we described how we use Secure Memory Encryption (SME), an interesting security feature within the System on a Chip architecture of the AMD EPYC line. We were impressed by how we could achieve RAM encryption without significant decrease in performance. This reduces the worry that any data could be exfiltrated from a stolen server.</p><p>We enjoy designing hardware that improves the security, performance and reliability of our global network, trusted by over 26 million Internet properties.</p><p>Want to help us evaluate new hardware? <a href="https://www.cloudflare.com/careers/">Join us</a>!</p> ]]></content:encoded>
            <category><![CDATA[EPYC]]></category>
            <category><![CDATA[AMD]]></category>
            <category><![CDATA[Gen X]]></category>
            <category><![CDATA[Cache]]></category>
            <category><![CDATA[Hardware]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">6UGZUyfF1u3jKKAHkxgDNq</guid>
            <dc:creator>Nitin Rao</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>
    </channel>
</rss>