{'fraction_non_alphanumeric': 0.03396818373790801, 'fraction_numerical': 0.008587575166421977, 'mean_word_length': 5.173060211049038, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Application-aware Congestion Mitigation forHigh-Performance Computing Systems

High-performance computing (HPC) systems frequently experience congestion leading to significant application performance variation. However, the impact of congestion on application runtime differs from application to application depending on their network characteristics (such as bandwidth and latency requirements). We leverage this insight to develop Netscope, an automated ML-driven framework that considers those network characteristics to dynamically mitigate congestion. We evaluate Netscope on four Cray Aries systems, including a production supercomputer on real scientific applications. Netscope has a lower training cost and accurately estimates the impact of congestion on application runtime with a correlation between 0.7and 0.9 for common scientific applications. Moreover, we find that Netscope reduces tail runtime variability by up to 14.9 times while improving median system utility by 12%.


I. INTRODUCTION
Modern high-performance computing (HPC) systems concurrently execute multiple distributed applications that contend for the high-speed network leading to congestion. To limit contention in the network, several control (CC) mechanisms that limit application traffic injection into the network have been proposed [1]- [6]. However, application runtime variability (i.e., variable job completion times for the exact same input parameters) and suboptimal system utility (i.e., increased node hours to complete workloads) continue to be a problem in production systems [7], [8]. For example, runtime variability of up to 100% has been observed in a 512 node MILC application [9], which projects to several million node hours of wasted compute time (based on [10]).
Insights and Challenges. A significant limitation of prior work is its sole reliance on a partial network view (e.g., message round trip time on application placement-defined paths) to perform congestion mitigation without considering the endto-end adverse effects of congestion on application runtime. Our network measurements show that end-to-end effects of congestion can significantly degrade the performance of some applications while having minimal impact on others (described in §II). By not considering variability in end-to-end effects of congestion on application runtime, current CC mechanisms incorrectly penalize (i.e., throttle traffic of) applications that are more susceptible to effects of congestion (described in §II). Thus, congestion mitigation must include end-to-end effects as an important feature in modeling and mitigating an application's runtime variability. However, it is challenging to infer end-to-end adverse effects of congestion on application runtime dynamically as it requires analysis and modeling of a high-dimensional dataset consisting of network telemetry data (e.g., network performance counters), network topology, and application node placement. Our Approach. This paper proposes a machine learning (ML) method that estimates end-to-end effect of congestion by combining a probabilistic model with domain insights and regression, which is trained using both production and synthetically-congested application executions (that includes network telemetry, topology, performance counters, and node placement). Inference on this model drives an applicationaware congestion mitigation mechanism that: (i) rate limits (i.e., throttles) application traffic that will not be adversely affected by reduced bandwidth, and (ii) avoids traffic rate limiting of applications that are more sensitive to congestion. We implement this machine learning-based application-aware congestion mitigation framework as Netscope. Netscope has the following two components: an application behavior inference engine and a congestion mitigation mechanism.
Application Behavior Inference engine. The application behavior inference engine estimates the end-to-end effect of congestion on application runtime using an ML model. Typically, training this ML model requires several training runs that can be prohibitively expensive to obtain in production settings. For example, AutoML [11] and other black-box models [8] would require thousands of application runs as training input. We address the challenge of reducing application runs required for training by: (i) distinct but inter-linked system-specific and application-specific congestion impact estimation models. The system model estimates the impact of congestion on message delivery using network telemetry data. The application model uses inference from the system model to estimate the impact of congestion on application runtime. This separation allows us to train the system model for a given HPC system using a specialized pingpong application (described in §VI). This trained system model is then leveraged to optimize the training of the application model, thereby requiring significantly fewer additional application runs. (ii) synthetically-creating congestion to generate adverse congestion scenarios to accelerate model training. These scenarios allow us to explore the diverse possibilities of congestion quickly compared to production settings.
Congestion Mitigation. The congestion mitigation mechanism uses a dynamic traffic rate limiter based on an Additive Increase Multiplicative Decrease (AIMD) 1 [12] control loop whose parameters are inferred using our application behavior inference engine. Netscope enhances the state-of-the-art AIMD mechanism by making the multiplicative decrease step in the AIMD control loop dependent on the end-to-end effects of congestion on application runtime. The enhanced AIMD significantly reduces application runtime variability and increases overall system utility, especially in the tail.
Results. We implement and evaluate Netscope on four Cray Aries systems [13] including a production supercomputer across real applications; which includes MILC [9], Quantum Espresso [14], AMG [15], and LAMMPS [16]. We also plan to release our code post paper acceptance. Our evaluation shows: (a) The congestion mitigation mechanism significantly reduces runtime variability and improves system utility. In our evaluation, tail application runtime variability with Netscope is 14.9× lower than with Cray static rate control and 11.2× lower than with DCQCN rate control [17] (a CC mechanism for RDMA networks). Moreover, median node hours used with Netscope are 8% and 12% lower than with Cray static rate control and DCQCN, respectively. (b) The application behavior inference engine accurately estimates the impact of congestion on application runtime. The application behavior inference engine can estimate application runtime with a correlation between 0.7 and 0.9 for common scientific applications under syntheticallygenerated congestion and natural system congestion found in production settings. (c) The application behavior inference engine has a low training cost. The engine can adapt to a new application within thirty runs in production environments and five runs with synthetically generated congestion.
II. MOTIVATION Applications running in HPC systems [10] have diverse communication characteristics in terms of varying message sizes, interplay between communication primitives, and application logic. Those applications can be broadly categorized into delay sensitive and bandwidth intensive applications. Delay sensitive applications rely on low link buffer occupancy to achieve minimal network latency and low application runtime (i.e. increase in network latency increases application runtime significantly). Examples include MILC [9] and Quantum Espresso [14], [18]. We provide a definition and quantification of delay sensitivity in §IV-A. Bandwidth intensive applications rely on large message sizes and collective communication primitives [19] that exhausts available network bandwidth. Examples include spectral codes [20] that use all-to-all traffic patterns. GPCNeT [21] is a benchmark that mimics such bandwidth intensive communication patterns (i.e., all-to-all and N-to-1) found in HPC applications. Moreover, there exists an entire spectrum of applications that can be found at varying levels of delay sensitivity and bandwidth intensity. These applications contend with each other for limited network resources, and failure to efficiently multiplex network resources leads to runtime variability and suboptimal system utility. To address those problems, we leverage the following insights to design an application-aware congestion mitigation framework.
Insight 1: Runtime variability can be reduced by augmenting the CC mechanism with application delay sensitivity. Congestion signals used in rate control mechanisms such as ECN [22], QCN [23], and network delay [5], [6] do not address the source of congestion directly. Consequently, during the operation of the CC mechanism, the non-congestion-contributing applications are penalized along with the culprit that is responsible for the congestion. Moreover, if the application that was not responsible for congestion is also delay sensitive, it's performance degradation due to congestion mitigation can be severe. Because of this incorrect penalization, use of CC has been disabled on Sierra and Summit [21] systems (ranked second and third among the "TOP500" supercomputers [24]). To resolve the incorrect penalization problem, we created an application-aware rate control mechanism (described in §V) that penalizes applications based on their delay-sensitivity, and tested it on a Cray Aries [13] HPC system (16 switches and 54 nodes) against two different algorithms (Cray static rate control [13] and DCQCN [17]). Our test workload consists of a delay sensitive application (MILC, isolated runtime 26 sec) and a bandwidth intensive application (GPCNeT, isolated runtime 75 sec) that execute simultaneously. Overall (see Table I), we find that the application-aware mechanism ensures low runtime variability for both applications. Our application-aware rate control throttled (i.e., penalized) MILC traffic only 20% of what it throttled GPCNeT.  Table I: Measured percentage increase in application runtime with respect to baseline for three CC mechanisms. Insight 2: Network performance counter 2 telemetry can be used to estimate application delay sensitivity. Network performance counters are widely collected on production systems [25] and can be used to characterize network behaviour. Fig. 1a shows the runtime for MILC and GPCNeT under low (0.25% percent time stalled 3 ) and high (7.5% percent time stalled) congestion, as measured from network stall counters. The figure shows that response to congestion in the system (that is captured through network counters) varies. For instance, MILC has a 60% increase in runtime, while GPCNeT's runtime marginally increases by 2.6% for the same difference in measured congestion. We can leverage this variability in behavior as measured from network performance counters to enable estimation of delay sensitivity.
Insight 3: HPC workloads enable efficient estimation of delay sensitivity. There are several challenges associated with estimating delay sensitivity such as: (i) estimating delay sensitivity for a large number of applications, and (ii) variability in delay sensitivity across the application lifespan. We characterize HPC workloads to show that these challenges do not manifest in (or negligibly impact) production systems and workloads. First, delay sensitivity needs to be characterized for only few applications. Fig. 1b shows the cumulative distribution of node hours utilized by different applications running on three generations of NERSC systems [10]. We observe that the top 10 applications comprise nearly 50% of the workload in these systems. Second, our characterization of two of these applications reveals traffic stability; thereby, indicating low variability in delay sensitivity across the application lifespan. Fig. 1c shows the variation in cumulative traffic injection in two common scientific applications: MILC [9] and LAMMPS [16]. We observed iterative communication behavior across the run for both applications. Moreover, such iterative behaviour has been demonstrated for multiple commonly used HPC applications [26]- [28].    Figure 2: Overview of Netscope III. NETSCOPE OVERVIEW Fig. 2 depicts the architecture of Netscope, our proposed application-aware congestion mitigation framework for highperformance computing systems. The framework consists of two major components: application behaviour inference engine and congestion mitigation driven by existing network monitoring techniques, discussed below. Network Monitoring ( 1 ). HPC systems expose network telemetry data of each switch as network performance counters. Netscope uses network telemetry data to drive (i) the application behavior inference engine, which enables estimation of application delay sensitivity; and (ii) congestion mitigation. For the application behavior inference engine, the counters are collected and aggregated across the network by the Lightweight Distributed Metric Service (LDMS) [25] to provide a coherent global network snapshot. For the congestion mitigation mechanism, each node periodically samples local switch counters by using the Performance API (PAPI) [29]. 4 Our test HPC systems use the Cray Aries network technology [13] with a low-diameter Dragonfly topology [30]. The Dragonfly topology partitions the compute nodes and switches into fully connected "electrical groups," [13] in which each group operates as a high-radix virtual switch. To mitigate congestion in the Dragonfly network, each node performs static rate control and uses adaptive routing to distribute traffic across network paths [30]. Application Behavior Inference Engine ( 3 ). The application behavior inference engine helps us estimate delay sensitivity, a metric that captures the end-to-end effects of congestion. The engine is driven by three inter-linked probabilistic regression models: (i) the network latency model (described in §IV-B), which estimates network latency (i.e., the time required to send a quanta of data 5 ) under varying levels of congestion by using network performance counters (indicative of queuing delays), network topology, and compute-node endpoints; (ii) spatial & temporal aggregation (described in §IV-A), which estimates expected message delivery time by aggregating inferred network latency spatially (i.e., across multiple communication paths) and temporally (i.e., across the application's lifespan); and (iii) the delay sensitivity model (described in §IV-A), which estimates application delay sensitivity using inferred message delivery times and corresponding application runtimes. The network latency model is system-specific, i.e., it needs to be retrained for each system, whereas the delay sensitivity model and spatial & temporal aggregation are application-specific, i.e., they need to be retrained for every application configuration. To train the latency model, we use round-trip time measurements obtained via a specialized pingpong application under diverse congestion conditions and representative compute node endpoints. To train the application model, we use application runtimes collected from application runs under synthetically generated or natural system congestion. Congestion Mitigation Mechanism ( 2 ). The congestion mitigation mechanism uses a dynamic traffic rate limiter based on an additive increase multiplicative decrease (AIMD) [12] control loop whose parameters are inferred using our application behavior inference engine. An AIMD control loop exponentially throttles application traffic (multiplicative decrease) when congestion is sensed in the network, and linearly increases traffic (additive increase) in the absence of detected congestion. Netscope enhances the state-of-the-art AIMD mechanism 6 Latency (D src,dst )  Figure 3: Breakdown of total message delivery time by making the multiplicative decrease step in the AIMD control loop dependent on the application's delay sensitivity, to minimize the penalty (i.e., traffic throttling) on applications that are more sensitive to congestion.

IV. APPLICATION BEHAVIOR INFERENCE ENGINE
This section describes the application behavior inference engine and its components, which include application-specific and system-specific models.

A. Application-specific Models
Here we present application-specific models that we used to derive the application delay sensitivity, which encapsulates the relationship between network congestion and application runtime as given in definition 1. To make our methodology of estimating delay sensitivity extensible to a large class of applications, we developed a model that treats an application as a black box and relies solely on the network topology, application node placement, and network telemetry data to infer the delay sensitivity.
Our key assumption is that delay sensitivity does not vary across the application's lifespan due to their iterative communication patterns (discussed in §II). As delay sensitivity is constant, the derivative of application runtime with expected message delivery time (M a ) is constant, and their interdependence can be modeled by a linear regressor given by (2).
T a = c a M a + k a (2) Thus, our quest for estimating delay sensitivity reduces to estimating the slope between expected message delivery times and application runtime. Application runtime can be trivially obtained from scheduler logs. However, estimating expected message delivery times is more involved, and we devote the rest of this section to describing our approach.
Abstracting Message Delivery Time. HPC applications typically rely on sending of messages between two endpoints using a communication library such as the Message Passing Interface. The various delays involved in the process of sending/receiving messages are shown in Fig. 3 (inspired by the logP model [31]). A message consists of several packets that are transmitted sequentially across the network from the source to the destination. The total message delivery time for a message (M src,dst (t)) that is initiated at the source at time t can be broadly categorized into the following components: (a) End-host Overheads (o src , o dst ): Housekeeping tasks need to be performed at the source (before the packet is sent out) and at the destination (after the packet has been received). These tasks include packet header processing, interfacelevel processing, and OS scheduling of the packet onto the network interface card (NIC). The total time associated with these tasks are represented by o src and o dst for the source and destination, respectively. (b) Latency (D): The time needed for the first quanta of data to reach the destination is the latency (D). (c) Bandwidth Delay (g): The time required to push all the remaining packets onto the network link is the bandwidth delay. Given the homogeneity of the network, the bandwidth delays at the source and destination are typically equal. Bandwidth delay is given by the ratio of message size to NIC bandwidth ( msg size bandwidth ). Therefore, the total message delivery time for a message from source src to destination dst initiated at time t is: (3) Variations in end-host overheads can be considered noise when the delay introduced by network congestion is the predominant factor in runtime variation. Unlike the end-host overheads, bandwidth delay and latency can vary significantly depending on the application and network congestion conditions, which we can estimate through network counters. Bandwidth delay can be estimated from the application's message size and injection bandwidth at the network interface card. However, network latency is not directly observable in the system. Therefore, we infer the network latency metric through performance counters, such as link stall times 7 . Note that D is the one-way latency, which differs from the round-trip time that can be computed directly from the network performance counters. Also, note that one-way latency cannot be computed simply by halving roundtrip time measurements because the return path congestion may be significantly different from the forward path congestion. If we did not consider reverse path congestion, our model would yield poor estimation of delay sensitivity. We will use the network latency model to compute D, as we discuss in §IV-B.
Moreover, because of performance and cost constraints, there are challenges associated with collecting network performance counters for each message individually. In particular, on our system, there is a significant difference between the measurement granularity (1 second) and the message delivery times (on the order of microseconds). Hence, we apply (3) for all messages sent in a measurement interval.
The expected message delivery time is dependent on node placement and on variation of congestion over space (spatial characteristics) and time (temporal variation).
Accounting for Spatial Characteristics. We estimate expected time to deliver a message between any two application nodes by modeling spatial characteristics (i.e., application-tonode mapping and congestion diversity over network links).
As we have no prior information regarding application communication patterns, we assume that any two nodes are equally likely to communicate. However, when prior knowledge is available, we can deduce which node pairs are more likely to communicate, and use that to improve our estimations. In practice, we find that without prior knowledge, we can robustly estimate application runtime with high correlation, as shown in §VI. Under the no-prior-knowledge assumption, the expected message delivery time for any node-to-node communication at time t (denoted by M s (t)) for an application with N nodes is given by: Accounting for Temporal Variation. We model temporal variation (i.e. congestion variation over time) by estimating the expected message delivery time across measurement intervals. The expected message delivery time across the application's lifespan (M a (t)) is estimated using the expected spatial message delivery time (M s (t)), as given by (5): where T a is the total application runtime.

B. System-specific Model
In this section, we present a model for estimating the network latency (D), i.e., the time required to deliver the first quanta of data after the start of message transmission. We first present the high-level system abstraction, followed by a model for estimating the latency for a single link and its extension to a set of paths. System Abstraction. In our system abstraction, we represent each hop between the source and destination nodes as a link. In a high-speed interconnect, examples of such links are connections between the processor, NIC, and network tiles/ports on intermediary switches. The interconnect is lossless and uses a credit-based hop-by-hop flow control mechanism [32]. To transmit data, the sender requires credits from the receiver, which are calculated based on queue occupancy. When there are insufficient credits available to transfer the waiting data, the data transmission stalls, and the data will be buffered in the link buffer until sufficient credits become available. The process of waiting in the queue can cause head-of-line blocking, which can lead to cascading backpressure in adjacent links and formation of congestion trees across the interconnect [3].
The time quanta each link waits to send data is referred to as a stall. Network counters record the total time each link is stalled (T s ). Using these link stall times, we compute the derived metric for each link, Percent Time Stalled (P T s ).
where T s is the total stall duration during the measurement interval and T m is the measurement interval.
Single-Link Latency Estimation. To estimate the latency for a single link, we break it down into the following components: (a) Processing delay is the time the switch needs to process packet headers and move the packet along the queue before further routing. (b) Transmission delay is the time needed to push all of the packet's bits onto the wire. (c) Queuing delay is the time that the data to be transmitted spends in the link buffers awaiting transmission. (d) Propagation delay is the time needed for data to transit the wire, which depends on the number of hops needed to route the message from 'src' to 'dst' and wire length.
Both the processing and the propagation delays are dependent on the transmission media latency and the packet header processing overhead. When modeling a single link, we assume that these delays are constant. Queuing delays dominate over transmission delays because we consider only a small quanta of data and the time required to transmit the quanta into the link is negligible compared to queuing delays.
For the sake of modeling, we represent whether the link buffers are serviced or freed by a random probabilistic process. At each time unit, the link state can be either stalled or nonstalled. During the non-stalled state, the buffer is emptied and the data are allowed to be transmitted. Thus, the link state at each time unit can be represented by a Bernoulli random variable with parameter p that takes value 1 if the link is in a stalled state and 0 otherwise. To infer the total waiting time, we need to compute the expected number of consecutive time units for which the packet waits in the link buffer. An appropriate discrete distribution to model the above-mentioned constraints is a Geometric distribution.
The expected waiting time is given by Equation (8).
To estimate the parameter p, we use the maximum likelihood estimation (MLE) [33]. The log-likelihood of measuring T s units of stall in the measurement interval T m is given by Equation (9).
The optimal parameter value can be obtained by setting the gradient of log(L) to zero. Then the value of p that maximizes the log-likelihood of observing the given stalls is given by Equation (10).
The expected queuing delay for the link (Q l ) is given by: Extension to Multiple Paths. To estimate the network latency using link-level queuing delays (Q l ), we use a linear regression model (refer to (12). Let the possible paths (i.e., a set of links) between two nodes n 1 and n 2 be represented by the sets S * . Each set S i that belongs to S * is composed of a set of links that make up a unique path between the two nodes. Note that this path comprises all the intermediary links that include connections between processors, NICs, and network tiles on switches.
where S * is the set of all links on all possible paths as constrained by the routing algorithm [30] between 2 nodes n 1 and n 2 . The constants k i are estimated using training.
V. MITIGATION Netscope's online congestion mitigation consists of the following major components: (a) The congestion signal, which is an estimation of the congestion experienced by packets. It is calculated from network performance counters sampled at the NIC. (b) The delay injection module, which provides a mechanism for controlling congestion at the source by introducing probabilistic delays between consecutive message send requests. (c) Rate control, which uses the delay injection module to dynamically change the traffic injection rate based upon the congestion signal.
Congestion Signal. We choose to use stalls experienced when injecting traffic from the NIC into the high-speed network (HSN) as the signal for congestion. While network latency (described in §IV-B) would be an ideal congestion signal (as it can estimate the impact of congestion on application runtime), such a metric is difficult to calculate during online mitigation as we have access to network performance counters on local switches only. In lieu of network latency, we use stalls experienced by the application traffic injected from the NIC to the HSN (referred to as nic2hsn) as it captures both local congestion (i.e., backpressure applied by the NIC) and outside congestion (i.e., backpressure imposed by the network). We collected the nic2hsn counters by using the PAPI [29] interface with the sampling frequency set at one second.
Delay Injection Module. As no direct traffic rate-throttling method is available on the compute nodes, we introduce delays between consecutive message requests sent out by every process. The delay is the time delta between traffic injection at the line rate and traffic injection at the desired reduced rate: where ∆T inj is the delay injected between messages, R line is the line rate at which messages are sent out, R req is the required reduced rate, and B nic is the NIC bandwidth. It is possible that ∆T inj may be on the order of nanoseconds; however, Linux only supports process sleep with microsecond resolution. To overcome this challenge, we use probabilistic delays. For example, if the delay that must be introduced is 0.3µs, we introduce a 1µs delay with a probability of 0.3. The probability is simulated using a uniform random number generator from the Linux standard library. We achieve the following using an MPI wrapper as shown in Fig. 2.
Rate Control. While there are a plethora of rate-control algorithms based on Additive Increase Multiplicative Decrease (AIMD) rate control [12], we decided to adapt the rate-control algorithm first proposed in DCTCP [4] for general-purpose datacenters and later used in DCQCN [17] for RDMA over converged Ethernet (RoCE) networks. We selected the DCQCN rate control algorithm because it has been widely adopted in production networks because of its inherent simplicity and consequent ease of deployment. The sender maintains an estimate of stalled traffic called α, which is updated every measurement window using the following update: where g ∈ (0, 1) is the weight given to past samples as opposed to past measurements. Consequently, the traffic rate injected by application a at time t (i.e., R a ) is updated as follows: where c a ≥ 0 is the delay sensitivity of the application a.
Thus, α and c a together control the sending rate. A higher value of α (high congestion) throttles the traffic rate more aggressively, while a higher value of c a (more sensitive to network congestion) prevents the traffic rate from being reduced more than necessary. Note that c a is a term introduced by us in the multiplicative decrease step. We leverage and extend the existing fairness and convergence properties of the AIMD rate controller to ensure that the modified AIMD controller also converges and is fair. We omit the proofs here because of space constraints.
VI. EVALUATION In this section, we evaluate the effectiveness of our application behavior inference engine and demonstrate the performance gain obtained using our application-aware congestion mitigation. We performed the evaluation across four Cray Aries [13] HPC systems of varying scales: switches and 6,720 network links. (d) Cori is a production-scale supercomputer located at NERSC comprising 34 electrical groups and 130,560 network links. We used these systems to evaluate our models in testbed and production settings. For example, Voltrino and Mutrino are testbed systems that we used to conduct multiple application runs and rigorously validate our models. We used to Cori to validate our methodology in production settings. Neutrino is a customized HPE/Cray system with an over-provisioned network (i.e., it has higher inter-group connectivity than a typical Aries system). Neutrino is not available to users; however, HPE/Cray was able to provide us with benchmark traces designed to understand network congestion.
Our application set consists of both representative benchmarks (a-c) and real applications (d-g), as described below: (a) DSA is a synthetic delay sensitive application that implements a sorting algorithm. (b) BIA is a synthetic bandwidth intensive application that uses the Cray SHMEM library to stress the network. (c) GPCNeT is a congestion-creation benchmark suite that captures four congestion patterns (all-to-all, RMA 9 incast, point-to-point incast, and RMA broadcast) commonly found in HPC workloads [21]. (d) MILC is used to study quantum chromodynamics, the theory of strong interactions of subatomic physics. It performs four-dimensional lattice communication, and its performance limiters include network latency [9]. (e) LAMMPS is a molecular dynamics program focused on materials modeling [16]. Performance limiters include compute, memory bandwidth, network bandwidth, and network latency [18]. (f) Quantum Espresso is an integrated application suite for electronic-structure calculations and materials modeling [27]. Performance limiters include compute and network latency. [14] 0% 20% 40% 60% 80% RTT Estimation Error(%) (c) Delay sensitivity convergence with increase in synthetically congested application runs Figure 4: Evaluating convergence and accuracy of application behavior inference engine (g) AMG is a parallel algebraic multigrid solver for linear systems [15]. Performance limiters include memory-access and network latency [18]. Applications (a-b) were provided to us by HPE/Cray to help us understand network congestion mitigation capabilities. Application c is an open-source congestion benchmark suite. We chose applications (d-g) because (i) they are among the top 10 most commonly used applications on NERSC production systems 10 [10], and (ii) previous work has shown that these applications are very susceptible to congestion-induced performance degradation [8].

A. Evaluating the Application Behavior Inference Engine
Training the Network Latency Model. The network latency model uses round-trip time (RTT) measurements recorded using a pingpong application to generate training labels, and network performance counters and node endpoints as inputs. We use RTT measurements because it is challenging to estimate one-way network latency directly in the absence of perfect time synchronization (which is infeasible in practice). We executed the pingpong application multiple times (approximately forty) on two randomly chosen nodes in the presence of congestion created using GPCNeT. During the pingpong application training runs, the percent time stalled measurements (obtained using network counters) across all links in the system ranged between 0% and 99%. Each pingpong run involved 10,000 consecutive message exchanges (without any compute), and the average RTT for each message exchange was recorded. A large number of messages were sent to compensate for the difference in network latency (2-100 µs) and granularity of measurements (1 s). To train the model, we sum the forward and reverse path latency that are calculated using Equation (12) to estimate the round-trip time. Thus, we can calculate the constants (k i ) using the least sum of squares fit with training data (i.e. RTT measurements obtained from the pingpong application).
Accuracy of Latency Model. We evaluate the accuracy of the latency model, described in §IV-B, which is used to estimate network latency by using performance counters. The model was trained and validated on Voltrino, Mutrino, and Cori. Fig. 4a shows the percentage error in estimating RTT for the three systems. For each of the three systems, 75% of the RTT measurements were estimated within an error bound of 30%. Moreover, we observed statistically high Pearson correlation coefficients [34] of 0.68, 0.71, and 0.67 between the measured 10 Table III: Output generated by the application behavior inference engine for different applications and the estimated round-trip time for Voltrino, Mutrino, and Cori, respectively. The latency model remains accurate under large variation in congestion and system scale. Accuracy of Estimating Delay Sensitivity. We have designed a comprehensive test suite for validating the delay sensitivity (c a ) estimator (introduced in Section IV-A) that uses the configurations described in Table II. For smaller, singleuser testbed systems (i.e., Mutrino and Neutrino), we use synthetically generated congestion to create runtime variation. However, on larger, multi-user systems like Cori, we find sufficient natural runtime variation due to network contention between different applications.
To test whether the delay sensitivity estimator is sensitive to application node placement, we randomly varied the applicationto-node mapping for the above-mentioned applications on the smaller-scale systems. For Cori, the node placement was determined by the Slurm scheduling policy [35], and we used a one-year production dataset, as it provided sufficient diversity in both placement and system congestion. Moreover, our test suite consists of both highly delay sensitive (e.g., Quantum Espresso) and bandwidth intensive (e.g., BIA) applications.
Table III provides the delay sensitivity values for our test suite. We found that message delivery times have a strong correlation between 0.7 and 0.9 for all applications in the test suite. The estimated delay sensitivity could vary between zero (implying negligible increase in application runtime due to congestion; e.g., BIA) to a very high value (implying significant increase in application runtime due to congestion; e.g., MILC). The delay sensitivity is calculated with respect to the pingpong application, i.e., the pingpong application has a delay sensitivity equal to one. The proposed delay sensitivity metric is robust as it captures the relationship between application size and congestion. In our experiments, we observed that increasing the application size increased the delay sensitivity, thereby confirming our intuition that applications with larger size have larger number of communication paths, and thus link delays are more likely to stall the entire iteration. For example, delay sensitivity increases by a factor of 6.7× for MILC when the number of nodes increases from 4 to 384. In addition, as expected, we observed that applications that are only latency-bound have higher delay sensitivity than applications that have multiple performance limiters, such as compute and memory. For example, Quantum Espresso, which is solely latency-bound, has a higher delay sensitivity than LAMMPS, which is also limited by memory and compute. We find that the delay sensitivity estimator is accurate for a wide range of applications, scales, congestion and placements.
Training Requirements for Delay Sensitivity Estimation. We quantify the cost of training our models to accurately estimate the delay sensitivity (ĉ a )in terms of the number of application runs. Fig. 4b shows the error in estimating the delay sensitivity with increasing number of production training runs for MILC and AMG. The error in delay sensitivity at the i th run is given by c i a −ĉâ ca × 100. For both applications, we observe that the delay sensitivity fluctuates significantly at the beginning of the training, but stabilizes to within 10% of the final estimated delay sensitivity (ĉ a ) after ∼25 runs. However, we can further reduce the training time significantly by exposing the application to both extremes of congestion (i.e., no congestion and high congestion), thus providing early benefits to the user. As we show in Fig. 4c, the training time is reduced by 5× (from 25 runs to 5 runs) in the case of MILC running under synthetic congestion. We observed similar trends for Quantum Espresso (labeled "QE" in the figure), LAMMPS (labeled "LS"), DSA (labeled "DSA"), and BIA (labeled "BIA"). Our model converges fast, especially under synthetic congestion.

B. Evaluating Congestion Mitigation
We compared Netscope's application-aware congestion mitigation mechanism (described in §V) to DCQCN rate control (deployed in RDMA networks) and the static rate control mechanism in Cray. In these experiments, we considered two workloads: workload W1 that consists of MILC and GPCNeT, and workload W2 that consists of two GPCNeT instances. These workloads were run on Voltrino. W1 and W2 were chosen to represent two extreme ends, i.e., W1 tests a combination of a delay sensitive application and a bandwidth intensive application, and W2 tests a combination of two bandwidth intensive applications. We do not consider a workload consisting of two delay sensitive applications, as they would be unable to create sufficient congestion. Moreover, we only consider two applications at a time because mitigation is performed individually for each application, and is dependent only on network congestion (created by the workload) and not on the number of applications. Each application was randomly placed in the system to generate various levels of  congestion across the network links. Overall, we executed 334 runs to compare each workload with every congestion mitigation mechanism separately. Reduced Runtime Variability. Fig. 5a shows the CDF of the percentage runtime increase for two applications (MILC and GPCNeT) across all experiments. We found that Netscope outperforms both Cray and DCQCN in reducing the overall runtime variability. In particular, at the 99th percentile, Netscope is 11.2× better than DCQCN and 14.9× better than Cray in reducing the percentage runtime increase. Netscope is significantly better than DCQCN and Cray in the following respects. (i) Compared to DCQCN, Netscope penalizes the delay sensitive application less aggressively than GPCNeT as the delay sensitive application has a smaller multiplicative decrease factor (described in §V). (ii) Compared to Cray static rate control, Netscope prevents extreme congestion cases because it dynamically adjusts traffic rates based on measured congestion.
Increased System Throughput. We measured overall system throughput in terms of the node seconds required to complete the workload. Fig. 5b shows the CDF of the percentage increase in total node seconds required to run the workloads using the three congestion mitigation mechanisms. In particular, at the 99th percentile, Netscope is 2.8× better than DCQCN and 1.9× better than Cray in terms of system throughput. Moreover, we found that DCQCN's system throughput is worse than that of Cray static rate control. The lower system throughput for DCQCN also explains why AIMD-based algorithms, which are widely used in both wide-area networks and cloud datacenters, have not been widely used in HPC systems.
Impact on Traffic and Congestion. Table IV shows the network latency (i.e., time required to deliver a flit) and traffic for the three rate-control algorithms across all experiments. We found that DCQCN has a lower network latency than either Cray or Netscope (by 2.9×) at the 50th percentile. Thus, DCQCN is significantly better at reducing network congestion than either Netscope or Cray. However, solely attempting to lower congestion (i.e., minimizing queuing at link buffers) may adversely affect delay sensitive applications, leading to worse system throughput as discussed above. Unsurprisingly, static rate control, which does not adapt to varying levels of congestion, performs worse at the 90th percentile, as seen for the Cray rate-control mechanism. Overall, we found that Netscope outperforms both DCQCN and the Cray static rate control mechanism at reducing application runtime variation and improving system throughout.
Impact of Training Errors on Congestion Mitigation. Here we evaluate the impact of inaccurately estimating delay sensitivity on congestion mitigation efficiency. Such inaccurate estimations occur because of insufficient training. A negative error in estimated delay sensitivity, i.e., causing the estimated value to be lower than the true value, may increase application runtime. The reason is that a delay sensitive application would

Runtime (sec)
(c) Impact of error in estimating delay sensitivity on MILC runtime when running workload W1 Figure 5: Comparing system throughput of different congestion control mechanisms have a more aggressive multiplicative decrease rate control step, leading to more severe penalization. Further, we cannot afford to have a positive error in estimating delay sensitivity, as it is preferable to have a stronger multiplicative decrease step to mitigate congestion quickly. Fig. 5c shows the runtime for MILC (in workload W1) with error introduced in the delay sensitivity estimation. We found that the runtime is close to minimal when the estimation error is close to 0%. As the negative error increases, the MILC runtime worsens. In particular, at an error of -100% in estimating delay sensitivity, Netscope's performance is no better than DCQCN (which is the current state of the art). If the estimated delay sensitivity is lower than the actual delay sensitivity, Netscope's performance is worse. However, at the same time, we want the estimated delay sensitivity to be as low as possible, to ensure effective congestion control. Testing Netscope in Production Systems. We tested Netscope on Cori with a scaled-up workload W1, i.e., MILC (baseline runtime 149 s) and GPCNeT (baseline runtime 75 s) were scaled up to 108 and 100 nodes, respectively. This modified workload occupied ∼75% of an electrical group to minimize the effect of congestion due to other applications, thereby allowing us to conduct controlled experiments. We compared the performance of Netscope with that of the Cray and DCQCN rate-control mechanisms. For all three rate-control mechanisms, GPCNeT had minimal variation of a few seconds. With Netscope, the MILC runtime was restricted to 153 s (1.02× worse). On the other hand, DCQCN resulted in a runtime increase to 180 s (1.2× worse), and Cray static rate control resulted in a runtime increase to 200 s (1.3× worse). Note that the production environment introduces additional constraints such as: (i) Slurm uses a best-fit algorithm based on number of consecutive nodes [35]. In our case, the allocation policy enforces several communication paths to be within the same switch; thereby, limiting the overall congestion experienced by the applications 11 ; and (ii) the unavailability of large number of node-hours to execute system experiments and characterize tail behavior. For example, we only executed six experiments in total to demonstrate the efficacy of Netscope in large-scale production systems. Despite the constraints introduced in production, we find that performance benefits of Netscope continue to hold with larger application sizes 12 .
11 In real-world production runs, jobs span several groups and switches resulting in significant runtime variation and effects of congestion [8]. 12 We ran MILC and GPCNeT on 4 nodes and 18 nodes on Voltrino. In contrast, we scaled MILC and GPCNeT by 27× and 5.6× scaling on Cori.
Overhead of Netscope. Although Netscope increases the congestion-free runtime for the tested applications by up to 2%, the benefits of Netscope are realized in the presence of congestion. Without Netscope, congestion could cause runtime variation as high as 200% (see Fig. 5a). Netscope's overhead is negligible in terms of memory (∼0.8KB) and computation.

VII. RELATED WORK
Modeling impact of congestion on HPC applications. Several researchers have studied the effects of network congestion on the performance of HPC applications. [8] has proposed blackbox machine learning models to estimate application runtime from network counters. [7] has proposed a congestion region-based approach to characterize congestion in torus networks. However, these approaches do not provide application characteristics that can be consumed by the CC algorithm. Rate Control for Congestion Mitigation. Traditionally, Infiniband congestion mitigation [36] has been the defacto standard for CC in credit-based flow control networks. In addition, researchers have proposed additional schemes [1]- [3] to mitigate congestion for HPC systems. Moreover, there are a large number of application-oblivious(e.g., [4], [5], [17]) and application-aware (e.g., [37]- [39]) CC mechanisms proposed for cloud datacenters. However, the application-oblivious CC mechanisms end up incorrectly penalizing applications whereas the application-aware CC mechanisms require complicated parameter tuning that is difficult to achieve without an automated framework. Cray Slingshot [40] proposes to alleviate congestion by selectively targeting the true sources of congestion.
In-network Mechanisms. The proposed delay sensitivity metric can be used to assign priority classes to provide qualityof-service. For example, we can use the delay sensitivity metric to assign priority classes in Cray Slingshot [40]. In addition, there has been a large body of work on using different packet scheduling policies [41]- [43] at the switches to minimize impact of congestion on applications that do not contribute to congestion. However, these policies have yet to be deployed on a real switch hardware.

VIII. CONCLUSION AND FUTURE WORK
We propose Netscope, an ML-driven framework that achieves dynamic congestion mitigation based on application characteristics and network telemetry. We comprehensively evaluate Netscope on multiple systems and applications. Netscope is shown to reduce application tail runtime variability on a Cray Aries testbed system by 14.9× while increasing median system utility by 12%.
There are several open questions and research challenges regarding Netscope that we plan to address in the future: (i) using a network simulator, such as traceR [44], to train the ML models instead of using real application runs to reduce the training costs further; (ii) understanding the impact of variation in application input deck on delay sensitivity; and (iii) using delay sensitivity to drive in-network mechanisms such as QoS classes and programmable packet scheduling.