<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Demystifying Datapath Accelerator Enhanced Off-path SmartNIC</title></titleStmt>
			<publicationStmt>
				<publisher>IEEE</publisher>
				<date>10/28/2024</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10625684</idno>
					<idno type="doi">10.1109/ICNP61940.2024.10858560</idno>
					
					<author>Xuzheng Chen</author><author>Jie Zhang</author><author>Ting Fu</author><author>Yifan Shen</author><author>Shu Ma</author><author>Kun Qian</author><author>Lingjun Zhu</author><author>Chao Shi</author><author>Yin Zhang</author><author>Ming Liu</author><author>Zeke Wang</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Network speeds grow quickly in the modern cloud, so SmartNICs are introduced to offload network processing tasks, even application logic. However, typical multicore SmartNICs such as BlueFiled-2 are only capable of processing control-plane tasks with their embedded processors that have limited memory bandwidth and computing power. On the other hand, cloud applications evolve rapidly, such that a limited number of fixed hardware engines in a SmartNIC cannot satisfy the requirements of cloud applications. Therefore, SmartNIC programmers call for a programmable datapath accelerator (DPA) to process network traffic at line rate. However, no existing work has unveiled the performance characteristics of the existing DPA.To this end, we present the first architectural characterization of the latest DPA-enhanced BlueFiled-3 (BF3) SmartNIC. Our evaluation results indicate that BF3's DPA is significantly wimpier than the off-path Arm processor and the host CPU. However, we still identify that DPA has three unique architectural characteristics that unleash the performance potential of DPA. Specifically, we demonstrate how to take advantage of DPA's three architectural characteristics regarding computing, networking, and memory subsystems. Then we propose three important guidelines for programmers to fully unleash the potential of DPA. To demonstrate the effectiveness of our approach, we conduct detailed case studies regarding each guideline. Our case study on key-value aggregation achieves up to 4.3→ higher throughput by using our guidelines to optimize memory combinations.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>In the modern cloud, network speeds grow quickly, with 100/200 Gigabit Ethernet (GbE) network interface controllers (NICs) widely deployed <ref type="bibr">[1]</ref>- <ref type="bibr">[3]</ref> and 400/800 GbE expected in the near future <ref type="bibr">[4]</ref>, <ref type="bibr">[5]</ref>. At the same time, Moore's law is slowing down, and the gap between network and CPU speeds is rapidly increasing. More and more works intend to equip NICs with more computing power to alleviate the computing pressure of host servers.</p><p>These NICs with computing power are usually called Smart-NICs, e.g., multicore system-on-chip (SoC) SmartNICs. SoC SmartNICs provide significantly more generality and have been widely used in various application domains <ref type="bibr">[6]</ref>. Prior work <ref type="bibr">[7]</ref> categorizes SoC SmartNIC into two types: onpath and off-path, according to how SmartNIC processors interact with network traffic. Processors of on-path SmartNICs sit on the packet path and can directly manipulate each incoming/outgoing packet. For off-path SmartNICs, incoming packets from the network are delivered to either host CPUs &#8224; Equal contribution &#8594; Corresponding Authors: {zhangyin98, wangzeke}@zju.edu.cn or off-path processors based on forwarding rules installed on the NIC switch, while both host CPUs and off-path processors can send out packets through the NIC TX port.</p><p>The processors in the SoC SmartNICs are usually Arm <ref type="bibr">[6]</ref>, <ref type="bibr">[8]</ref>, <ref type="bibr">[9]</ref> or cnMIPS <ref type="bibr">[10]</ref>, and have fewer threads compared with the host CPU. This prevents the SmartNIC processors from processing network traffic at line rate. Current off-theshelf SmartNICs solve this problem by equipping NICs with a few powerful hardware domain-specific engines, such as erasure coding, de/compression, and encryption engines <ref type="bibr">[6]</ref>, <ref type="bibr">[8]</ref>- <ref type="bibr">[11]</ref>. However, different cloud applications have different offloaded computation kernels, and fifty hot cloud applications occupy around 60% host CPU cycles <ref type="bibr">[12]</ref>- <ref type="bibr">[14]</ref>, each hot application could need a customized engine to accelerate <ref type="bibr">[15]</ref>, <ref type="bibr">[16]</ref>, and thus Google even proposes the concept of "a sea of accelerators" for cloud applications. Even worse, hot cloud applications change over time <ref type="bibr">[12]</ref>, <ref type="bibr">[17]</ref>, <ref type="bibr">[18]</ref>. Therefore, the current SoC SmartNICs that feature a few fixed hardware engines fail to meet the requirements of cloud applications.</p><p>This trend calls for a programmable datapath accelerator that can provide line-rate data processing ability while serving a broad range of applications. SmartNIC vendors are trying to integrate a programmable datapath accelerator in the Smart-NIC datapath. Nvidia's latest BlueField-3 (BF3) <ref type="bibr">[8]</ref> adds a many-core RISC-V processor in the datapath (called datapath accelerator, DPA). Even though plenty of recent works <ref type="bibr">[7]</ref>, <ref type="bibr">[19]</ref>- <ref type="bibr">[25]</ref> have characterized the traditional SmartNICs, there is no comprehensive study on DPA-enhanced SmartNICs. Therefore, it's still unclear for programmers to fully understand the performance characteristics of DPA, which could heavily interact with off-path processors and host CPUs.</p><p>To this end, this paper conducts the first systematic benchmark on characterizing the performance of DPA-enhanced SmartNIC, specifically the BlueField-3. We thoroughly evaluate the resources in a BF3-attached server including generalpurpose computing power. To tap into the potential of DPA, we assess it from an architectural perspective instead of reporting performance numbers. Our evaluation results indicate that the current DPA is markedly underperforming than the host/Arm. However, we still identify that DPA has three unique architectural characteristics regarding computing, networking, and memory subsystems, that expose the potential to benefit certain types of applications. We demonstrate how to take advantage of DPA's three architectural characteristics to fully unleash the potential of the underperforming DPA by using three 979-8-3503-5171-2/24/$31.00 &#169;2024 IEEE corresponding case studies. The experimental results show that the achievable throughput of the key-value aggregation service can be increased by up to 4.3&#8594; and the time uncertainty bound of the clock synchronization service can be decreased by up to 2.3&#8594;. Then we conclude three important DPA-related guidelines for future SmartNIC programmers regarding these architectural characteristics: &#8226; 1. Offloading latency-sensitive and simple workloads.</p><p>Compared with the host/Arm, DPA is much closer to the network, since DPA and NIC are on the same chip. As such, DPA enjoys the lowest network latency. Latencysensitive network applications can exploit this characteristic to improve end-to-end performance. Our case study on clock synchronization service achieves up to 2.3&#8594; lower time uncertainty bound. However, we cannot offload computeand/or memory-bandwidth-bound logic to DPA due to its limited computing ability and memory bandwidth of a single DPA thread. &#8226; 2. Offloading easy-to-parallelize workloads with small working set sizes. Our benchmarking results reveal that offloading stateless network functions to DPA cores can achieve line rate as host/ARM, even though each DPA thread is significantly wimpier, because DPA has more cores than host/Arm. However, when the application's working set size exceeds DPA's cache size, significant performance downgradation would occur. Programmers can offload easyto-parallelize workloads to exploit DPA's many-core parallelism. Also, the memory working set size should better fit in DPA's cache size to avoid significant degradation. &#8226; 3. Carefully select memory buffers when running network workloads in DPA cores. DPA can access not only its own memory but also the off-path Arm's memory and the host CPU's memory. Using different memories for the DPA cores can result in several times performance differences. Programmers must carefully choose different memories according to the specific usage. Our case study on key-value aggregation service achieves up to 4.3&#8594; higher throughput by optimizing memory combinations.</p><p>We acknowledge that our findings may not fully apply to the next generation of BlueField SmartNICs or products from other vendors. However, we believe that our methodology (i.e., studying the characteristics of each component and offloading workloads accordingly) can be applied to other SmartNICs. Our benchmark code and tools are available at <ref type="url">https://github.  com/RC4ML/BenchBF3</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. BACKGROUND</head><p>A. On-path/Off-path SmartNIC SoC SmartNICs comprise a multicore processor (i.e., MIPS/ARM) and the processor is usually underperforming due to the cost, form factor, and power <ref type="bibr">[26]</ref>. SoC SmartNIC has its own onboard SRAM/DRAM and usually has a DMA engine to access host server memory. A different SoC SmartNIC has a different set of domain-specific accelerators (e.g., encryption, regular expression matching, and erasure coding).  Depending on where the processor sits on the network path, SmartNICs can be categorized into two categories: Onpath and Off-path. As shown in Figure <ref type="figure">1a</ref> processors in onpath SmartNICs provide inline processing power for each incoming/outgoing packet. Figure <ref type="figure">1b</ref> shows the schematic diagram of off-path SmartNICs, and each incoming packet can be forwarded to SmartNICs processor or host CPU. This kind of pattern is also called lookaside acceleration <ref type="bibr">[27]</ref>. Processors of on-path SmartNICs are usually thought to be closer to the network than off-path SmartNICs due to the higher wire latency introduced by the NIC switch (&#8593;500 ns in BF3).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. DPA-enhanced BlueField-3 SmartNIC</head><p>Figure <ref type="figure">2</ref> demonstrates the overall architecture of BF3 SmartNIC. BF3 mainly consists of an off-path Arm processor, a many-core datapath RISC-V processor, an off-chip DDR5 memory, a PCIe switch, several domain-specific accelerators, and a NIC module.</p><p>Unlike the off-path Arm processor and domain-specific accelerators that provide look-aside computing power, the many-core DPA sits in the network critical path, providing inline processing ability. Unlike a naive on-path processor, DPA is designed to be able to tightly interact with the Armrelated resources and the host-related resources. Despite DPA's three-level cache and memory, DPA can access the host's last-level cache (LLC), host memory, Arm LLC, and Arm memory. The complicated cache/memory hierarchy makes it challenging for programmers to fully unlock the potential of the datapath accelerator-enhanced off-path SmartNIC.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Experiment Setup</head><p>We build a testbed and conduct various experiments on it to fully understand the performance characteristics of the abundant resources of DPA-enhanced BF3. The testbed comprises two servers running Ubuntu 22.04 (Linux kernel-5.15.102), each equipped with a BF3 SmartNIC. The two BF3</p><p>Table I: Hardware description of experiment setup Component Hardware description Server SuperServer SYS-421GE-TNRT Host CPU Intel Xeon Gold 6426Y Host Memory 256 GB DDR5-4800 (8 out 8 channels) NIC 1&#8593; BlueField-3 B3220(2 &#8593; 200Gbps) NIC PCIe PCIe 5.0 &#8593;16</p><p>Table II: Hardware Specifications of compute resources Resources Host (X86) Arm DPA (RISC-V) Processor Intel Xeon Cortex-A78AE RV64IMAC Cores 16 16 16 Threads 32 16 256 L1D Cache 48K&#8593;16 64K&#8593;16 1K&#8593;256 L1I Cache 32K&#8593;16 64K&#8593;16 1K&#8593;16 L2 Cache 1M&#8593;16 0.5M&#8593;16 1.5M&#8593;1 L3 Cache 37.5M&#8593;1 16M&#8593;1 3M&#8593;1 Frequency 2.5GHz 2.133GHz 1.8GHz</p><p>SmartNICs are connected back-to-back using two 200GbE QSFP56 cables. The detailed configuration of the servers is shown in Table <ref type="table">I</ref>. In all network-related experiments, we use link aggregation <ref type="bibr">[28]</ref> to combine two network interfaces into a single interface and use hash mode to distribute packets. DPA software uses NVIDIA DOCA framework <ref type="bibr">[29]</ref> (v2.  <ref type="table">II</ref>. The noticeable difference is that DPA has markedly more threads than the host/Arm, so it becomes necessary to benchmark the DPA-enhanced SmartNIC such that programmers can easily optimize their applications on top of our benchmarking hints. Benchmarking Methodology:</p><p>&#8226; First, we benchmark the general-purpose computing power in a BF3-attached server regarding memory subsystem and computing ability ( &#167; III). &#8226; Second, we benchmark the networking ability of the three processors ( &#167; IV). &#8226; Third, we present three case studies to demonstrate our hints related to how to fully exploit the potentials of DPAenhanced SmartNIC ( &#167; V).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. BENCHMARKING GENERAL-PURPOSE COMPUTING POWER</head><p>In this section, we characterize the general-purpose computing power in a BF3-attached server, i.e., the three processors. Prior works <ref type="bibr">[7]</ref>, <ref type="bibr">[19]</ref>- <ref type="bibr">[22]</ref>, <ref type="bibr">[24]</ref> evaluate the SmartNIC processors from a high-level application perspective. To thoroughly understand the characteristics of these processors, we assess them from two architectural perspectives: 1) computing and 2) memory subsystem.  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Benchmarking Three Computing processors</head><p>In this section, we benchmark the three processors regarding their computing ability. To experimentally assess their efficiency, we conducted a series of tests following the methodology outlined in <ref type="bibr">[32]</ref>. The bandwidth is analyzed by varying the number of memory operations to access different levels of the memory hierarchy, specifically by using contiguous memory and incrementally increasing the working set sizes to fit the capacities of L1, L2, L3 caches, and main memory. Figure 3a/ 3b/ 3c shows three processors' Cache-aware Roofline Model <ref type="bibr">[32]</ref> for the "INT64 Multiplication" operations. We find that Arm can provide similar operations per second (Gops) comparable to that of the host CPU under the same core counts ( <ref type="formula">16</ref>) and without hyper-threading. Although DPA has 256 threads (16 cores), its achievable Gops is 7.5&#8594; lower than the host CPU and 4.7&#8594; lower than the Arm. DPA's singlethread computing power is much lower than the host/Arm (up to 26&#8594; lower). Figure <ref type="figure">3d</ref> uses the same testing method as previous experiments. It shows DPA's "INT64 Multiplication" performance under different numbers of DPA threads, demonstrating linear scalability. Takeaways (Computing): Arm cores can serve as a powerful supplement to the host's computing capabilities. DPA's singlethread computing power is very low, and serial computeintensive workloads should not be offloaded to DPA cores. DPA's Unique Computing Characteristic: Unlike the host/Arm, DPA has a thread count (256) that is an order of magnitude higher. To fully leverage DPA's underperforming computing ability, the workloads should be very easy to parallelize. We further use a case study to explore this DPA's unique computing characteristics in &#167; V-B.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Memory Subsystem</head><p>In this section, we evaluate the memory subsystem of the BF3-attached server. All three processors in the BF3-attached  server have their own three-level cache. Both X86 and Arm core have directly connected DDR memory.</p><p>DPA does not have directly connected DDR memory, instead, a 1-GB region in the Arm DDR is allocated exclusively for DPA access. DPA has to access this memory region (DPA memory) through the NIC switch which incurs high latency. DPA's access to the DPA memory would be cached with Arm's L3 cache and DPA's L1/L2/L3 cache. In addition to DPA memory, DPA can access the host memory and Arm memory through a memory aperture module <ref type="bibr">[33]</ref> near the DPA core. This module converts a memory request into a PCIe transaction, thus allowing DPA cores to directly access Arm memory and host memory using a load/store instruction. It's worth noting that such accesses will only go through DPA's L1 cache and will not go through DPA's L2/L3 caches. Also, DPA's access to the host/Arm memory would go through the host L3 cache or Arm L3 cache. Figure <ref type="figure">4</ref> shows the physical paths of the DPA's access to these three kinds of memories.</p><p>1) Cache/Memory Latency: We first measure the memory/cache read latency. We use a pointer-chasing manner <ref type="bibr">[34]</ref> and carefully vary the access stride and the working set size. Figure <ref type="figure">5</ref> shows the latencies of the supported five kinds of memory accesses. "X&#8595;Y mem" means X processor accesses Y memory. We have three observations. First, The L1 cache latency of DPA is 10.5&#8594; of the host L1 latency. DPA's L2/L3 cache latency is also significantly higher than that of the host/Arm. The high cache latency of DPA indicates that carefully using DPA cores is extremely important for application offloading. Second, DPA has noticeably higher memory reading latency than Arm and the host. DPA's memory read latency is at least several times higher than the host/Arm. This can primarily be attributed to the high latency of the NIC switch and PCIe interconnect. Compared to the Arm core and host core's direct memory access, DPA's access to the DPA memory or Arm memory would involve an additional NIC switch. In addition to the NIC switch, DPA's access to host memory also involves another PCIe interconnect.</p><p>Third, although Arm memory and DPA memory are physically the same DDRs connected to the Arm core, the latency of DPA's access to the DPA memory is noticeably higher than DPA's access to the Arm memory. We suspect this is mainly because DPA's access to the host memory and Arm memory only go through DPA's L1 cache <ref type="bibr">[33]</ref>, while DPA's access to the DPA memory would additionally go through DPA's poor L2/L3 cache. The latency of "DPA&#8595;Host" is still higher than DPA accessing DPA memory although it bypasses the L2/L3 cache, due to the additional step of the host PCIe interconnect.</p><p>2) Cache Bandwidth: In this section, we measure DPA's random read bandwidth from a DPA memory buffer. We vary the memory buffer size (i.e., the working set size) and use different numbers of threads.</p><p>Figure <ref type="figure">6a</ref> shows the read bandwidth of using a single DPA thread and Figure <ref type="figure">6b</ref> shows the bandwidth of using all 190 DPA threads. We observe that the read bandwidth significantly drops when the working set exceeds DPA's L2 cache size (1.5 MB), the bandwidth loss can be up to 25&#8594;. This indicates that memory-intensive DPA applications must carefully manage their working set size.</p><p>3) Memory Bandwidth: Figure <ref type="figure">7</ref> shows the per-thread and all-thread sequential read bandwidth of the mentioned five kinds of accesses. We let the working set be large enough that all reading requests are served by the memory instead of the cache. "X&#8595;Y mem" means X cores access Y memory. The all-threads bandwidth is measured by using all threads concurrently. We have two observations. First, no matter access which memory, DPA has up to 205&#8594; lower per-thread read/write bandwidth than the host and Arm. Although DPA has 256 threads, the all-threads bandwidth is still up to 7.6&#8594; lower than Arm and the host. The all-thread bandwidth is also much lower than the network line rate (400 Gbps full-duplex). This implies that DPA can perform poorly in memory-intensive applications.   Second, Arm cores in BF3 have a comparable per-thread memory bandwidth to host cores. This suggests offloading memory-intensive workloads to BF3's Arm cores. The allthreads memory bandwidth of the host is 2.7&#8594; higher than the Arm because BF3's Arm only has two memory channels while the host features eight memory channels. Mixed memory bandwidth of DPA cores. From Figure <ref type="figure">7</ref>'s DPA-related results, we can observe that the all-threads memory bandwidth for each memory is far lower than the product of per-thread bandwidth and the number of DPA threads. This indicates that the DPA's memory bandwidth is not bounded by the DPA thread count. This inspires us to explore whether we could use the spare DPA threads to access other different memories to further improve DPA's all-threads memory bandwidth.</p><p>Accordingly, we use a different number of DPA threads to access DPA memory and the remaining threads to access the host memory or Arm memory <ref type="foot">1</ref> . Figure <ref type="figure">8</ref> shows the mixed read/write bandwidth for two combinations: "DPA mem + Arm mem" and "DPA mem + Host mem". We observe that the write bandwidth of "DPA mem + Arm mem" and the read/write bandwidth of "DPA mem + Host mem" are all higher than only using a single type of memory. The maximum bandwidth improvement can be up to 2.4&#8594;. This indicates that memoryintensive workloads running in DPA cores should consider using multiple kinds of memories concurrently to maximize the achievable memory bandwidth. Takeaways (Memory subsystem). DPA's cache/memory latency is much higher than the host/Arm. DPA's all-threads memory bandwidth is also significantly lower than the host/Arm. Unlike the host/Arm, DPA does not have a directly connected memory. DPA has to access DPA memory or Arm memory through the NIC switch, which can greatly limit the performance on memory-intensive workloads. As such, DPA applications' working set sizes should better fit in the DPA cache size. DPA can use multiple kinds of memories concurrently to improve achievable memory bandwidth. We further use a case study to explore the influence of DPA's unique memory characteristic in &#167; V-C.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>IV. BENCHMAKRING NETWORKING</head><p>In this section, we evaluate the networking ability of a BF3attached server. The datapath accelerator enhanced BF3 offers various strategies to leverage its powerful networking ability. The host, DPA, and Arm cores can send/receive network packets. In this section, we use two back-to-back connected servers as mentioned in &#167; II-C to evaluate the networking abilities of the BF3-attached server.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Effect of Network Buffer Location</head><p>We first examine the effects of network buffer location (either host/Arm memory or DPA memory) when using DPA core to process network traffic <ref type="foot">2</ref> . Host/Arm Memory. When DPA cores use the host/Arm memory as the network buffer, NIC can directly put the newly arrived packets into the host/Arm L3 cache. Regarding processing latency, letting DPA cores use the host/Arm memory as the network buffer is not a good choice, because NIC writing packets into the host/Arm L3 cache would travel through the high-latency NIC switch (and an additional PCIe interconnect if using host memory). We quantitatively analyze this impact on the network latency in &#167; IV-B. DPA Memory. When DPA cores use DPA memory as the network buffer, NIC can directly put the newly arrived packets into the DPA L2 or L3 cache.</p><p>To validate the effect of network buffer location, we conduct the following experiment. We first sequentially send a bunch of packets (e.g., 512 packets of 1KB each) to a DPA core that uses DPA memory as the network receives buffer. After a long enough period to make sure all packets have arrived, the DPA core reads the first packet of this bunch of packets and measures the read latency. Then we sequentially send another Figure <ref type="figure">9</ref>: Average packet access latency under different combinations with a total of 512KB size. A higher index corresponds to a more recently received packet. bunch of packets, and the DPA core measures the latency of the second packet. We repeat this process until we get the latency of the last packet. Note that we only measure one packet latency to prevent the effects of cache prefetching, in addition, we would pollute the DPA cache before the sending side sends a bunch of packets.</p><p>Figure <ref type="figure">9</ref> shows the access latency of each packet. We have two observations. First, the latest received 128 KB packets are guaranteed to be put in the DPA L2 cache. No matter the packet size, the access latency of the latest 128 KB packets is always DPA L2 latency, indicating that these packets are directly put into the L2 cache by the NIC.</p><p>Second, the newer received packet has a higher possibility of being put into the places that are closer to the DPA core, DPA L2/DPA L3/Arm L3/DPA memory from the closest to the farthest, respectively. Takeaways (Working set size). When DPA is managing network traffic, the NIC can directly access the host L3 cache (host memory as network buffer), Arm L3 cache (Arm memory or DPA memory as network buffer), and DPA L2/L3 cache (DPA memory as network buffer). Therefore, programmers need to be aware of the working set size such that the working set stays at the expected cache and thus the memory traffic can be minimized.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Network Latency</head><p>In this section, we measure the network latency regarding different computing cores via an L2-reflector application, as shown in Figure <ref type="figure">10</ref>. The client sends a packet to the server. The server swaps the source and destination MAC addresses of each packet and returns the packet to the client. The packet size is fixed to 1 KB. We deploy the client/server in different processors and measure the average round-trip time, and DPA uses different types of memories. We have two observations. First, regarding different processor implementations, the DPA-based client and server offer the lowest latency while the host-based client and server offer the highest latency. This also aligns with our expectations that DPA enjoys the shortest distance from the network because DPA and NIC are in the same NIC chip. Arm experiences moderate network latency due to its additional NIC switch hop, and the host CPU suffers from the longest network latency due to its additional NIC switch hop and its host PCIe interconnect. Second, the DPA implementation on DPA memory offers the lowest latency compared to that on host/Arm memory. This is because received network packets can be directly put into DPA's L2/L3 memory when using DPA memory without crossing the high-latency NIC switch or PCIe interconnect. When using the Arm memory, the received packets can only be put into the Arm L3 cache through the NIC switch. When using the host memory, the received packets can only be put into the host L3 cache through the NIC switch and PCIe interconnect. Latency vs. Application complexity. Although DPA provides lower network latency, its memory subsystem and computing power are far inferior to the host/Arm. When a networking application involves heavy processing, the advantage of DPA being closer to the network is overshadowed by its poor memory and computing performance.</p><p>We conduct two experiments to demonstrate this issue. In the first experiment, the L2 reflector server additionally reads different percentages of the packet and sums them up as a one-by-one 8-byte integer, as shown in Figure <ref type="figure">11a</ref>. In the second experiment, we approximate a memory-intensive network function by configuring the L2 reflector to perform different numbers of random memory reads per packet from an 8 MB buffer, as shown in Figure <ref type="figure">11b</ref>. In both experiments, the packet size is fixed to 1 KB, and we measure the endto-end L2-reflector latency of the host, Arm, and DPA using three different memories.</p><p>We observe that with the increase in the reading ratio or the number of per-packet random accesses, DPA's latency significantly increases while the host/Arm latency slightly increases. This is because DPA's memory subsystem and single-thread computing power are much wimpier than the host/Arm. These two experiments demonstrate the fragility of DPA's latency advantages, which can easily be surpassed in complex processing due to the host/Arm's stronger computing power and memory subsystem. Takeaways (Networking Latency). DPA is closer to the network compared with the host/Arm and thus has the lowest network latency. However, this latency advantage is fragile and will be nullified when handling complex operations. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Network Throughput</head><p>In this subsection, we measure the achievable network throughput regarding different patterns (send/receive). For the DPA core, we use different memories as packet buffers. Figure <ref type="figure">12</ref> shows the achievable network throughput for different patterns under different packet sizes (64 Bytes and 1 KB). We have three observations. First, when the packet size is small (64 Bytes), none of the three processors can achieve the network line rate. DPA cores require more threads to achieve comparable throughput than the host CPU and Arm.</p><p>Second, when the packet size is large (1 KB), all three processors can achieve the network line rate. But DPA still requires more threads than the host CPU and Arm, indicating that the DPA thread is much wimpier than the host/Arm thread. Luckily, the number of DPA threads ( <ref type="formula">256</ref>) is noticeably more than the Arm ( <ref type="formula">16</ref>) and the host <ref type="bibr">(32)</ref>. So DPA cores can still achieve comparable network throughput using more threads.</p><p>Third, when the packet size is large (1 KB), DPA must use Arm memory or host memory to achieve the network line rate. Using DPA memory only achieves around 100 Gbps for sending packets and around 50 Gbps for receiving packets. We speculate that this is due to the internal limitation of the DPA's L2/L3 cache since using host/Arm memory would bypass DPA's L2/L3 cache. Takeaways (Networking Throughput). DPA thread is significantly wimpier than host/Arm threads regarding sending/receiving network packets, but DPA has more threads and can achieve comparable network throughput as host/Arm. DPA's unique networking characteristic: DPA has the advantage of being closer to the network and thus enjoys lower network latency. Programmers can consider offloading latency-sensitive network applications to the DPA. However, DPA's single-thread performance is too wimpy, so the offloaded workloads can not involve heavy computation or many memory operations. Otherwise, the latency advantages would quickly be overshadowed. We further use a case study to measure the impact of DPA's unique network characteristic on the end-to-end applications in &#167; V-A.</p><p>V. CASE STUDIES</p><p>In this section, guided by the above benchmarking results, we further use three case studies to explore the three unique characteristics of the DPA cores. In each case study, we have five kinds of implementations unless stated otherwise.</p><p>&#8226; "Host": all functions are deployed in the host CPU. &#8226; "Arm": all functions are deployed in Arm.</p><p>&#8226; "DPA&#8595;Y mem": all functions are deployed in DPA. "Y mem" indicates the network buffer memory type (host/Arm/DPA memory) used.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Clock Synchronization Service</head><p>Compared with the host/Arm, DPA is the closest to the network. Latency-sensitive network workloads can benefit from DPA's characteristic that is closer to the network.</p><p>To explore the potential impact, we conduct a case study on latency-sensitive clock synchronization service. Clock synchronization is critical for many datacenter applications <ref type="bibr">[38]</ref> such as distributed transactional databases <ref type="bibr">[39]</ref>, <ref type="bibr">[40]</ref>, consistent snapshots <ref type="bibr">[41]</ref>, <ref type="bibr">[42]</ref>, and network telemetry <ref type="bibr">[43]</ref>, <ref type="bibr">[44]</ref>. The key metric for clock synchronization is the time uncertainty bound for each node <ref type="bibr">[38]</ref>, <ref type="bibr">[39]</ref>, <ref type="bibr">[45]</ref>, donated as &#969;. Lower time uncertainty bound (&#969;) can improve the performance of distributed applications and enable more accurate one-way delay measurement. Implementations. We use two servers mentioned in &#167; II-C, one as a synchronization client and the other as a synchronization master node. The synchronization duration is set to be 0.1 seconds and the clock drift is set to be 10 microseconds per second <ref type="bibr">[46]</ref>. We have deployed five kinds of clock synchronization services as mentioned above.</p><p>Figure <ref type="figure">13a</ref> shows the time uncertainty bound (&#969;) for different implementations when the network is under-loaded, i.e., there is only a clock synchronization service in each server. Figure <ref type="figure">13b</ref> shows the 999th percentile time uncertainty bound when the network is heavily used. To make the network heavily used, we let an extra network-intensive L2-reflector application run in the host cores at the same time and it consumes up to 400 Gbps bi-direction network throughput. We have two observations. First, all three DPA implementations offer much lower time uncertainty bound than the host/Arm, up to 2.0&#8594; in average latency and 2.3&#8594; in 999th percentile latency. This  indicates that DPA's characteristics can greatly improve the performance of latency-sensitive network applications due to its location closer to the network. Second, among three DPA implementations, "DPA&#8595;DPA mem" offers the lowest time uncertainty bound. This is because the network packets can directly be put into or be fetched from DPA's L2/L3 cache when DPA cores are using DPA memory. This indicates that latency-sensitive network applications running in the DPA cores should use DPA memory as the network packet buffer. Guideline 1: Offloading latency-sensitive logic to DPA to improve performance. DPA is closer to the network compared with the host/Arm. An application that is sensitive to network latency and fits within DPA cache working set size can leverage this characteristic to improve end-to-end performance. Also, the programmer should choose DPA memory as the network buffer to promote incoming network packets to DPA caches and thus further decrease the processing latency.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Network Function Virtualization</head><p>Compared with the host/Arm, DPA has a thread number that is an order of magnitude higher. To fully enjoy the vast number of threads, the offloaded workloads should be very easy to parallelize, otherwise, the application performance can significantly downgrade due to DPA's poor single-thread computing ability.</p><p>In this case study, we leverage stateless network function virtualization (NFV) <ref type="bibr">[47]</ref>- <ref type="bibr">[49]</ref> to explore DPA's many-core parallelism. Stateless network functions are usually easy to parallelize and can scale well with the number of threads. Implementations. We focus on the throughput metric instead of the latency metric. We choose two stateless network functions: L2-reflector and CheckIPHeader. These two network functions are not memory-intensive such that we can minimize the impact of DPA's memory subsystem characteristics. We have five kinds of implementations as mentioned above.</p><p>Figure <ref type="figure">14</ref> shows the result when packet size is 64B and 1KB. We have two observations. First, DPA's single thread throughput is substantially lower than that of the host/Arm, which is within our expectations. However, with its high thread count, DPA can still achieve comparable throughput as the host/Arm. This indicates that programmers should consider offloading easy-to-parallelize workloads to DPA cores, otherwise, the system throughput may drop significantly (up to several magnitudes) due to DPA's wimpy single-thread performance. Second, when the packet size is large (1KB), the throughput of "DPA&#8595;DPA mem" can not scale along the number of threads. This is consistent with our results from previous network throughput measurements &#167; IV-C, i.e., the maximum send and receive throughput of "DPA&#8595;DPA mem" is around 100 Gbps and 50 Gbps, respectively. This indicates that throughput-intensive applications running in the DPA should avoid using DPA memory as the network buffer. Guideline 2: Offload easy-to-parallelize applications to DPA. Although DPA's single thread is very wimpy, in terms of computing power and memory bandwidth, its thread count (256) is far more than the host/Arm, and can provide line-rate processing ability while processing stateless network function workloads. We suggest programmers can consider using easy-to-parallelize workloads to leverage DPA's many-core characteristics. In addition, using DPA memory for memorybandwidth-intensive applications is not the best solution due to internal DPA cache limitation.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Key-value Aggregation</head><p>To explore the potential impact of this characteristic, we conduct a case study on memory-intensive key-value stream aggregation <ref type="bibr">[50]</ref>. Key-value stream aggregation is a memory-intensive operation widely existing in various distributed systems, e.g., reduce() in big data processing <ref type="bibr">[51]</ref>, <ref type="bibr">[52]</ref>, AllReduce() in distributed training <ref type="bibr">[53]</ref>- <ref type="bibr">[56]</ref>, MP I Reduce() in high-performance computing <ref type="bibr">[57]</ref>, etc. Key-value aggregation is considered to be memory-intensive because the application needs a large memory to hold the intermediate aggregation results and needs to frequently update the intermediate results according to the received network packets. We explore DPA's memory characterization by carefully optimizing the DPA implementation. Implementations. When running key-value stream aggregation, we mainly have two memory regions: network buffer (NetBuf) and aggregation buffer (AggBuf). The network buffer   is used to send/receive network packets (also known as network data ring buffer) while the aggregation buffer is used to hold the intermediate aggregation results for each key. We have seven implementations with supplementary explanations.</p><p>&#8226; "Net-X+Agg-Y": the aggregation service is deployed in the DPA cores. "X" indicates the used memory type for NetBuf while "Y" indicates the used memory type for AggBuf.</p><p>Effect of Memory Type. We first evaluate the effect of memory types on the DPA's end-to-end key-value aggregation throughput. We generate an artificial uniform distribution trace to understand the effectiveness of hot-key. The key-value tuple size is 16 bytes and each packet has a 64 bytes header.</p><p>Figure <ref type="figure">15a</ref> shows the achieved aggregation throughput under different key-value tuples per packet. We observe that "Net-Arm+Agg-DPA" always achieves the highest throughput. Regarding NetBuf, we should use the host memory or Arm memory, as using DPA memory to handle network packets has up to 7.5&#8594; lower throughput than the host/Arm ( &#167; IV-C). Regarding AggBuf, we should consider using the DPA memory or Arm memory for their higher memory bandwidth than the host ( &#167; III-B3). Among these possible combinations, "Net-Arm+Agg-DPA" provides the highest throughput.</p><p>Figure <ref type="figure">15b</ref> shows the aggregation throughput under different numbers of distinct keys. The per-packet KV tuples are fixed to 32. We have three observations. First, when the number of distinct keys increases, the throughput for "Net-Arm+Agg-DPA" and "Net-Arm+Agg-Arm" noticeably decreases because the number of distinct keys exceeds the DPA's L2/L3 cache size and Arm's L3 cache size.</p><p>Second, all implementations that use DPA memory as Net-Buf (all blue lines) suffer from low throughput since they are bounded by DPA memory's limited ability to receive packets.</p><p>Third, two implementations that use the host memory as NetBuf (two red lines) show the lowest throughput because the Key-value aggregation service requires reading the received packets after receiving the packets into the memory, while the throughput of the DPA core accessing the host memory is very low (7.2 GB/s read bandwidth and 14 GB/s write bandwidth). Comparisons with the host/Arm. We then compare the aggregation throughput of the host/Arm/DPA. We use "yelp" trace from production <ref type="bibr">[58]</ref>. We select the best("Net-Arm+Agg-DPA") and worst("Net-Host+Agg-Host") results from all combinations for DPA (named "DPA-Best" and "DPA-Worst"). Figure <ref type="figure">16</ref> shows the achieved aggregation throughput under different thread numbers. We have two observations. First, DPA's best-case aggregation throughput is lower but comparable to the host (2.5&#8594;)/Arm (1.3&#8594;). Although lower than the host/Arm, DPA's end-to-end aggregation throughput still surprises us, considering that DPA's memory latency is an order of magnitude higher than the host/Arm and the memory throughput is significantly lower than the host/Arm.</p><p>Second, DPA's best-case aggregation throughput is markedly up to 4.3&#8594; higher than that of the worst-case. This indicates the importance of selecting appropriate memories for different usages when running applications in DPA cores. Guideline 3: DPA programmers should carefully choose memories from the host/DPA/Arm memory. Using different memories for DPA can result in significantly different performance. The performance gap between the best (Net-Arm + Agg-DPA) and worst (Net-Host + Agg-Host) combinations can be as high as several times. Programmers must choose different memories according to the specific usage, to guarantee high performance when implementing on DPA.</p><p>VI. DISCUSSION Conclusion of guidelines. In this section, we conclude three important DPA-related guidelines for future datapath accelerator-enhanced SmartNIC programmers, followed by our suggestions for DPA-enhanced SmartNIC vendors.</p><p>&#8226; 1. Offloading latency-sensitive and simple workloads to DPA cores. DPA is much closer to the network and enjoys lower network latency. Latency-sensitive applications can exploit this characteristic to improve end-to-end performance. Meanwhile, DPA's single-thread performance is minimal and the offloaded applications cannot involve too heavy computing, otherwise, the low-latency benefit can be quickly overshadowed. &#8226; 2. Offloading easy-to-parallelize workloads with small working set sizes. Our benchmarking results reveal that DPA has more cores than the host/Arm, while each thread is much wimpier. Programmers can offload easy-to-parallelize workloads to exploit DPA's many-core parallelism. However, when the application's working set size exceeds DPA's cache size, DPA has to frequently access memory and thus suffers from severe performance downgradation. Therefore, the memory working set size should better fit in DPA's cache size to avoid significant performance downgradation. &#8226; 3. Carefully select memory buffers for DPA applications.</p><p>DPA can not only access its own memory/cache but also access the off-path Arm's memory and the host CPU's The more prominent a line appears on a radar chart, the more indicative it is of a better performance. memory. Placing application buffers in any of three kinds of memory leads to significantly different performance. Therefore, we list seven main indicators that programmers may be concerned about when choosing memories, as shown in Figure <ref type="figure">17</ref>. where a larger value in each axis is better. We highlight three noticeable hints. First, use the host memory or the Arm memory as the network buffer for bandwidth-intensive network applications, since DPA memory performs poorly regarding the throughput of sending/receiving packets. Second, using host memory is more suitable for DPA applications with large memory footprints because its available size is substantially larger than DPA/Arm memory, given that the host X86 has up to eight per socket memory channels while BF3 only features two DDR5 channels. Third, DPA memory has the potential to perform better in skewed workloads since it features an additional DPA L2/L3 cache that is closer to the DPA core. Suggestions for SmartNIC vendors. Our characterization has uncovered several important factors that bound the performance of the datapath accelerator. And we have some suggestions for SmartNIC vendors.</p><p>&#8226; 1. Directly attach a memory to the DPA. Currently, DPA has no directly attached memory, all memory accesses have to go through a high-latency NIC switch. This incurs at least 5&#8594; higher memory access latency than that of Arm. This can be harmful for applications whose working sets can not be fully cached by DPA's cache. As such, we suggest vendors consider directly attaching a memory to the DPA. &#8226; 2. Equip DPA with a more powerful cache. Current DPA cache suffers from very high latency (up to 10.5&#8594; higher L1 latency than the host CPU cache). Besides, the per-thread L1 cache bandwidth is only 0.53 GB/s (up to 92&#8594; lower than the host L1 cache). Although the frequency of DPA (1.8 GHz) is not significantly lower than that of the host (2.5 GHz), DPA's uncore frequency is 4.4&#8594; lower than the host, which may explain why the DPA cache performance is so poor. As such, we suggest vendors consider equipping DPA with a more powerful cache.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>VII. RELATED WORKS</head><p>To our knowledge, this paper is the first to benchmark DPAenhanced SmartNIC. Characterizing SmartNICs. Prior works <ref type="bibr">[7]</ref>, <ref type="bibr">[19]</ref>, <ref type="bibr">[21]</ref>- <ref type="bibr">[24]</ref> characterize SmartNICs from different perspectives. iPipe <ref type="bibr">[7]</ref> characterizes SoC SmartNICs regarding their computing capacity, memory, traffic control, and host communication. In contrast, we characterize the different processors in a BF3attached server from architectural perspectives and explore the possible influence of the unique architectural characteristics of the DPA. Wei et al. <ref type="bibr">[23]</ref> characterize the off-path BlueField-2 SmartNIC from a communication-path perspective and concurrently use multiple communication paths to improve throughputs. In contrast, we focus on the architectural differences of processors within a BF3-attached server and optimize offloading performance according to the architectural characteristics. Sun et al. <ref type="bibr">[22]</ref> evaluate off-path BlueField-2 using high-level applications and suggest using the SmartNIC as a new endpoint to provide horizontal scaling. Liu et al. <ref type="bibr">[24]</ref> characterize the networking and computing of the BlueField-2's off-path Arm. Michalowicz et al. <ref type="bibr">[19]</ref> compare BlueField-2 and BlueField-3 mainly regarding the off-path Arm's computing ability. In contrast, we focus on characterizing BlueField-3's DPA and Arm from an architectural perspective. SmartNIC offloading. Offloading host workloads to Smart-NICs has recently attracted significant attention in both academia and industry. Many prior works <ref type="bibr">[14]</ref>, <ref type="bibr">[55]</ref>, <ref type="bibr">[59]</ref>- <ref type="bibr">[89]</ref> offload host tasks to FPGA-based or SoC-based Smart-NICs. PANIC <ref type="bibr">[63]</ref> addresses the performance isolation and fairness problems under the multi-tenant environment. Flow-Blaze <ref type="bibr">[64]</ref> enables stateful network packet processing on FPGAs. Xenic <ref type="bibr">[90]</ref> offloads distributed transactions to Smart-NIC. These works leverage SmartNIC to alleviate host CPU pressure but do not provide a comprehensive study on DPAenhanced SmartNIC.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>VIII. CONCLUSION</head><p>Typical multicore SmartNICs such as BlueFiled-2 are only capable of processing control-plane tasks with their embedded processors, which cannot directly process network traffic from cloud applications that evolve rapidly over time. Therefore, SmartNIC-related research calls for a programmable datapath accelerator (DPA) to process network traffic at line rate. However, no existing work has unveiled the performance characteristics of DPA. We present the first architectural characterization of the latest DPA-enhanced BlueField-3 SmartNIC. We identify that DPA has three unique architectural characteristics that unleash the potential of DPA. We propose three pioneering guidelines for programmers to fully unleash the potential of DPA. To demonstrate the effectiveness of our approach, we conduct detailed case studies regarding each guideline.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>We do not let DPA access the host memory and Arm memory concurrently because the current DOCA framework does not allow this kind operation.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1"><p>We do not explore the host CPU/Arm's mechanism since there are plenty of direct cache access related researches<ref type="bibr">[35]</ref>-<ref type="bibr">[37]</ref> about X86/Arm.</p></note>
		</body>
		</text>
</TEI>
