
<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, 15 Apr 2026 21:12:27 GMT</lastBuildDate>
        <item>
            <title><![CDATA[An introduction to three-phase power and PDUs]]></title>
            <link>https://blog.cloudflare.com/an-introduction-to-three-phase-power-and-pdus/</link>
            <pubDate>Fri, 04 Dec 2020 14:05:37 GMT</pubDate>
            <description><![CDATA[ This blog is a quick Electrical Engineering 101 session going over specifically how 3-phase PDUs work, along with some good practices on how we use them ]]></description>
            <content:encoded><![CDATA[ <p>Our fleet of over 200 locations comprises various generations of servers and routers. And with the ever changing landscape of services and computing demands, it’s imperative that we manage power in our data centers right. This blog is a brief Electrical Engineering 101 session going over specifically how power distribution units (PDU) work, along with some good practices on how we use them. It appears to me that we could all use a bit more knowledge on this topic, and more love and appreciation of something that’s critical but usually taken for granted, like hot showers and opposable thumbs.</p><p>A PDU is a device used in data centers to distribute power to multiple rack-mounted machines. It’s an industrial grade power strip typically designed to power an average consumption of about <a href="https://www.eia.gov/tools/faqs/faq.php?id=97&amp;t=3">seven US households</a>. Advanced models have monitoring features and can be accessed via <a href="https://www.cloudflare.com/learning/access-management/what-is-ssh/">SSH</a> or webGUI to turn on and off power outlets. How we choose a PDU depends on what country the data center is and what it provides in terms of <a href="https://www.worldstandards.eu/electricity/three-phase-electric-power/">voltage, phase, and plug type</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5VQToUAxoKYdAqSWgqOyDS/15afd55e2d243d5ae444bf39929cc88c/Artboard-1.png" />
            
            </figure><p>For each of our racks, all of our dual power-supply (PSU) servers are cabled to one of the two vertically mounted PDUs. As shown in the picture above, one PDU feeds a server’s PSU via a red cable, and the other PDU feeds that server’s other PSU via a blue cable. This is to ensure we have power redundancy maximizing our service uptime; in case one of the PDUs or server PSUs fail, the redundant power feed will be available keeping the server alive.</p>
    <div>
      <h3>Faraday’s Law and Ohm’s Law</h3>
      <a href="#faradays-law-and-ohms-law">
        
      </a>
    </div>
    <p>Like most high-voltage applications, PDUs and servers are designed to use AC power. Meaning voltage and current aren’t constant — they’re sine waves with magnitudes that can alternate between positive and negative at a certain frequency. For example, a voltage feed of 100V is not constantly at 100V, but it bounces between 100V and -100V like a sine wave. One complete sine wave cycle is one phase of 360 degrees, and running at 50Hz means there are 50 cycles per second.</p><p>The sine wave can be explained by Faraday’s Law and by looking at how an AC power generator works. Faraday’s Law tells us that a current is induced to flow due to a changing magnetic field. Below illustrates a simple generator with a permanent magnet rotating at constant speed and a coil coming in contact with the magnet’s magnetic field. Magnetic force is strongest at the North and South ends of the magnet. So as it rotates on itself near the coil, current flow fluctuates in the coil. One complete rotation of the magnet represents one phase. As the North end approaches the coil, current increases from zero. Once the North end leaves, current decreases to zero. The South end in turn approaches, now the current “increases” in the opposite direction. And finishing the phase, the South end leaves returning the current back to zero. Current <i>alternates</i> its direction at every half cycle, hence the naming of Alternating Current.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7CcXLX2BlNWmNeVBk9YOJz/68fd03d71ec5a29a4c13454e4ce5fb72/Artboard-2-1.png" />
            
            </figure><p>Current and voltage in AC power fluctuate in-phase, or “in tandem”, with each other. So by Ohm's Law of Power = Voltage x Current, power will always be positive. Notice on the graph below that AC power (Watts) has two peaks per cycle. But for practical purposes, we'd like to use a constant power value. We do that by interpreting AC power into "DC" power using root-mean-square (RMS) averaging, which takes the max value and divides it by √2. For example, in the US, our conditions are 208V 24A at 60Hz. When we look at spec sheets, all of these values can be assumed as RMS'd into their constant DC equivalent values. When we say we're fully utilizing a PDU's max capacity of 5kW, it actually means that the power consumption of our machines bounces between 0 and 7.1kW (5kW x √2).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3fM63pmekFqVlqHI6opB4V/c26220c91da05301a7573407d513eafe/image13.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6n22LgiBvxJ4hrF6UdL0em/058bcddee79584ca845603f0ae6ca706/image6.png" />
            
            </figure><p>It’s also critical to figure out the sum of power our servers will need in a rack so that it falls under the PDU’s design max power capacity. For our US example, a PDU is typically 5kW (208 volts x 24 amps); therefore, we're budgeting 5kW and fit as many machines as we can under that. If we need more machines and the total sum power goes above 5kW, we'd need to provision another power source. That would lead to possibly another set of PDUs and racks that we may not fully use depending on demand; e.g. more underutilized costs. All we can do is abide by P = V x I.</p><p>However there is a way we can increase the max power capacity economically — 3-phase PDU. Compared to single phase, its max capacity is √3 or 1.7 times higher. A 3-phase PDU of the same US specs above has a capacity of 8.6kW (5kW x √3), allowing us to power more machines under the same source. Using a 3-phase setup might mean it has thicker cables and bigger plug; but despite being more expensive than a 1-phase, its value is higher compared to two 1-phase rack setups for these reasons:</p><ul><li><p>It’s more cost-effective, because there are fewer hardware resources to buy</p></li><li><p>Say the computing demand adds up to 215kW of hardware, we would need 25 3-phase racks compared to 43 1-phase racks.</p></li><li><p>Each rack needs two PDUs for power redundancy. Using the example above, we would need 50 3-phase PDUs compared to 86 1-phase PDUs to power 215kW worth of hardware.</p></li><li><p>That also means a smaller rack footprint and fewer power sources provided and charged by the data center, saving us up to √3 or 1.7 times in opex.</p></li><li><p>It’s more resilient, because there are more circuit breakers in a 3-phase PDU — one more than in a 1-phase. For example, a 48-outlet PDU that is 1-phase would be split into two circuits of 24 outlets. While a 3-phase one would be split into 3 circuits of 16 outlets. If a breaker tripped, we’d lose 16 outlets using a 3-phase PDU instead of 24.</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6j4fgzSlb8GU9fsGwywC11/a761ff04c713ff3cbc5a5b04f5e067b0/image5-1.png" />
            
            </figure><p>The PDU shown above is a 3-phase model of 48 outlets. We can see three pairs of circuit breakers for the three branches that are intertwined with each other <b>—</b> white, grey, and black. Industry demands today pressure engineers to maximize compute performance and minimize physical footprint, making the 3-phase PDU a widely-used part of operating a data center.</p>
    <div>
      <h3>What is 3-phase?</h3>
      <a href="#what-is-3-phase">
        
      </a>
    </div>
    <p>A 3-phase AC generator has three coils instead of one where the coils are 120 degrees apart inside the cylindrical core, as shown in the figure below. Just like the 1-phase generator, current flow is induced by the rotation of the magnet thus creating power from each coil sequentially at every one-third of the magnet’s rotation cycle. In other words, we’re generating three 1-phase power offset by 120 degrees.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7JNipgmV5CwJESOZLyeiy2/8a8cd916f8af4b820b8de6d93ed237ce/Artboard-3-1.png" />
            
            </figure><p>A 3-phase feed is set up by joining any of its three coils into line pairs. L1, L2, and L3 coils are live wires with each on their own <i>phase</i> carrying their own <i>phase</i> voltage and <i>phase</i> current. Two phases joining together form one <i>line</i> carrying a common <i>line</i> voltage and <i>line</i> current. L1 and L2 phase voltages create the L1/L2 line voltage. L2 and L3 phase voltages create the L2/L3 line voltage. L1 and L3 phase voltages create the L1/L3 line voltage.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/aEGubJ4ZOZYPBdqTyT2If/6d9ec3e4af13c9a9b8edfc3ddf4235ab/image9-1.jpg" />
            
            </figure><p>Let’s take a moment to clarify the terminology. Some other sources may refer to line voltage (or current) as line-to-line or phase-to-phase voltage (or current). It can get confusing, because line voltage is the same as phase voltage in 1-phase circuits, as there’s only one phase. Also, the <i>magnitude</i> of the line voltage is equal to the <i>magnitude</i> of the phase voltage in 3-phase Delta circuits, while the <i>magnitude</i> of the line current is equal to the <i>magnitude</i> of the phase current in 3-phase Wye circuits.</p><p>Conversely, the line current equals to phase current times √3 in Delta circuits. In Wye circuits, the line voltage equals to phase voltage times √3.</p><p>In Delta circuits:</p><p>V<sub>line</sub> = V<sub>phase</sub></p><p>I<sub>line</sub> = √3 x I<sub>phase</sub></p><p>In Wye circuits:</p><p>V<sub>line</sub> = √3 x V<sub>phase</sub></p><p>I<sub>line</sub> = I<sub>phase</sub></p><p>Delta and Wye circuits are the two methods that three wires can join together. This happens both at the power source with three coils and at the PDU end with three branches of outlets. Note that the generator and the PDU don’t need to match each other’s circuit types.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/yBiiAFcHTedr9s3s3QSPL/52c6822b94b0816b139570c334c62998/image8.png" />
            
            </figure><p>On PDUs, these phases join when we plug servers into the outlets. So we conceptually use the wirings of coils above and replace them with resistors to represent servers. Below is a simplified wiring diagram of a 3-phase Delta PDU showing the three line pairs as three modular branches. Each branch carries two phase currents and its own one common voltage drop.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4xV9Yds4Dzc7VOVFEmrg7X/f398859d93ca13341b641ca3ec533753/image15.png" />
            
            </figure><p>And this one below is of a 3-phase Wye PDU. Note that Wye circuits have an additional line known as the neutral line where all three phases meet at one point. Here each branch carries one phase and a neutral line, therefore one common current. The neutral line isn’t considered as one of the phases.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6P2JKqoppmgeEjomv9jmmY/8fe420607f4a0f0abba13cdf82aa117a/image20.png" />
            
            </figure><p>Thanks to a neutral line, a Wye PDU can offer a second voltage source that is √3 times lower for smaller devices, like laptops or monitors. Common voltages for Wye PDUs are 230V/400V or 120V/208V, particularly in North America.</p>
    <div>
      <h3>Where does the √3 come from?</h3>
      <a href="#where-does-the-3-come-from">
        
      </a>
    </div>
    <p>Why are we multiplying by √3? As the name implies, we are adding phasors. Phasors are complex numbers representing sine wave functions. Adding phasors is like adding vectors. Say your GPS tells you to walk 1 mile East (vector a), then walk a 1 mile North (vector b). You walked 2 miles, but you only moved by 1.4 miles NE from the original location (vector a+b). That 1.4 miles of “work” is what we want.</p><p>Let’s take in our application L1 and L2 in a Delta circuit. we add phases L1 and L2, we get a L1/L2 line. We assume the 2 coils are identical. Let’s say α represents the voltage magnitude for each phase. The 2 phases are 120 degrees offset as designed in the 3-phase power generator:</p>
            <pre><code>|L1| = |L2| = α
L1 = |L1|∠0° = α∠0°
L2 = |L2|∠-120° = α∠-120°</code></pre>
            <p>Using vector addition to solve for L1/L2:</p>
            <pre><code>L1/L2 = L1 + L2</code></pre>
            
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2NtOvL0EuHAqcE84gSFJsf/64042e5e1175757f216824d49222b611/image10.png" />
            
            </figure><p>$$\text{L1/L2} = α∠\text{0°} - α∠\text{-120°}$$</p><p>$$\text{L1/L2} = (α\cos{\text{0°}}+jα\sin{\text{0°}})-(α\cos{\text{-120°}}+jα\sin{\text{-120°}})$$</p><p>$$\text{L1/L2} = (α\cos{\text{0°}}-α\cos{\text{-120°}})+j(α\sin{\text{0°}}-α\sin{\text{-120°}})$$</p><p>$$\text{L1/L2} = \frac{3}{2}α+j\frac{\sqrt3}{2}α$$</p><p>Convert L1/L2 into polar form:</p><p>$$\text{L1/L2} = \sqrt{(\frac{3}{2}α)^2 + (\frac{\sqrt3}{2}α)<sup>2}∠\tan</sup>{-1}(\frac{\frac{\sqrt3}{2}α}{\frac{3}{2}α})$$</p><p>$$\text{L1/L2} = \sqrt 3α∠\text{30°}$$</p><p>Since voltage is a scalar, we’re only interested in the “work”:</p>
            <pre><code>|L1/L2| = √3α</code></pre>
            <p>Given that α also applies for L3. This means for any of the three line pairs, we multiply the phase voltage by √3 to calculate the line voltage.</p><p>V<sub>line</sub> = √3 x V<sub>phase</sub></p><p>Now with the three line powers being equal, we can add them all to get the overall effective power. The derivation below works for both Delta and Wye circuits.</p><p>P<sub>overall</sub> = 3 x P<sub>line</sub></p><p>P<sub>overall</sub> = 3 x (V<sub>line</sub> x I<sub>line</sub>)</p><p>P<sub>overall</sub> = (3/√3) x (V<sub>phase</sub> x I<sub>phase</sub>)</p><p>P<sub>overall</sub> = √3 x V<sub>phase</sub> x I<sub>phase</sub></p><p></p><p>Using the US example, V<sub>phase</sub> is 208V and I<sub>phase</sub> is 24A. This leads to the overall 3-phase power to be 8646W (√3 x 208V x 24A) or 8.6kW. There lies the biggest advantage for using 3-phase systems. Adding 2 sets of coils and wires (ignoring the neutral wire), we’ve turned a generator that can produce √3 or 1.7 times more power!</p>
    <div>
      <h3>Dealing with 3-phase</h3>
      <a href="#dealing-with-3-phase">
        
      </a>
    </div>
    <p>The derivation in the section above assumes that the magnitude at all three phases is equal, but we know in practice that's not always the case. In fact, it's barely ever. We rarely have servers and switches evenly distributed across all three branches on a PDU. Each machine may have different loads and different specs, so power could be wildly different, potentially causing a dramatic phase imbalance. Having a heavily imbalanced setup could potentially hinder the PDU's available capacity.</p><p>A perfectly balanced and fully utilized PDU at 8.6kW means that each of its three branches has 2.88kW of power consumed by machines. Laid out simply, it's spread 2.88 + 2.88 + 2.88. This is the best case scenario. If we were to take 1kW worth of machines out of one branch, spreading power to 2.88 + 1.88 + 2.88. Imbalance is introduced, the PDU is underutilized, but we're fine. However, if we were to put back that 1kW into another branch — like 3.88 + 1.88 + 2.88 — the PDU is over capacity, even though the sum is still 8.6kW. In fact, it would be over capacity even if you just added 500W instead of 1kW on the wrong branch, thus reaching 3.18 + 1.88 + 2.88 (8.1kW).</p><p>That's because a 8.6kW PDU is spec'd to have a maximum of 24A for each phase current. Overloading one of the branches can force phase currents to go over 24A. Theoretically, we can reach the PDU’s capacity by loading one branch until its current reaches 24A and leave the other two branches unused. That’ll render it into a 1-phase PDU, losing the benefit of the √3 multiplier. In reality, the branch would have fuses rated less than 24A (usually 20A) to ensure we won't reach that high and cause overcurrent issues. Therefore the same 8.6kW PDU would have one of its branches tripped at 4.2kW (208V x 20A).</p><p>Loading up one branch is the easiest way to overload the PDU. Being heavily imbalanced significantly lowers PDU capacity and increases risk of failure. To help minimize that, we must:</p><ul><li><p>Ensure that total power consumption of all machines is under the PDU's max power capacity</p></li><li><p>Try to be as phase-balanced as possible by spreading cabling evenly across the three branches</p></li><li><p>Ensure that the sum of phase currents from powered machines at each branch is under the fuse rating at the circuit breaker.</p></li></ul><p><a href="https://www.raritan.com/blog/how-to-calculate-current-on-a-3-phase-208v-rack-pdu-power-strip">This spreadsheet</a> from Raritan is very useful when designing racks.</p><p>For the sake of simplicity, let's ignore other machines like switches. Our latest 2U4N servers are rated at 1800W. That means we can only fit a maximum of four of these 2U4N chassis (8600W / 1800W = 4.7 chassis). Rounding them up to 5 would reach a total rack level power consumption of 9kW, so that's a no-no.</p><p>Splitting 4 chassis into 3 branches evenly is impossible, and will force us to have one of the branches to have 2 chassis. That would lead to a non-ideal phase balancing:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1vAVIr6zDrLo4vIWjmtQYL/50f9ae2af265da7f953e05e96003f47f/image17.png" />
            
            </figure><p>Keeping phase currents under 24A, there's only 1.1A (24A - 22.9A) to add on L1 or L2 before the PDU gets overloaded. Say we want to add as many machines as we can under the PDU’s power capacity. One solution is we can add up to 242W on the L1/L2 branch until both L1 and L2 currents reach their 24A limit.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3NP9EOPb0h2lEXuvlSdg3B/9a6f53163c45fd3b8f2ee01964c0bd86/image18.png" />
            
            </figure><p>Alternatively, we can add up to 298W on the L2/L3 branch until L2 current reaches 24A. Note we can also add another 298W on the L3/L1 branch until L1 current reaches 24A.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/64ECQoHBzqhPuq38sNizat/6070a8f2acad6cb76fae4e32f1c566df/image16.png" />
            
            </figure><p>In the examples above, we can see that various solutions are possible. Adding two 298W machines each at L2/L3 and L3/L1 is the most phase balanced solution, given the parameters. Nonetheless, PDU capacity isn't optimized at 7.8kW.</p><p>Dealing with a 1800W server is not ideal, because whichever branch we choose to power one would significantly swing the phase balance unfavorably. Thankfully, our <a href="/cloudflares-gen-x-servers-for-an-accelerated-future/">Gen X servers</a> take up less space and are more power efficient. Smaller footprint allows us to have more flexibility and fine-grained control over our racks in many of our diverse data centers. Assuming each 1U server is 450W, as if we physically split the 1800W 2U4N into fours each with their own power supplies, we're now able to fit 18 nodes. That's 2 more nodes than the four 2U4N setup:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7eBaV5AwmB0D31FSgEw65b/bfd1bd88c6e6078edf84523c2852081a/image21.png" />
            
            </figure><p>Adding two more servers here means we've increased our value by 12.5%. While there are more factors not considered here to calculate the Total Cost of Ownership, this is still a great way to show we can be smarter with asset costs.</p><p>Cloudflare provides the back-end services so that our customers can enjoy the performance, reliability, security, and global scale of our edge network. Meanwhile, we manage all of our hardware in over 100 countries with various power standards and compliances, and ensure that our physical infrastructure is as reliable as it can be.</p><p>There’s no Cloudflare without hardware, and there’s no Cloudflare without power. Want to know more? Watch this Cloudflare TV segment about power: <a href="https://cloudflare.tv/event/7E359EDpCZ6mHahMYjEgQl">https://cloudflare.tv/event/7E359EDpCZ6mHahMYjEgQl</a>.</p> ]]></content:encoded>
            <category><![CDATA[Hardware]]></category>
            <category><![CDATA[Data Center]]></category>
            <category><![CDATA[Network]]></category>
            <category><![CDATA[Edge]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Developers]]></category>
            <guid isPermaLink="false">4Qx2ZCOM4gEYCEIljEKvAi</guid>
            <dc:creator>Rob Dinh</dc:creator>
        </item>
        <item>
            <title><![CDATA[An EPYC trip to Rome: AMD is Cloudflare's 10th-generation Edge server CPU]]></title>
            <link>https://blog.cloudflare.com/an-epyc-trip-to-rome-amd-is-cloudflares-10th-generation-edge-server-cpu/</link>
            <pubDate>Tue, 25 Feb 2020 14:00:00 GMT</pubDate>
            <description><![CDATA[ As we looked at production ready systems to power our Gen X solution, we’re moving on from Gen 9's 48-core setup of dual socket Intel Xeon Platinum 6162's to a 48-core single socket AMD EPYC 7642. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>More than 1 billion unique IP addresses pass through the <a href="/tag/cloudflare-network/">Cloudflare Network</a> each day, serving on average 11 million HTTP requests per second and operating within 100ms of 95% of the Internet-connected population globally. Our network spans 200 cities in more than 90 countries, and our engineering teams have built an extremely <a href="/tag/speed-and-reliability/">fast and reliable infrastructure</a>.</p><p>We’re extremely proud of our work and are determined to help make the Internet a <a href="https://www.fastcompany.com/most-innovative-companies/2019/sectors/security">better and more secure place</a>. Cloudflare engineers who are involved with hardware get down to servers and their components to understand and select the best hardware to maximize the performance of our stack.</p><p>Our software stack is compute intensive and is very much CPU bound, driving our engineers to work continuously at optimizing Cloudflare’s performance and reliability at all layers of our stack. With the server, a straightforward solution for increasing computing power is to have more CPU cores. The more cores we can include in a server, the more output we can expect. This is important for us since the diversity of our products and customers has grown over time with increasing demand that requires our servers to do more. To help us drive compute performance, we needed to increase core density and that's what we did. Below is the processor detail for servers we’ve deployed since 2015, including the core counts:</p><table><tr><td><p>---</p></td><td><p><b>Gen 6</b></p></td><td><p><b>Gen 7</b></p></td><td><p><b>Gen 8</b></p></td><td><p><b>Gen 9</b></p></td></tr><tr><td><p>Start of service</p></td><td><p>2015</p></td><td><p>2016</p></td><td><p>2017</p></td><td><p>2018</p></td></tr><tr><td><p>CPU</p></td><td><p>Intel Xeon E5-2630 v3</p></td><td><p>Intel Xeon E5-2630 v4</p></td><td><p>Intel Xeon Silver 4116</p></td><td><p>Intel Xeon Platinum 6162</p></td></tr><tr><td><p>Physical Cores</p></td><td><p>2 x 8</p></td><td><p>2 x 10</p></td><td><p>2 x 12</p></td><td><p>2 x 24</p></td></tr><tr><td><p>TDP</p></td><td><p>2 x 85W</p></td><td><p>2 x 85W</p></td><td><p>2 x 85W</p></td><td><p>2 x 150W</p></td></tr><tr><td><p>TDP per Core</p></td><td><p>10.65W</p></td><td><p>8.50W</p></td><td><p>7.08W</p></td><td><p>6.25W</p></td></tr></table><p>In 2018, we made a big jump in total number of cores per server with <a href="/a-tour-inside-cloudflares-g9-servers/">Gen 9</a>. Our physical footprint was reduced by 33% compared to Gen 8, giving us increased capacity and computing power per rack. Thermal Design Power (TDP aka typical power usage) are mentioned above to highlight that we've also been more power efficient over time. Power efficiency is important to us: first, because we'd like to be as <a href="/a-carbon-neutral-north-america/">carbon friendly</a> as we can; and second, so we can better utilize our provisioned power supplied by the data centers. But we know we can do better.</p><p>Our main defining metric is Requests per Watt. We can increase our Requests per Second number with more cores, but we have to stay within our power budget envelope. We are constrained by the data centers’ power infrastructure which, along with our selected power distribution units, leads us to power cap for each server rack. Adding servers to a rack obviously adds more power draw increasing power consumption at the rack level. Our Operational Costs significantly increase if we go over a rack’s power cap and have to provision another rack. What we need is more compute power inside the same power envelope which will drive a higher (better) Requests per Watt number – our key metric.</p><p>As you might imagine, we look at power consumption carefully in the design stage. From the above you can see that it’s not worth the time for us to deploy more power-hungry CPUs if TDP per Core is higher than our current generation which would hurt our Requests per Watt metric. As we started looking at production ready systems to power our Gen X solution, we took a long look at what is available to us in the market today, and we’ve made our decision. We’re moving on from Gen 9's 48-core setup of dual socket <a href="https://ark.intel.com/content/www/us/en/ark/products/136869/intel-xeon-platinum-6162-processor-33m-cache-1-90-ghz.html">Intel® Xeon® Platinum 6162</a>'s to a 48-core single socket <a href="https://www.amd.com/en/products/cpu/amd-epyc-7642">AMD EPYC™ 7642</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6Ub4NDKC4KKIMsXY2cFPJW/2bb5250e410aa4c75cad9651ab1b84f7/1.jpg" />
            
            </figure><p>                                      Gen X server setup with single socket 48-core AMD EPYC 7642.</p><table><tr><td><p><b>---</b></p></td><td><p><b>Intel</b></p></td><td><p><b>AMD</b></p></td></tr><tr><td><p>CPU</p></td><td><p>Xeon Platinum 6162</p></td><td><p>EPYC 7642</p></td></tr><tr><td><p>Microarchitecture</p></td><td><p>“Skylake”</p></td><td><p>“Zen 2”</p></td></tr><tr><td><p>Codename</p></td><td><p>“Skylake SP”</p></td><td><p>“Rome”</p></td></tr><tr><td><p>Process</p></td><td><p>14nm</p></td><td><p>7nm</p></td></tr><tr><td><p>Physical Cores</p></td><td><p>2 x 24</p></td><td><p>48</p></td></tr><tr><td><p>Frequency</p></td><td><p>1.9 GHz</p></td><td><p>2.4 GHz</p></td></tr><tr><td><p>L3 Cache / socket</p></td><td><p>24 x 1.375MiB</p></td><td><p>16 x 16MiB</p></td></tr><tr><td><p>Memory / socket</p></td><td><p>6 channels, up to DDR4-2400</p></td><td><p>8 channels, up to DDR4-3200</p></td></tr><tr><td><p>TDP</p></td><td><p>2 x 150W</p></td><td><p>225W</p></td></tr><tr><td><p>PCIe / socket</p></td><td><p>48 lanes</p></td><td><p>128 lanes</p></td></tr><tr><td><p>ISA</p></td><td><p>x86-64</p></td><td><p>x86-64</p></td></tr></table><p>From the specs, we see that with the AMD chip we get to keep the same amount of cores and lower TDP. Gen 9's TDP per Core was 6.25W, Gen X's will be 4.69W... That's a 25% decrease. With higher frequency, and perhaps going to a more simplified setup of single socket, we can speculate that the AMD chip will perform better. We're walking through a series of tests, simulations, and live production results in the rest of this blog to see how much better AMD performs.</p><p>As a side note before we go further, TDP is a simplified metric from the manufacturers’ datasheets that we use in the early stages of our server design and CPU selection process. A quick Google search leads to thoughts that AMD and Intel define TDP differently, which basically makes the spec unreliable. Actual CPU power draw, and more importantly server system power draw, are what we really factor in our final decisions.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4ue5oOlAdewYkerMSsEPWN/5cf921da1bc31eccd575af6670af66d3/2.png" />
            
            </figure>
    <div>
      <h3>Ecosystem Readiness</h3>
      <a href="#ecosystem-readiness">
        
      </a>
    </div>
    <p>At the beginning of our journey to choose our next CPU, we got a variety of processors from different vendors that could fit well with our software stack and services, which are written in C, LuaJIT, and Go. More details about benchmarking for our stack were explained when we benchmarked <a href="/arm-takes-wing/">Qualcomm's ARM® chip in the past</a>. We're going to go through the same suite of tests as Vlad's blog this time around since it is a quick and easy "sniff test". This allows us to test a bunch of CPUs within a manageable time period before we commit to spend more engineering effort and need to apply our software stack.</p><p>We tried a variety of CPUs with different number of cores, sockets, and frequencies. Since we're explaining how we chose the AMD EPYC 7642, all the graphs in this blog focus on how AMD compares with our <a href="/a-tour-inside-cloudflares-g9-servers/">Gen 9's Intel Xeon Platinum 6162 CPU</a> as a baseline.</p><p>Our results correspond to server node for both CPUs tested; meaning the numbers pertain to 2x 24-core processors for Intel, and 1x 48-core processor for AMD – a two socket Intel based server and a one socket AMD EPYC powered server. Before we started our testing, we changed the Cloudflare lab test servers’ BIOS settings to match our production server settings. This gave us CPU frequencies yields for AMD at 3.03 Ghz and Intel at 2.50 Ghz on average with very little variation. With gross simplification, we expect that with the same amount of cores AMD would perform about 21% better than Intel. Let’s start with our crypto tests.</p>
    <div>
      <h3>Cryptography</h3>
      <a href="#cryptography">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3AZYQDj2nhVofkFNuK7fhb/dea112fd9ae2b2e91514b62e21d242d6/3.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2OpcfNqi2hraQrS8fZV0Lw/29fcc9dcf3ec73400a8fe784a12b26f5/4.png" />
            
            </figure><p>Looking promising for AMD. In public key cryptography, it does 18% better. Meanwhile, for symmetric key, AMD loses on AES-128-GCM, but it’s comparable overall.</p>
    <div>
      <h3>Compression</h3>
      <a href="#compression">
        
      </a>
    </div>
    <p>We do a lot of compression at the edge to save bandwidth and help deliver content faster. We go through both zlib and brotli libraries written in C. All tests are done on <a href="/">blog.cloudflare.com</a> HTML file in memory.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3IVKryfCIXY2c6vXt8KsPc/eab9765ff8650fc9fbe97a82cf89f0cf/5.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2ycU6O5cbLREXNJV29sPDI/4472bc4ae36cfedae67535d08e5e10f8/6.png" />
            
            </figure><p>AMD wins by an average of 29% using gzip across all qualities. It does even better with brotli with tests lower than quality 7, which we use for dynamic compression. There’s a throughput cliff starting brotli-9 which <a href="/arm-takes-wing/">Vlad’s explanation</a> is that Brotli consumes lots of memory and thrashes cache. Nevertheless, AMD wins by a healthy margin.</p><p>A lot of our services are written in Go. In the following graphs we’re redoing the crypto and compression tests in Go along with RegExp on 32KB strings and the strings' library.</p>
    <div>
      <h3>Go Cryptography</h3>
      <a href="#go-cryptography">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1JRYfDXEC61iGL6Ds7LjL1/16b8980b2b2cf5bdda22769d0dad5fa6/7.png" />
            
            </figure>
    <div>
      <h3>Go Compression</h3>
      <a href="#go-compression">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5U6GEnTLU1VVvqbZtJZ1df/0e3a0fa77bbb3ce709e36503e9eaba66/Screen-Shot-2020-02-24-at-14.37.27.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3YQTrE7SfEiCXjivU7NXXf/c5b22a8a38b2eb48c0658d4b9b3a1f63/9.png" />
            
            </figure>
    <div>
      <h3>Go Regexp</h3>
      <a href="#go-regexp">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1ZQn6rtg7fE6IJ3wNgpCf/9886faae1855b658347fccfe72802a0a/10.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/vvUuNzVuRrgGqVrGOxagJ/720667e78cb5b34eda7f4ca0d445bd9f/11.png" />
            
            </figure>
    <div>
      <h3>Go Strings</h3>
      <a href="#go-strings">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3BY6NTdgjUWGiDBwC0NMNv/8943902a6f047eb8d2f9079e9b1e432b/12.png" />
            
            </figure><p>AMD performs better in all of our Go benchmarks except for ECDSA P256 Sign losing by 38%, which is peculiar since with the test in C it does 24% better. It’s worth investigating what’s going on here. Other than that, AMD doesn’t win by as much of a margin, but it still proves to be better.</p>
    <div>
      <h3>LuaJIT</h3>
      <a href="#luajit">
        
      </a>
    </div>
    <p>We rely a lot on LuaJIT in our stack. As <a href="/arm-takes-wing/">Vlad said</a>, it’s the glue that holds Cloudflare together. We’re glad to show that AMD wins here as well.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4VM41wrmwYIpaJSvR70ztl/95f5f48fad6f48034422ea69b62c73b6/13.png" />
            
            </figure><p>Overall our tests show a single EPYC 7642 to be more competitive than two Xeon Platinum 6162. While there are a couple of tests where AMD loses out such as OpenSSL AES-128-GCM and Go OpenSSL ECDSA-P256 Sign, AMD wins in all the others. By scanning quickly and treating all tests equally, AMD does on average 25% better than Intel.</p>
    <div>
      <h3>Performance Simulations</h3>
      <a href="#performance-simulations">
        
      </a>
    </div>
    <p>After our ‘sniff’ tests, we put our servers through another series of emulations which apply synthetic workloads simulating our edge software stack. Here we are simulating workloads of scenarios with different types of requests we see in production. Types of requests vary from asset size, whether they go through HTTP or HTTPS, <a href="https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf/">WAF</a>, Workers, or one of many additional variables. Below shows the throughput comparison between the two CPUs of the types of requests we see most typically.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2Rj1NqqXfYroVsefnGQQgS/c598bbf7b324ab6944236e91d5f5e28a/14.png" />
            
            </figure><p>The results above are ratios using Gen 9's Intel CPUs as the baseline normalized at 1.0 on the X-axis. For example, looking at simple requests of 10KiB assets over HTTPS, we see that AMD does 1.50x better than Intel in Requests per Second. On average for the tests shown on the graph above, AMD performs 34% better than Intel. Considering that the TDP for the single AMD EPYC 7642 is 225W, when compared to two Intel's being 300W, we're looking at AMD delivering up to 2.0x better Requests per Watt vs. the Intel CPUs!</p><p>By this time, we were already leaning heavily toward a single socket setup with AMD EPYC 7642 as our CPU for Gen X. We were excited to see exactly how well AMD EPYC servers would do in production, so we immediately shipped a number of the servers out to some of our data centers.</p>
    <div>
      <h3>Live Production</h3>
      <a href="#live-production">
        
      </a>
    </div>
    <p>Step one of course was to get all our test servers set up for a production environment. All of our machines in the fleet are loaded with the same processes and services which makes for a great apples-to-apples comparison.  Like data centers everywhere, we have multiple generations of servers deployed, and we deploy our servers in clusters such that each cluster is pretty homogeneous by server generation. In some environments this can lead to varying utilization curves between clusters.  This is not the case for us. Our engineers have optimized CPU utilization across all server generations so that no matter if the machine's CPU has 8 cores or 24 cores, CPU usage is generally the same.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2CiOx8dprb9NuYH2kUrZQ/ef686808c946d6cc55aa2983dc50c839/15.png" />
            
            </figure><p>As you can see above and to illustrate our ‘similar CPU utilization’ comment, there is no significant difference in CPU usage between Gen X AMD powered servers and Gen 9 Intel based servers. This means both test and baseline servers are equally loaded. Good. This is exactly what we want to see with our setup, to have a fair comparison. The 2 graphs below show the comparative number of requests processed at the CPU single core and all core (server) level.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/18XOFPOFmKWcIuheu6HWl8/e84fa7ff38c6c3f39115b60882a7c106/16.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/rwWBZrTmfJvIs7Em9aCXT/19945cb240e37ca3ba61853b3e72bf5b/17.png" />
            
            </figure><p>We see that AMD does on average about 23% more requests. That's really good! We talked a lot about bringing more muscle in the <a href="/a-tour-inside-cloudflares-g9-servers/">Gen 9 blog</a>. We have the same number of cores, yet AMD does more work, and does it with less power. Just by looking at the specs for number of cores and TDP in the beginning, it's really nice to see that AMD also delivers significantly more performance with better power efficiency.</p><p>But as we mentioned earlier, TDP isn’t a standardized spec across manufacturers so let’s look at real power usage below. Measuring server power consumption along with requests per second (RPS) yields the graph below:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3DnPzngVCU8da71wGJUleo/b132d4256abe8c60809cf7b2c6d27ea4/18.png" />
            
            </figure><p>Observing our servers request rate over their power consumption, the AMD Gen X server performs 28% better. While we could have expected more out of AMD since its TDP is 25% lower, keep in mind that TDP is very ambiguous. In fact, we saw that AMD actual power draw ran nearly at spec TDP with it's much higher than base frequency; Intel was far from it. Another reason why TDP is becoming a less reliable estimate of power draw. Moreover, CPU is just one component contributing to the overall power of the system. Let’s remind that Intel CPUs are integrated in a multi-node system as described in the <a href="/a-tour-inside-cloudflares-g9-servers/">Gen 9 blog</a>, while AMD is in a regular 1U form-factor machine. That actually doesn’t favor AMD since multi-node systems are designed for high density capabilities at lower power per node, yet it still outperformed the Intel system on a power per node basis anyway.</p><p>Through the majority of comparisons from the datasheets, test simulations, and live production performance, the 1P AMD EPYC 7642 configuration performed significantly better than the 2P Intel Xeon 6162. We’ve seen in some environments that AMD can do up to 36% better in live production, and we believe we can achieve that consistently with some optimization on both our hardware and software.</p><p>So that's it. AMD wins.</p><p>The additional graphs below show the median and p99 NGINX processing mostly on-CPU time latencies between the two CPUs throughout 24 hours. On average, AMD processes about 25% faster. At p99, it does about 20-50% depending on the time of day.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Fty1XuK9w4yupvRyHzLmu/0f1e8bc02e8f04d0c33752f6ff67fd98/19.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3yWj3MsDnro619KjtJwVAW/0868d32c8aa3f5c594b8e660e608eb6c/20.png" />
            
            </figure>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>Hardware and Performance engineers at Cloudflare do significant research and testing to figure out the best server configuration for our customers. Solving big problems like this is why <a href="https://www.fastcompany.com/best-workplaces-for-innovators/2019">we love working here</a>, and we're also helping to solve yours with our services like <a href="/introducing-cloudflare-workers/">serverless</a> edge compute and the array of security solutions such as <a href="/magic-transit-network-functions/">Magic Transit</a>, <a href="/argo-tunnel/">Argo Tunnel</a>, and <a href="/unmetered-mitigation/">DDoS protection</a>. All of our servers on the Cloudflare Network are designed to make our products work reliably, and we strive to make each new generation of our server design better than its predecessor. We believe the AMD EPYC 7642 is the answer for our Gen X's processor question.</p><p>With <a href="https://developers.cloudflare.com/workers/">Cloudflare Workers</a>, developers have enjoyed deploying their applications to our <a href="/tag/cloudflare-network/">Network</a>, which is ever expanding across the globe. We’ve been proud to empower our customers by letting them focus on writing their code while we are managing the security and reliability in the cloud. We are now even more excited to say that their work will be deployed on our Gen X servers powered by 2nd Gen AMD EPYC processors.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6yI4yio6UovXiaJi79a78l/d248e04fd2b5c98c68b7312af953c54f/21.jpg" />
            
            </figure><p>Expanding Rome to a data center near you</p><p>Thanks to AMD, using the EPYC 7642 allows us to increase our capacity and expand into more cities easier. Rome wasn’t built in one day, but it will be <a href="/scaling-the-cloudflare-global/">very close to many of you</a>.</p><p>In the last couple of years, we've been experimenting with many Intel and AMD x86 chips along with ARM CPUs. We look forward to having these CPU manufacturers partner with us for future generations so that together we can help build a better Internet.</p> ]]></content:encoded>
            <category><![CDATA[Hardware]]></category>
            <category><![CDATA[Cloudflare Network]]></category>
            <category><![CDATA[Data Center]]></category>
            <category><![CDATA[EPYC]]></category>
            <category><![CDATA[Partners]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">7dSLKQwG5XrggG5HDcZm1x</guid>
            <dc:creator>Rob Dinh</dc:creator>
        </item>
        <item>
            <title><![CDATA[A Tour Inside Cloudflare's G9 Servers]]></title>
            <link>https://blog.cloudflare.com/a-tour-inside-cloudflares-g9-servers/</link>
            <pubDate>Wed, 10 Oct 2018 15:17:00 GMT</pubDate>
            <description><![CDATA[ This is about our latest generation G9 server. From a G4 server comprising of 12 Intel Sandybridge CPU cores, our G9 server has 192 Intel Skylake CPU cores ready to handle today’s load across Cloudflare’s network. ]]></description>
            <content:encoded><![CDATA[ <p>Cloudflare operates at a significant scale, handling nearly 10% of the Internet HTTP requests that is at peak more than 25 trillion requests through our network every month. To ensure this is as efficient as possible, we own and operate all the equipment in our <a href="http://www.cloudflare.com/network-map">154 locations around the world</a> in order to process the volume of traffic that flows through our network. We spend a significant amount of time specing and designing servers that makes up our network to meet our ever changing and growing demands. On regular intervals, we will take everything we've learned about our last generation of hardware and refresh each component with the next generation…</p><p>If the above paragraph sounds familiar, it’s a reflecting glance to where we were <a href="/a-tour-inside-cloudflares-latest-generation-servers/">5 years ago</a> using today’s numbers. We’ve done so much progress engineering and developing our tools with the latest tech through the years by pushing ourselves at getting smarter in what we do.</p><p>Here though we’re going to blog about muscle.</p><p>Since the last time we blogged about our G4 servers, we’ve iterated one generation each of the past 5 years. Our latest generation is now the G9 server. From a G4 server comprising 12 Intel Sandybridge CPU cores, our G9 server has 192 Intel Skylake CPU cores ready to handle today’s load across Cloudflare’s network. This server is <a href="https://www.qct.io/product/index/Server/rackmount-server/Multi-node-Server/QuantaPlex-T42S-2U-4Node">QCT’s T42S-2U multi-node server</a> where we have 4 nodes per chassis, therefore each node has 48 cores. Maximizing compute density is the primary goal since rental colocation space and power are costly. This 2U4N chassis form factor has served us well for the past 3 generations, we’re revisiting this option once more.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/IL5Zupe1s0pPvlWHoaB6E/e3fcd9a2ba9447a0ec093e1ebb1d6488/MSUVbbiNbqCozo5hb0cnaWlQeUUxq3JdbJoZvUrGnY0ly9unm8JfFMKeTcKHp0P49HmMHdJ8f1Fvw7lHu8R1FmEQKKpbUjtP4qdkWMviOf0-NKmksk_Uy_7rFEh.jpeg" />
            
            </figure><p><i>Exploded picture of the G9 server’s main components. 4 sleds represent 4 nodes, each with 2 24-core Intel CPUs</i></p><p>Each high-level hardware component has gone through their own upgrade as well for a balanced scale up keeping our stack CPU bound, making this generation the most radical revision since we moved on from using HP 5 years ago. Let’s glance through each of those components.</p>
    <div>
      <h3>Hardware Changes</h3>
      <a href="#hardware-changes">
        
      </a>
    </div>
    <p>CPU</p><ul><li><p>Previously: 2x 12 core Intel Xeon Silver 4116 2.1Ghz 85W</p></li><li><p>Now: 2x 24 core Intel custom off-roadmap 1.9Ghz 150W</p></li></ul><p>The performance of our infrastructure is heavily directed by how much compute we can squeeze in a given physical space and power. In essence, requests per second (RPS) per Watt is a critical metric that <a href="/arm-takes-wing/">Qualcomm’s ARM64 46 core Falkor chip</a> had a <a href="https://www.datacenterknowledge.com/design/cloudflare-bets-arm-servers-it-expands-its-data-center-network">big advantage</a> over Intel’s Skylake 4116.</p><p>Intel proposed to co-innovate with us an off-roadmap 24-core Xeon Gold CPU specifically made for our workload offering considerable value in Performance per Watt. For this generation, we continue using Intel as system solutions are widely available while we’re working on <a href="/porting-our-software-to-arm64/">realizing ARM64’s benefits to production</a>. We expect this CPU to perform with better RPS per Watt right off the bat; increasing the RPS by 200% from doubling the amount of cores, and increasing the power consumption by 174% from increasing the CPUs TDP from 85W to 150W each.</p>
    <div>
      <h3>Disk</h3>
      <a href="#disk">
        
      </a>
    </div>
    <ul><li><p>Previously: 6x Micron 1100 512G SATA SSD</p></li><li><p>Now: 6x Intel S4500 480G SATA SSD</p></li></ul><p>With all the requests we foresee for G9 to process, we need to tame down the outlying and long-tail latencies we have seen in our previous SSDs. Lowering p99 and p999 latency has been a serious endeavor. To help save milliseconds in disk response time for 0.01% or even 0.001% of all the traffic we see <a href="/how-we-scaled-nginx-and-saved-the-world-54-years-every-day/">isn’t a joke</a>!</p><p>Datacenter grade SSDs in <a href="http://static6.arrow.com/aropdfconversion/8cb17527534c0532edc2710e8132aeea4d8e6f24/pgurl_intel-ssd-dc-s4500-series-240gb-2_5in-sata-6gbs-3d1-tlcordering.p.pdf">Intel S4500</a> will proliferate our fleet. These disks come with better endurance to last over the expected service life of our servers and better performance consistency with lower p95+ latency.</p>
    <div>
      <h3>Network</h3>
      <a href="#network">
        
      </a>
    </div>
    <ul><li><p>Previously: dual-port 10G Solarflare Flareon Ultra SFN8522</p></li><li><p>Now: dual-port 25G Mellanox ConnectX-4 Lx OCP</p></li></ul><p>Our <a href="/meet-gatebot-a-bot-that-allows-us-to-sleep/">DDoS mitigation program</a> is all done in userspace, so network adapter model can be anything on market as long as it <a href="https://netdevconf.org/2.1/papers/Gilberto_Bertin_XDP_in_practice.pdf">supports XDP</a>. We went with Mellanox for their solid reliability and their readily available 2x25G CX4 model. Upgrading to 25G intra-rack ethernet network is easy future-proofing since the 10G SFP+ ethernet port shares the same physical form factor as the 25G’s SFP28. Switch and NIC vendors offer models that can be configured as either 10G or 25G.</p><p>Another change is the adapter’s form factor itself being an OCP mezzanine instead of the more conventional Low Profile sized card. QCT is a server system integrator participating in the <a href="https://www.opencompute.org/">Open Compute Project</a>, a non-profit organization establishing an open source hardware ecosystem founded by Facebook, Intel, and Rackspace. Their T42S-2U motherboards each include 2 PCIe x16 Gen3 expansion slots: 1 fit for a regular I/O card and 1 for an OCP mezzanine. The form factor change allows us to occupy the OCP slot leaving the regular slot free to integrate something else that may not be offered with an OCP form factor like a high capacity NVMe SSD or a GPU. We like that our server has the room for upgrades if needed.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3VEGuLvx4UBK3DSKxOvhWC/fbf6c16637f5f5d534d5f7cbfc0a4048/image3.png" />
            
            </figure><p><i>Both Low Profile and OCP adapters offer the same throughput and features</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/64VwKTV9M42lnWZEmdsymo/ab9cd751bf6836b818fc4c58cdf5c35b/qncCFb7XX0ZvJyvXxWcJdv6rJ_6Yqs_BYRj5xZokMll0d3sFgJX5eBqi1N8KUIuqyBV_niKttp0PsYgkDsnpQsQBOmXGEYPCkgANeTldyf-75KjYkR3DpueCUK2h.png" />
            
            </figure><p><i>Rear side of G9 chassis showing all 4 sled nodes, each leaving room to add on a PCI card</i></p>
    <div>
      <h4>Memory</h4>
      <a href="#memory">
        
      </a>
    </div>
    <ul><li><p>Previously: 192G (12x16G) DDR4 2400Mhz RDIMM</p></li><li><p>Now: 256G (8x32G) DDR4 2666Mhz RDIMM</p></li></ul><p>Going from 192G (12x16G) to 256G (8x32G) made practical sense. The motherboard has 12 DIMM channels, which were all populated in the G8. We want to have the ability to upgrade just in case, as well as keeping memory configuration balanced and at optimal bandwidth capacity. 8x32G works well leaving 4 channels open for future upgrades.</p>
    <div>
      <h3>Physical stress test</h3>
      <a href="#physical-stress-test">
        
      </a>
    </div>
    <p>Our software stack scales nicely enough that we can confidently assume we’ll double the amount of requests having twice the amount of CPU cores compared to G8. What we need to ensure before we ship any G9 servers out to our current 154 and future PoPs is that there won’t be any design issues pertaining to thermal nor power failures. At the extreme case that all of our cores run up 100% load, would that cause our server to run above operating temperature? How much power would a whole server with 192 cores totaling 1200W TDP consume? We set out to record both by applying a stress test to the whole system.</p><p>Temperature readings were recorded off of <i>ipmitool sdr list</i>, then graphed showing socket and motherboard temperature. For 2U4N being such a compact form factor, it’s worth monitoring that a server running hot isn’t <i>literally</i> running hot. The red lines represent the 4 nodes that compose the whole G9 server under test; blue lines represent G8 nodes (we didn’t stress the G8’s so their temperature readings are constant).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7LhJHUDripavgzh5htsLtC/43748096e2380de60cbbb3efe76891d8/ddFg5dcptq_R6eQp6I6X2RqrzzPCDL1OWBN1qb0KBGSixf-oJaDxnnC1gjtownqAaru6WyexTLpubnapjdKhE8CB3BXrVIZa6tnOy86CX6JrtPOXUAtvFGBtT4dv.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3zhx6iZsGzDgGAP5jrOYYj/3c38aba998d3308dd20e643e2d139833/Xchiev2ccIEYdrFIiB2dpF1SI1rbOIz24S0o_mTJklyy--Pjcz8LWPrxhEIXX3zg-0b9VEEHA2V5v-SzQPV4_F4i6NOBofxl8j7SS0qa_6FVqdmzezaYGXXA39Oz.png" />
            
            </figure><p>Both graphs are looking fine and not out of control mostly thanks to the T42S-2U’s 4 80mm x 80mm fans capable of blowing over 90CFM; which we managed to reach their max spec RPM.</p><p>Recording the new system’s max power consumption is critical information we need to properly design our rack stack choosing the right Power Distribution Unit and ensuring we’re below the budgeted power while keeping adequate phase balancing. For example, a typical 3-phase US-rated 24-Amp PDU gives you a max power rating of 8.6 kilowatts. We wouldn’t be able to fit 9 servers powered by that same PDU if each were running at 1kW without any way to cap them.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5XzW1YCfCUohp7dzwmAuEw/00278a8993faa08dffe588720ef93ad3/pirTvrYl4aQuSd575px16hVHA55qFKhqTDzan9mn6HCz9G1Z83CjXO_y9z50wjgveFP07rQFfAlMK3h7ts8e85zgMYXcy1OiVh0bLdbQx8pORSNkZr7MOCtBDqLb.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1lYbqk8qyPWJa6GF4t5CnG/1c523b77c0a71336acee7e829cf5e9d0/GujZRUCJu-WHNb4H8K-D16X7kyCBd_-Wqg18shh4_4nFAES6uhYu4CpR1fESeL4wUT_rhy1-WOsLVzP5lW-3gekMqJzrCjKSteBm_99OLWu_edtJplUQgNAo6cke.png" />
            
            </figure><p>Above right graph shows our max power to be 1.9kW as the red line, or crudely 475W per node which is excellent in a modern server. Notice the blue and yellow lines representing the G9’s 2 power supplies summing the total power. The yellow line PSU appearing off is intentional as part of our testing procedure to show the PSU’s resilience in abrupt power changes.</p><p>Stressing out all available CPU, I/O, and memory along with maxing out fan RPMs combined is a good indicator for the highest possible heat and power draw this server can do. Hopefully we won’t ever see such an extreme case like this in live production environments, and we expect much milder actual results (read: we don’t think catastrophic failures to be possible).</p>
    <div>
      <h3>First Impression in live production</h3>
      <a href="#first-impression-in-live-production">
        
      </a>
    </div>
    <p>We increased capacity to one of our most loaded PoPs by adding G9 servers. The following time graphs represent a 24 hour range with how G9 performance compares with G8 in a live PoP.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/17ZqA2VbWMkEsK4jUkj7wb/a1932b12e697992c0ccd918486b69a6d/Screen-Shot-2018-10-03-at-6.44.41-PM-1.png" />
            
            </figure><p>Great! They're doing over 2x the requests compared to G8 with about 10% less CPU usage. Note that all results here are based from non-optimized systems, so we could add more load on the G9 and have their CPU usage comparable to the G8. Additionally, they're doing that amount with better CPU processing time shown as nginx execution time. You can see the latency gap between generations widening as we go towards the 99.9th percentile:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6fAxaonFhRQRydhYQXErzS/6f31936f98783eb59358101aff4f707e/Screen-Shot-2018-10-03-at-6.53.13-PM-1.png" />
            
            </figure><p><i>Long-tail latencies for NGINX CPU processing time (lower is better)</i></p><p>Talking about latency, let’s check how our new SSDs are doing on that front:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6GzzQt3teUZbjXAuJvW9Cj/cec3aac363553d3b1b23acfb3cb3638f/Screen-Shot-2018-10-04-at-4.59.41-PM.png" />
            
            </figure><p><i>Cache disk IOPS and latency (lower is better)</i></p><p>The trend still holds that G9 is doing better. It’s a good thing that the G9’s SSDs aren’t seeing as many IOPS since it means we’re not hitting cache disks as often and are able to store and process more on CPU and memory. We’ve cut the read cache hits and latency by half. Less writes results in better performance consistency and longevity.</p><p>Another metric that G9 does more is power consumption, doing about 55% more than the G8. While it’s not a piece of information to brag about, it is expected when older CPUs were once rated at 85W TDP to now using ones with 150W TDP; and when considering how much work the G9 servers do:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2Kzoz5pwmyzAPfHZRPPcGu/44145ef50ae1385f85ab0a605d14e57e/Screen-Shot-2018-10-03-at-7.12.17-PM-1.png" />
            
            </figure><p>G9 is actually 1.5x more power efficient than G8. Temperature readings were checked as well. Inlet and outlet chassis temps, as well as CPU temps, are well within operating temperatures.</p><p>Now that’s muscle! In other words for every 3 G8 servers, just 2 of those G9's would take on the same workload. If one of our racks normally would have 9 G8 servers, we can switch those out with only 6 G9's. Inversely planning to turn up a cage of 10 G9 racks would be the same as if we did 15 G8 racks!</p><p>We have <a href="https://www.bizjournals.com/sanfrancisco/news/2018/06/14/cloudflare-to-expand-to-200-cities-by-2019.html">big plans</a> to cover our entire network with G9 servers, with most of them planned for the existing cities your site most likely uses. By 2019, you’ll benefit with increased bandwidth and lower wait times. And we’ll benefit in expanding and turning up datacenters quicker and more efficiently.</p>
    <div>
      <h3>What's next?</h3>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>Gen X? Right now is exciting times at Cloudflare. Many teams and engineers are testing, porting, and implementing new stuff that can help us lower operating costs, explore new products and possibilities, and improve Quality of Service. We’re tackling problems and taking on projects that are unique in the industry.</p><p>Serverless computing like <a href="/introducing-cloudflare-workers/">Cloudflare Workers</a> and beyond will ask for new challenges to our infrastructure as all of our customers can program their features on Cloudflare’s edge network.</p><p>The network architecture that was conventionally made up of routers, switches, and servers has been merged into 3-in-1 box solutions allowing Cloudflare services to be set up into locations that weren’t possible before.</p><p>The advent of NVMe and persistent memory, as well as the possibility of turning SSDs into DRAM, is redefining how we design cache servers and handle <a href="https://www.cloudflare.com/products/argo-smart-routing/">tiered caching</a>. SSDs and memory aren’t treated as separate entities like they used to.</p><p>Hardware brings the company together like a rug in a living room. See how many links I mentioned above to show you how we’re one team dedicated to build a better Internet. Everything that we do here roots down to how we manage the tons of aluminum and silicon we’ve invested. There's a lot here to develop our hardware to help Cloudflare grow to where we envision ourselves to be. If you’d like to contribute, we’d love to hear from you.</p> ]]></content:encoded>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Network]]></category>
            <category><![CDATA[Hardware]]></category>
            <guid isPermaLink="false">7JbK49f9fhN36UtcbBglkp</guid>
            <dc:creator>Rob Dinh</dc:creator>
        </item>
    </channel>
</rss>