<?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'>Accelerating multi-tier storage cache simulations using knee detection</title></titleStmt>
			<publicationStmt>
				<publisher>Springer</publisher>
				<date>05/01/2024</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10645231</idno>
					<idno type="doi"></idno>
					<title level='j'>Performance Evaluation</title>
<idno>1872-745X</idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Tyler Estro</author><author>Mario Antunes</author><author>Pranav Bhandari</author><author>Al Et</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Storage cache hierarchies include diverse topologies, assorted parameters and policies, and devices with varied performance characteristics. Simulation enables efficient exploration of their configuration space while avoiding expensive physical experiments. Miss Ratio Curves (MRCs) efficiently characterize the performance of a cache over a range of cache sizes, revealing "key points" for cache simulation, such as knees in the curve that immediately follow sharp cliffs. Unfortunately, there are no automated techniques for efficiently finding key points in MRCs, and the cross-application of existing knee-detection algorithms yields inaccurate results.We present a multi-stage framework that identifies key points in any MRC, for both stackbased (e.g., LRU) and more sophisticated eviction algorithms (e.g., ARC). Our approach quickly locates candidates using efficient hash-based sampling, curve simplification, knee detection, and novel post-processing filters. We introduce Z-Method, a new multi-knee detection algorithm that employs statistical outlier detection to choose promising points robustly and efficiently.We evaluated our framework against seven other knee-detection algorithms, identifying key points in multi-tier MRCs with both ARC and LRU policies for 106 diverse real-world workloads. Compared to naïve approaches, our framework reduced the total number of points needed to accurately identify the best two-tier cache hierarchies by an average factor of approximately 5.5× for ARC and 7.7× for LRU.We also show how our framework can be used to seed the initial population for evolutionary algorithms. We ran 32,616 experiments requiring over three million cache simulations, on 151 samples, from three datasets, using a diverse set of population initialization techniques, evolutionary algorithms, knee-detection algorithms, cache replacement algorithms, and stopping criteria. Our results showed an overall acceleration rate of 34% across all configurations.]]></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 n="1.">Introduction</head><p>A cache's miss ratio is one of the most important predictors of its performance. A miss-ratio curve (MRC) for a given cache and replacement algorithm plots the cumulative miss ratio for all accesses as a function of the cache size, providing a powerful tool for analyzing the performance of live systems and dynamically adjusting cache configurations as workload conditions change <ref type="bibr">[1,</ref><ref type="bibr">2]</ref>. MRCs can also inform offline evaluations such as comparing caching algorithms or analyzing monetary cost vs. storage-system performance <ref type="bibr">[3]</ref>.</p><p>There are many efficient techniques for generating MRCs <ref type="bibr">[1,</ref><ref type="bibr">[4]</ref><ref type="bibr">[5]</ref><ref type="bibr">[6]</ref><ref type="bibr">[7]</ref><ref type="bibr">[8]</ref><ref type="bibr">[9]</ref><ref type="bibr">[10]</ref>. MRC-reported miss ratios are good indicators of expected performance (e.g., throughput), but real system performance can vary due to additional factors including device characteristics, write policies, and admission policies <ref type="bibr">[3]</ref>. Alas, repeatedly reconfiguring and testing a real caching system, with all possible cache sizes, is prohibitively expensive due to the slowness of storage I/O.</p><p>Since experimenting with physical devices is costly and time-consuming, simulation offers a more practical way to explore this large search space and evaluate trade-offs such as latency vs. cost. A common first step is to sample a workload: approximation algorithms enable accurate simulation of cache behavior using only a fraction of the original trace data. Small sampled traces can then be used to construct an MRC accurately, enabling quick evaluation of cache performance <ref type="bibr">[1,</ref><ref type="bibr">7]</ref>. Many storage-cache simulators have been developed that replay traces while attempting to faithfully reproduce real system behavior <ref type="bibr">[11]</ref><ref type="bibr">[12]</ref><ref type="bibr">[13]</ref>. However, even simulations can be too expensive to allow exploring a large number of configurations or optimizing live systems in real time. For example, consider a cache with a maximum size of 100GB. Simulating every 1GB size step would require 100 experiments. In a multi-tier setup, the number of simulations grows with the number of tiers; a two-tier configuration would require 100 2 experiments, three tiers would need 100 3 , and so on. Thus, it is essential to explore this vast configuration space efficiently.</p><p>Creating an MRC requires a sequence of cache references. In a multi-tier cache, references to level n + 1 come from misses in-and write evictions and flushes from-level n; thus the MRC for n + 1 directly depends on the cache size chosen for level n. A na&#239;ve exploration of multi-tier configurations would require a separate simulation for each point in level n's MRC to identify misses that become references at level n + 1, and hence to compute the level n + 1 MRC. Since an MRC may contain hundreds of points (one for each potential cache size), this approach quickly becomes intractable. Thus, a crucial second step for evaluating multi-tier caches is to limit the number of simulations by intelligently selecting the cache sizes to evaluate at each level.</p><p>Intuitively, the most promising candidates are points where a little extra cache space produces a relatively large drop in the miss ratio; such points are often visible as "knees" in MRCs-e.g., points A, C, and D in Figure <ref type="figure">1</ref>. (Note that although B has sharp curvature, it is not of interest since C provides a much lower miss rate.) Given enough computational resources, we may be interested in also selecting some points in the large gradually sloping regions that cover a significant range of cache sizes. We refer to both types of points as key points from here on.</p><p>In this article we describe a multi-stage framework designed to pick an appropriate yet small number of key points in MRCs: <ref type="bibr">(1)</ref> We first approximate the MRC accurately using a hash-based sampling technique <ref type="bibr">[1,</ref><ref type="bibr">7]</ref>; (2) Next, we use the Ramer-Douglas-Peucker (RDP) line simplification algorithm <ref type="bibr">[14]</ref> to reduce noise by eliminating minor variations in the curve; <ref type="bibr">(3)</ref> We then run a multi-knee detection algorithm on the remaining points to find cache sizes that provide the greatest miss-ratio improvement for the lowest cost. Our framework currently implements eight different knee-detection algorithms, including our novel Z-Method and modified, multi- knee versions of five widely used single-knee detection algorithms <ref type="bibr">[15]</ref><ref type="bibr">[16]</ref><ref type="bibr">[17]</ref><ref type="bibr">[18]</ref>; and (4) Finally, in post-processing we remove less interesting points, add points in gradually-sloped regions (if desired), and then select the final points based on a ranking that uses hierarchical clustering and relevance metrics. This article is an extension of our previous work <ref type="bibr">[19]</ref>: we additionally provide a more indepth analysis of our Z-Method algorithm and we demonstrate how our framework can accelerate the optimization of multi-tier caching systems using evolutionary algorithms. This collective work makes several contributions:</p><p>1. We establish the novel methodology of using multi-knee detection to efficiently identify optimal multi-tier cache configurations;</p><p>2. We present a framework that combines several techniques to find a minimal number of key points in MRCs for both stack and non-stack caching algorithms;</p><p>3. We introduce Z-Method, a new multi-knee detection algorithm that uses statistical outlier detection;</p><p>4. We demonstrate that, compared to na&#239;ve approaches, our framework significantly reduces the number of 2-tier cache evaluations needed to identify good configurations by a factor of 5.5&#215; for ARC and 7.7&#215; for LRU;</p><p>5. We evaluate our framework for the additional application of seeding the initial population of evolutionary algorithms. Our results show an overall acceleration rate of 34% across a highly diverse set of configurations and datasets; and 6. We release the code library containing all techniques used in this work <ref type="bibr">[19]</ref>.</p><p>The next section provides some background on MRCs, knee-detection algorithms, and MRC cliff removal techniques. Section 3 presents the point-selection techniques used in our framework, leading to the design of the Z-Method algorithm in Section 4. We evaluate all of our techniques ability to find key points in MRCs in Section 5. We then present an additional evaluation of how our framework can be used to optimize multi-tier caching systems using evolutionary algorithms in Section 6. Finally, we summarize our conclusions and highlights in Section 7. 3</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Background</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1.">Miss Ratio Curves (MRCs)</head><p>A key feature of some MRCs is their monotonicity. Cache replacement algorithms such as LRU are stack-based, which means they satisfy the cache-inclusion property: the content of a cache of size n is always a subset of a cache of size n + 1. Ultimately, this property ensures that the miss ratio will never degrade as we increase the size of the cache, producing a monotonically decreasing curve. However, more sophisticated algorithms such as ARC <ref type="bibr">[20]</ref> are not stackbased and thus the inclusion property does not hold, causing them to produce MRCs that may contain both convex and concave regions <ref type="bibr">[1]</ref>. Thus, non-stack-based MRCs need not be strictly decreasing.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.">Knee-Detection Algorithms</head><p>Many heuristic algorithms have been developed that find a single knee in a curve, although the precise definition of a "knee" varies. One can define a knee point as the point with the maximum curvature in a function. For continuous functions, curvature <ref type="bibr">[21]</ref> is mathematically defined as follows:</p><p>However, knee-detection algorithms are applied to discrete sets of points, instead of a welldefined continuous function. As such, there are several methods to measure the curvature of the discrete sequence. Menger curvature <ref type="bibr">[16,</ref><ref type="bibr">18]</ref> defines the curvature for a sequence of three points as the curvature of the circle circumscribed by those points. This method relies only on a local criterion, using only three points to estimate the knee point without considering any others. As such, noisy data can lead to poor accuracy when estimating the knee point. We use this method as a baseline reference to compare with other methods. The L-method <ref type="bibr">[17]</ref> fits two straight lines from the head of a curve to a candidate point, and from the candidate point to the curve's tail. The candidate that minimizes the Root Mean Squared Error (RMSE) between the straight lines and the points of the curve is returned as the knee point; this represents the sharpest angle in the curve.</p><p>Similar to the L-method, Dynamic First Derivative Thresholding (DFDT) <ref type="bibr">[15,</ref><ref type="bibr">22]</ref> tries to identify the point where the function has a sharp angle. Instead of fitting two straight lines, this method relies on the first derivative of the curve. After computing that derivative, a thresholding algorithm is used to identify the value that separates the derivative values as "high" or "low." The knee is then the point with a derivative value that is closest to the previously computed threshold.</p><p>Kneedle <ref type="bibr">[16]</ref> uses the point on the curve that is furthest away from a line defined by the head and tail points of the curve. Both axes of the original curve are normalized to [0, 1] to easily find the point with maximum curvature. Kneedle was designed for single or multi-knee detection in a streaming scenario where new data is arriving continuously. The authors used this technique to detect relevant points for network congestion control and latency.</p><p>There are several algorithms that can find multiple knee points in a curve, but they have limitations that make them unsuitable for MRCs. The Kneedle algorithm's primary use case is anomaly detection, where it serves as an initial filter to reduce the number of candidates needing further analysis. As such, for Kneedle, recall is more important than precision: it aggressively captures all anomalies, producing many false positives. In some cases it is possible to reduce the number of false positives, but doing so requires extensive tuning of its sensitivity parameter.</p><p>A few multi-knee detection algorithms have been developed for use in multi-objective optimization problems, where the notion of a knee guides the exploration of meaningful candidate solutions <ref type="bibr">[23]</ref>. However, these problems use a stricter definition of a knee that assumes a set of well-behaved, Pareto-optimal points. Several other knee-detection methods <ref type="bibr">[15,</ref><ref type="bibr">17,</ref><ref type="bibr">18,</ref><ref type="bibr">22,</ref><ref type="bibr">24]</ref> are only effective at finding a single knee in a small and relatively smooth set of points. In contrast, MRCs can consist of a relatively large number of points, can be noisy or non-monotonic, and commonly contain more than one significant knee. In this work, we had to develop techniques to overcome these limitations (see Section 3) by enabling these algorithms to find multiple knee points.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3.">Cliff Removal Techniques</head><p>An alternative to detecting knees in an MRC is to modify the underlying cache-replacement policy so that it does not have any cliffs, yielding a convex MRC. Talus <ref type="bibr">[25]</ref> removes cache performance cliffs by dividing the cache into two shadow partitions, each receiving a fraction of the input load. Varying the sizes and input loads of each partition emulates the behavior of smaller or larger caches. Given an MRC as input, Talus computes the partition sizes and their respective input fractions to ensure that their combined aggregate miss ratio lies on the convex hull of the original MRC. Originally proposed for processor caches, Talus inspired the SLIDE <ref type="bibr">[1]</ref> technique for removing performance cliffs from software caches that employ sophisticated non-LRU replacement policies. CliffHanger <ref type="bibr">[26]</ref> applied a similar idea to key-value web caches, but instead estimated the MRC gradient without explicitly constructing one.</p><p>The recent eMRC <ref type="bibr">[27]</ref> technique generalized Talus's cliff removal to multi-dimensional miss ratio functions, such as the three-dimensional miss-ratio surface for a two-tier cache. The eMRC convex-hull approximation technique leverages the absence of cliffs to efficiently generate the miss ratio function for a multi-tier cache. However, eMRC requires convexity, which limits its applicability to modeling multi-tier cache systems that employ cliff removal. As real-world multi-tier cache systems do not yet perform cliff removal, eMRC is unable to approximate their non-convex MRCs. In contrast, our approach does not require convexity to accelerate multi-tier cache evaluations, making it broadly applicable to production deployments of existing caches.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.4.">Evolutionary Algorithms: Population Initialization</head><p>The initial population of an evolutionary algorithm functions as the first guess at a set of good solutions to an optimization problem. The quality of this first set can significantly influence the quality of the final solution and the speed at which an algorithm converges <ref type="bibr">[28,</ref><ref type="bibr">29]</ref>. Studies have shown that some evolutionary algorithms, such as Genetic Algorithms, are more sensitive to the initial population, while other algorithms like Particle Swarm Optimization are less dependent on the initial population <ref type="bibr">[30]</ref>. This sensitivity has also been shown to be problem-dependent, such that an algorithm may be influenced by the initial population for certain functions, numbers of dimensions, or population sizes <ref type="bibr">[28]</ref>.</p><p>There are several categories of population-initialization techniques. Common stochastic variants, such as random initialization, are favored for their simplicity, generic nature, and applicability to a wide range of problems <ref type="bibr">[31]</ref>. They are also popular because they produce a relatively uniform distribution as the population size increases. But statistical methods such as Latin Hypercube sampling <ref type="bibr">[32]</ref> and quasi-random sequences (e.g., Halton sequence <ref type="bibr">[33]</ref>) have been shown to outperform random initialization for most problems <ref type="bibr">[34]</ref>.</p><p>There are also application-specific techniques aimed at specific, narrow problems. They often exploit domain knowledge or use a problem's characteristics with specific evolutionary algorithms. These methods have been applied to improve convergence speed in problems such as grammar-guided genetic programming <ref type="bibr">[35]</ref> and flexible job-shop scheduling <ref type="bibr">[36]</ref>. Initialization techniques in this class typically perform better than more generic variants, but they are usually limited to specific problems.</p><p>Lastly, there are domain-agnostic, general heuristics applicable to problems that meet some set of conditions. Examples include approaches developed to optimize any two-stage stochastic mixed-integer problem <ref type="bibr">[37]</ref>. Such techniques can be applied to any problem where some of the variables are constrained to integer values.</p><p>The techniques described in this article focus on a domain-agnostic, generic approach that can be applied to any problem where a curve that is correlated to the solution can be derived from features of the input data. We show how such techniques can be used on miss ratio curves to optimize a cache with evolutionary algorithms.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Point Selection Techniques</head><p>In this section, we introduce our framework for finding multiple key points in MRCs. We first designed a pre-processing stage to deal with the large volume of data (Section 3.1). Next, we made substantial modifications to each point-selection technique, enabling them to output a set of multiple knees instead of just one (Section 3.2). Finally, we added a post-processing stage (Section 3.3) that filters and ranks knees based on an appropriate definition.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1.">Pre-Processing</head><p>A curve can contain an arbitrary number of data points. The largest MRC that we evaluated contains 276K points even after sampling-based size reduction <ref type="bibr">[1]</ref>; the original MRC is 10,000&#215; larger. However, the knee-detection algorithms evaluated in this work were originally designed to work with small or partial data, such as for clustering optimizations. Our main idea is to reduce the number of points while preserving those that follow the shape of the curve; this greatly reduces the computational costs of subsequent steps while also improving knee-detection accuracy by minimizing irrelevant fine-grained variation.</p><p>The Ramer-Douglas-Peucker (RDP) algorithm modifies a curve by finding a similar one with fewer points <ref type="bibr">[14]</ref>. RDP fits a line between the curve's endpoints and then finds the point in between that is farthest from this line. If the distance between that point and the line is over a given threshold, the curve is split there and the algorithm is reapplied recursively on the two new segments. Once the distance is smaller than the threshold, all intermediate points are removed. The main drawback of RDP is the need to define a threshold, which can be understood as the maximum allowed reconstruction error. The choice of threshold is difficult because it depends on the curve's complexity.</p><p>We modified the original RDP algorithm to address this difficulty. Instead of defining a threshold for the maximum allowed perpendicular distance between a point and the fitted straight line, we use a relevance-based cost metric that computes the difference between the fitted straight line and the data points in the current segment.</p><p>We evaluated four different metrics that assess how far our linear reduction is from the original data: Root Mean Squared Log Error (RMSLE), Root Mean Squared Percentage Error (RMSPE), Relative Percent Difference (RPD), and symmetric mean absolute percentage error (SMAPE). Of these four, the best performance came from SMAPE: it found the smallest set of points that minimized the reconstruction error.  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.">Methods</head><p>Except for Kneedle, the algorithms we evaluate in this work (see Section 2.2) were not designed to detect multiple knees. Thus, we developed a recursive algorithm that can be used to adapt any single-knee detection technique to handle multiple knees. The basic idea is to use a single-knee technique to select the best knee in a segment. We then split the current segment at that knee, and for each new segment check whether it is sufficiently linear (computed using the SMAPE metric). If not, we repeat the process recursively. Apart from applying this recursive generalization, we do not alter the core knee-detection technique, using it as a black box. All of the methods we evaluated, even Kneedle, require our pre-and post-processing methods to work properly on MRCs.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3.">Post-Processing</head><p>Given the differences between single-and multi-knee detection and the large number of points produced by using our recursive strategy on some of the knee-detection algorithms, we developed three different filters to further reduce and select the most relevant knees.</p><p>The first filter, shown in Figure <ref type="figure">2a</ref>, removes useless knees. When dealing with non-monotonic curves, a knee-detection algorithm can incorrectly choose a knee that is above a previously detected one. We remove such knees since they are sub-optimal and do not add useful information.</p><p>The second filter, shown in Figure <ref type="figure">2b</ref>, removes cliff points located after a smooth, nearhorizontal area that precedes a sharp descent. These points are found using a corner-detection algorithm that computes the overlapping area of two rectangles. The first rectangle, shown in green, is drawn from the neighbor points P 0 and P 1 (assuming that RDP pre-processing was used, these are the previous and following points) that are adjacent to the knee candidate point C. The second rectangle, drawn in orange, has its corners placed at C and the lower left of the green rectangle. The filter computes the percentage overlap between these two rectangles, and a knee candidate is removed if the overlap exceeds a threshold.</p><p>The third and final filter, shown in Figure <ref type="figure">2c</ref>, uses a hierarchical clustering algorithm to group knees by their distance along the x-axis, using a percentage of the x range as a threshold. After grouping the knees into clusters, the knees within each cluster are ranked based on their relevance score, computed from two metrics: (i) the improvement given by each knee (i.e., how much it decreases on the y-axis from the highest knee in the cluster) and (ii) the smoothness of the improvement, computed using the coefficient of determination (R 2 ). Specifically, the relevance score S is given by Equation (2):</p><p>where K i is the i th knee, and K h is the knee with the highest value on the y-axis (in a single cluster). &#8407; L is a vector containing all the knees in the cluster up to and including the i th one:</p><p>The highest-ranked knee in each cluster is selected as its representative knee.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Z-Method</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1.">Design Concepts</head><p>Our design for Z-Method was inspired by the DFDT <ref type="bibr">[15]</ref> and DSDT <ref type="bibr">[22]</ref> knee-detection algorithms, which use first and second derivatives, respectively. In statistics, a z-score (also known as a standard score) is a transformation that normalizes a data value by quantifying how many standard deviations away it is from the mean; typically, a point whose z-score has an absolute value greater than three is considered an outlier <ref type="bibr">[38]</ref>. For the purpose of detecting knees, such outliers in the second derivative indicate a significant change in the y-axis. The foundation of our Z-Method technique is in detecting such outliers and intelligently selecting knees among them.</p><p>Although the second derivative is useful, we found that large and small knees often tend to cluster, causing several points in close proximity to be selected, rather than the single most optimal knee in the vicinity. To remedy this, we introduced two hyper-parameters, dx and dy, that specify the minimum x and y distances, respectively, between all selected points. These parameters limit the total number of knees selected and give users control over the algorithm. For example, users interested only in large knees can give relatively high values for dx and dy to minimize the number of points.</p><p>Z-Method was designed to function independently of the techniques described in Sections 3.1 and 3.3. As such, it works for curves that are non-monotonic, with both convex and concave regions (see Section 2.1).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.">Algorithm Description</head><p>As shown in Algorithm 1, Z-Method takes as input a discrete curve D consisting of an ordered list of (x, y) points, along with parameters dx, dy, and dz. The parameters dx and dy both influence the size and number of selected knees, while dz controls the maximum number of iterations in the main selection loop (lines 7-20).</p><p>We first convert dx and dy, specified as percentages, into absolute values &#8710;x and &#8710;y for the input curve (lines 1-2). This normalization ensures that these parameters function similarly for different curves. We then approximate a list of second derivatives of the curve, D &#8242;&#8242; , using second-order polynomial fitting <ref type="bibr">[39]</ref>; next we calculate the z-scores of all points in D &#8242;&#8242; as Z, both of which are found in linear time (lines 3-4). We initialize a list K to contain all selected knees, and set our starting value of zLimit to 3, since a z-score &#8805; 3 is a widely accepted value for outliers <ref type="bibr">[38]</ref> (lines 5-6).</p><p>We then enter the main selection loop (lines 7-20), which selects points and progressively decrements the zLimit value. First, we create a new list C that contains candidate points: points Algorithm 1: Z-Method Multi-Knee Detection Input: Data D with (x, y) points, dx, dy, dz Output: List of (x, y) points corresponding to knees if p is at least &#8710;y from all points in K then K.append(p) zLimit &#8592; zLimitdz in Z that have a z-score greater than the current zLimit and are at least a minimum &#8710;x and &#8710;y distance from all other already-selected points (lines 8-9). The complexity of this step is O(|C| &#215; |K|). All candidate points C are removed from Z so that we will not consider them again in future iterations (line 10). The termination clause is then checked (lines 11-13) to ensure that we have candidate points to operate on.</p><p>We next group the candidate points C into G, such that the adjacent points in each group are less than &#8710;x apart, based on the dx parameter constraint (line 14). This takes O(|C|) time, effectively forming groups of points such that there is at least &#8710;x distance between every group. We then sort the groups in G in descending order by the maximum z-score of each group (line 15). Here, we are sorting the location of each group in the list of groups G rather than the points within each group. From each group, we select the point with the lowest y value (line 17); we then check that the selected point is not within a minimum &#8710;y distance from other points that have already been selected, enforcing the dy parameter (line 18). The complexity of this loop is O(|G| &#215; |K|). A point is added to the list of knees K if it satisfies this constraint (line 19). We then decrement the zLimit by dz and continue with the next loop iteration (line 20).</p><p>This loop terminates only after we have reached a zLimit &#8804; 0 and there are no remaining points that can be selected given the dx and dy parameters (line 11). At zLimit = 0, we consider all points in D that have not already been considered in previous iterations. By starting at zscore &#8805; 3 and iteratively approaching 0, we select the largest knees first and gradually lower our threshold for how big a knee should be.</p><p>Finally, we eliminate any points that may have been poorly selected due to non-monotonicity in the curve. A final pass removes points where increasing the x value makes the y value worse (line 12); in our MRC application, such points are clearly undesirable. This simple pass requires time linear in the size of K. The overall complexity of this algorithm is therefore O(|D| &#215; |K|), where D is the size of the input curve and K is often a trivially small value. For example, with dx set to 5%, enforcing at least 5% distance on the x-axis between each selected knee point, the maximum size of K would be 20.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3.">Parameters</head><p>We present qualitative evaluations of the algorithm's parameters dx and dy, as well as its overall success at finding key points. Furthermore, we demonstrate that Z-Method is effective for both stack and non-stack algorithms, by evaluating with LRU and ARC cache replacement policies.</p><p>Parameter: dx. The dx parameter has several functions within Z-Method. It is provided as a percentage of the maximum cache size in the given MRC. The most transparent effect of dx is that it constrains the minimum x distance, or cache size, between selected points. Since no two points can have an x distance less than dx between them, this provides an upper bound on the total number of selected points, and also influences the number of points that are actually selected. Because it affects the "grouping" stage of the algorithm, dx also effectively defines the width of the knees.</p><p>Figure <ref type="figure">3a</ref> shows the effects of dx on workload w09 with LRU cache replacement, with dy fixed and dx set to 1%, 5%, and 10%. The black line in each plot represents the MRC for LRU cache replacement. The green dots are the points selected by Z-Method when using the dx and dy parameters indicated in the legend. The vertical orange lines show the second derivative z-score of the MRC at each cache size. Because the z-score values have a large, workload-dependent   dynamic range, we truncate them at 10 in this plot and for the remainder of this article. A z-score range up to 10 is sufficient to identify all points considered as outliers (e.g., z-score &#8805; 3).</p><p>For the MRC plotted in Figure <ref type="figure">3a</ref>, we will focus on the knee(s) in the region of cache sizes between approximately 425GB and 475GB. In the top plot with dx = 1%, Z-Method considers this region to contain four separate knees, since their distances from each other are at least 1% of the maximum cache size. When we move from 1% to 5% in the middle plot, we can see that points A and B from the top plot have been removed. Those points are no longer within dx of each other, so they are grouped together; we are now left with two points at wider, more prominent, knees.</p><p>A similar effect is seen when we increase dx from 5% to 10% in the bottom plot. The two knees at points C and E are grouped together and C is removed. Point D is also removed, since its cache size is less than 10% away from point E. Significantly, the knee point E was favored rather than the less interesting point D.</p><p>Parameter: dy. The dy parameter is also specified as a relative percentage, which is then converted into an absolute value for the given MRC. It functions similarly to dx, except that it constrains the y distance, or delta miss ratio, between any two selected points. This effectively influences the height of knees and how many points are selected, while providing an upper bound on the total number of points that can be selected.</p><p>Figure <ref type="figure">3b</ref> shows the effects of dy using workload w62 with LRU cache replacement by fixing dx and varying dy between 1%, 5%, and 10%. The format is otherwise the same as in Figure <ref type="figure">3a</ref>. In the top and middle plots, the most interesting change occurs at point C. With dy = 1% in the top plot, this very small knee is considered significant and is selected. However, when we increase dy from 1% to 5% in the middle plot, points A, B, and C are removed, as the y distance between these points and adjacent points is no longer less than dy. Similarly, point E is removed when we move from 5% to 10% in the bottom plot, while the taller knee point F is retained. We can also see that point D is removed as well, as increasing dy reduces the number of selected points.</p><p>It is important to note that for both of these parameters, we are not guaranteed to always have a point that is dx or dy apart from every other point. Enforcing a hard separation rule would add a great deal of complexity and would provide little benefit, since we already select points by their order of importance.</p><p>Parameter: dz. The dz parameter controls the amount that the zLimit variable is decremented in each iteration of Z-Method. This affects the overall running time by influencing the total number of iterations. It can also affect the size of candidate point groups. For example, with a starting zLimit of 3, dz = 0.1 would only consider points with a z-score &#8805; 2.9 on the second iteration, but dz = 0.5 would consider a potentially larger set of points that have a z-score &#8805; 2.5. While this may seem significant, the dx and dy parameters are still the predominant influence on how groups are formed, so we did not observe any trends or significant changes when modifying dz.</p><p>Finding key points. In Figure <ref type="figure">4</ref>, we show the points selected by Z-Method with dx and dy set to 5%, for multiple workloads using both LRU and ARC cache replacement policies. We evaluated these plots based on whether or not they selected all of the points that we consider key points. To reiterate, Z-Method should first select the largest knee points and then eventually select those within any regions that cover at least 5% of the x and y axes. The first row of plots (LRU1-3) shows examples where Z-Method performed well for LRU. All prominent knees were selected and large ranges of cache space with gradual decreases in miss ratio also contained an adequate number of points. The second row of plots (LRU4-6) shows examples where Z-Method missed key points. For example, in plot LRU4, points A and B missed the knee points directly to their left. There were similar issues in LRU5 and LRU6.</p><p>We show how to improve the lower-quality points A and B in LRU4 by modifying Z-Method parameters. The green points were selected using the default dx of 5%, while the blue points were selected using a dx of 3.2%. These blue points more accurately capture these two knees, and are more optimal than A and B.</p><p>There were also cases where Z-Method could pick slightly less optimal points due to extreme shapes in a curve and the nature of the z-score metric. This can be observed in plot LRU5, which exhibits a nearly flat region followed by a massive, steep knee, then another nearly flat region. Point C is not quite at the bottom of the knee because the z-score at the very bottom was slightly below the standard threshold for an outlier of 3. This could be remedied by lowering the threshold (and modifying Z-Method's parameters if needed). It should be noted that Z-Method will still pick a point that is relatively close to the knee in these edge cases.</p><p>The third row of plots (ARC1-3) shows where Z-Method performed well for ARC. In addition to always selecting prominent knees and points in gradually sloped regions, we also see that points were never selected in concave regions where the miss ratio increased due to the nonmonotonicity of ARC. A key feature of Z-Method is that it will never select points with a higher miss ratio that any other previously selected points with a lower cache size.</p><p>The fourth row of plots (ARC4-6) depicts a situation where Z-Method missed key points. In cases such as ARC5, modifying the parameters was sufficient for identifying higher quality</p><p>LRU1 (w105) LRU2 (w61) LRU3 (w97) ARC1 (w02) ARC2 (w44) ARC3 (w101) LRU4 (w20) MRC (LRU) Z-Method (dx: 5%, dy: 5%) Z-Method (dx: 3.2%, dy: 5%) A B LRU5 (w02) C LRU6 (w50) ARC4 (w104) D ARC5 (w54) ARC6 (w81)</p><p>Figure <ref type="figure">4</ref>: From the top: the first row shows LRU plots where Z-Method picked fairly good points; the second row has LRU plots where Z-method missed a few, better points. The third and fourth rows are the same but for ARC (third row good points selected; fourth row missed some points). The plot labeled LRU4 shows points selected by Z-Method using a dx of both 5% (green) and 3.2% (blue). Sub-optimal points A and B in LRU4 were selected using dx of 5%, missing nearby knee points. The knees were appropriately selected when dx was lowered to 3.2%. Sub-optimal point C in LRU5 was selected due to the extreme shape of the curve and the standard z-score threshold of 3. The knee was appropriately selected when lowering the threshold. Sub-optimal point D in ARC4 was selected due to the ARC MRC being generated with too few points. The knee point to the immediate right was selected when the number of points in the MRC was increased from 100 to 220.</p><p>points, but plots ARC4 and ARC6 exhibit a problem that is unique to non-stack-based cache eviction algorithms (i.e., ARC). Unlike stack-based algorithms (e.g., LRU), we cannot easily generate a fine-grained MRC that includes every potential cache size. Instead, best practice is to sample the workload <ref type="bibr">[1]</ref> and then generate the MRC using a subset of points that still preserves the shape of the curve. This is typically done using 100 points. We used 100 points to generate all ARC MRCs during the point selection process throughput this work, but plotted the z-score and points selected against MRCs generated using 1000 points to better show how Z-Method selects points in MRCs that more closely represent the "true" curves. This value worked well for the majority of our workloads, but there were edge cases (e.g., ARC4 and ARC6) where the z-score did not accurately capture important knees present at the very end of the curve. For example, point D in ARC4 was selected because there was a very small knee with a positive zscore at the top of the cliff, but there was a much larger knee to its immediate right. This could be remedied by increasing the number of points used to generate the MRC. 220 points were enough to remedy this value for both ARC4 and ARC6 (not shown in the plots due to complexity). The task of generating an MRC is separate from Z-Method, so we did not include this value as a parameter.</p><p>In all cases where Z-Method missed key points, there were slight modifications that enabled those points to be be selected. We fixed dx and dy to 5%, the z-score outlier threshold to 3, and generated ARC MRCs using 100 points for this evaluation, since we do not yet have a way of automatically selecting the ideal values. Even so, the overwhelming majority of MRCs we looked at still found all key points with these values.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Evaluation: Miss Ratio Curves</head><p>In this section, we evaluate our framework's ability to find key points in miss ratio curves. We first compared the accuracy of 8 different knee-detection algorithms, including Z-Method, for identifying knees in single-tier MRCs, and then evaluated our framework's ability to quickly find optimal multi-tier configurations.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1.">Experimental Setup</head><p>We evaluated our techniques on 106 real-world block traces collected by CloudPhysics <ref type="bibr">[7]</ref>, each representing a week of virtual disk activity from production VMware environments. We used hash-based spatial sampling <ref type="bibr">[1,</ref><ref type="bibr">7]</ref>, with a size-based sampling rate ranging from 0.1 to 0.0001, to reduce these workloads and thus the running time while maintaining an accurate representation of the originals. We dynamically varied the rate by powers of 10, such that each sampled trace was guaranteed to contain between 100K and 1M requests. The traces contain heterogeneous request sizes, so we also transformed all requests into 4KB block-aligned operations to facilitate accurate sampling, consistent with previous work <ref type="bibr">[27]</ref>.</p><p>To evaluate multi-tier systems, we extended PyMimircache <ref type="bibr">[13]</ref>, a cache simulator with an easily modifiable Python front end and an efficient C back end. Our extension generates two-tier MRCs by simulating an L1 cache with the original sampled trace, then simulating L2 with the requests that missed in L1. L1 cache sizes were selected using the MRC of the original trace, while L2 sizes were chosen using the MRCs of each intermediate trace. The total miss ratio of the two-tier configuration was calculated as the product of the miss ratios of L1 and L2. We modeled a simple write-back policy by treating both reads and writes as cache references, as done in previous work <ref type="bibr">[27]</ref>. The cache eviction policy was configured as either LRU or ARC and was the same in both tiers. We generated two-tier MRCs for each trace, for both LRU and ARC replacement policies, resulting in a total of 212 MRCs.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.2.">Knee-Detection Algorithms</head><p>We evaluated the accuracy of our framework using Z-Method and several other knee-detection algorithms: Curvature, DFDT, Kneedle, L-Method, and Menger. We also included the Fusion method, which considers all points retained by RDP and relies on our post-processing filters to select relevant knees.</p><p>Kneedle finds knees using peak-detection methods, and can be used for single-knee detection by selecting only the highest possible peak; we call that approach Kneedle Recursion. We analyzed each method's ability to find knee points that had been manually curated in the 212 single-tier MRCs by four domain experts.</p><p>Most of our techniques have one or more hyper-parameters that can influence which points are selected. To achieve the best performance for each MRC, it is necessary to tune the hyperparameters of each algorithm appropriately. While the default parameters offered acceptable 14 performance, a more complete evaluation requires optimized parameters <ref type="bibr">[40]</ref>. Therefore, we developed a cost function and ran an optimization algorithm for each knee-detection method using all 212 MRCs. When designing the cost function, we carefully considered the target use case of our framework. We want to find the ideal parameters that have the lowest error globally across all MRCs, while keeping the number of knees as close as possible to the number of knees identified manually. Constraining the number of knees is necessary since our framework is designed to pick only the most relevant points. A technique that finds parameters that correctly identify all knee points but also selects many non-relevant points, while having a high precision score, would be inefficient for our use case.</p><p>We use the Matthews correlation coefficient (MCC) <ref type="bibr">[41]</ref> as the basis of our cost function. MCC measures classification quality by considering the balance ratios of the four confusion matrix categories: true positives and negatives, and false positives and negatives. Although the knee-detection problem is better modeled as a regression, we based our evaluation on binary classification, since we wanted to control the impact of false positives and negatives (i.e., nonrelevant points being classified as knees and vice-versa). Prior work <ref type="bibr">[41]</ref> has shown that the MCC is more informative than an F1-score for evaluating accuracy in binary classification problems. As such, the cost function we used was the following:</p><p>where E represents the expected (manually selected) knees for all MRCs, and K represents knees picked for all MRCs (n defines the number of MRCs) by our framework using some configuration of hyper-parameters and a knee-detection algorithm. MCC(E i , K i ) represents the MCC computed from the expected and detected knees of the i th MRC. Finally, |K i | represents the number of knees detected in the i th MRC, and K t represents a threshold for the acceptable number of knees. Figure <ref type="figure">5</ref> shows our evaluation. Three techniques stand out: Fusion, Kneedle, and Z-Method. Fusion achieves tighter margins than all other techniques, spanning only 0.23 MCC between the</p><p>C u r v a t u r e D F D T F u s i o n K n e e d l e K n e e d l e R e c u r s i o n L -M e t h o d M e n g e r Z -M e t h o d 10 -2 10 -1 10 0 10 1 10 2</p><p>Runtime (log 10 seconds)</p><p>Figure <ref type="figure">6</ref>: Running times for 8 knee-detection algorithms. The y-axis scale is logarithmic. L-Method displays a considerably higher running time than other methods, due to its high complexity. Other methods are comparable, with Kneedle and Z-Method having the lowest median running times.</p><p>upper and lower quartiles, suggesting that the expected performance in unseen traces would be well-bounded. Kneedle and Z-Method achieve the highest median MCC values of 0.45 and 0.50, respectively, with Z-Method having a smaller standard deviation when compared with Kneedle.</p><p>The much tighter bounds of Z-Method are more significant than the improvement in median, making Z-Method the ideal candidate for our multi-tier evaluation. We also experimentally measured the time and memory usage of our framework using each knee-detection algorithm for all MRCs. We used the default hyper-parameters for each algorithm, as they do not significantly impact the overheads. The results of the running-time benchmarks are shown in Figure <ref type="figure">6</ref>.</p><p>All of the algorithms have comparable execution times across all MRCs with the exception of L-method. This is especially true for the upper quartile of L-Method, which is 1307.79 ms. The second highest upper quartile is Kneedle Recursion, which is 74.4% lower than L-Method at 334.62 ms. This is expected since L-method uses straight-line fitting (O(n 2 )) for each point to detect the ideal knee, leading to a time complexity of O(n 3 ). Combined with our recursive algorithm that enables it to detect multiple knees, the expected time complexity for L-method is O(n 3 log n). Note that Kneedle (non-recursive version) and Z-Method have the lowest median running times of 38.59 ms and 40.81 ms, respectively.</p><p>The memory overhead is nearly linear in the file size for each MRC, ranging from approximately 53KB to 71MB after sampling. There were no significant differences across any of the techniques, so we do not present any further memory overhead analysis.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.3.">Multi-Tier MRCs</head><p>Miss-ratio curves are typically used to find configurations that minimize both miss ratio and cache size(s). We seek multiple configurations that are optimal in two or more objectives.</p><p>Consider designing a multi-tier cache, with many device options, for a large workload. With an unlimited budget, one could simply purchase enough DRAM to hold the entire data set, but that is rarely economical. Instead, most system administrators will want to trade cost off against performance, meaning that they will be interested in Pareto-optimal solutions, i.e., those where a given objective cannot be improved without making one or more others worse. Only a subset of all possible cache configurations are Pareto-optimal. When a set contains every Pareto-optimal configuration for a given workload and no others, it is called the true Paretooptimal front. Any point in this front minimizes the cache size(s) and the miss ratio; the front as a whole can be considered to mark the "best" points.</p><p>However, it is often not feasible to find the true Pareto front for a large configuration space. Instead, the space can be sampled in an attempt to find optimal points, creating a Pareto approximation. Our work aims to find a minimal number of key points in MRCs. Thus, we are trying to find the most significant Pareto-optimal points by efficiently generating accurate Pareto approximations of multi-tier MRCs.</p><p>There are multiple metrics for evaluating the quality of Pareto approximations <ref type="bibr">[42]</ref>; the most commonly used is the HyperVolume Indicator (HVI) <ref type="bibr">[43]</ref>, which measures the size of the space between the points in a front and a user-defined reference point; a larger space is better. Figure <ref type="figure">7</ref> shows an example of how HVI is measured in a 3-dimensional space. The blue shape represents a simple linear series descending from (0,0,10) to <ref type="bibr">(10,</ref><ref type="bibr">10,</ref><ref type="bibr">0)</ref>. If this were a twotier MRC, the x-axis would be the L1 size, y-axis the L2 size, and the z-axis the miss ratio. The hypervolume is the volume between points on the Pareto front (here, the blue shape) and a userdefined reference point, here the nadir point<ref type="foot">foot_0</ref> at <ref type="bibr">(10,</ref><ref type="bibr">10,</ref><ref type="bibr">10)</ref>, where all objectives are maximized. To find the hypervolume of the point at <ref type="bibr">(5,</ref><ref type="bibr">5,</ref><ref type="bibr">5)</ref>, we draw a rectangular prism from it to the reference point. The resulting 5 &#215; 5 &#215; 5 cube has a hypervolume of 125. If we were to instead find the hypervolume of the point (4,4,4), we would have a 6 &#215; 6 &#215; 6 cube with a hypervolume of 216. Thus, configurations with lower cache sizes and miss ratios result in larger hypervolumes. The total hypervolume of a dataset is the non-overlapping hypervolume of all points on its Pareto front, making HVI a useful metric for our multi-knee detection framework.</p><p>Another metric highly relevant to our problem is the Ratio of Non-Dominated Individuals (RNI) <ref type="bibr">[44]</ref>, which is the fraction of dataset points that are on the Pareto front. As discussed</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Method</head><p>Avg. Points Avg. HVI % Avg. RNI ARC LRU ARC LRU ARC LRU Even4 20 20 59.63 61.00 0.30 0.28 Even10 110 110 86.43 83.31 0.39 0.40 Even13 182 182 90.41 91.07 0.41 0.34 Even50 2550 2550 100.00 100.00 0.33 0.34 Z-Method 23.33 20.33 86.99 90.75 0.94 0.97 Table <ref type="table">1</ref>: Evaluation results of our framework using Z-Method across 2-tier ARC and LRU MRCs, derived from 106 realworld block traces collected from CloudPhysics. The averages of 3 metrics are presented for each algorithm: number of points (lower is better), HyperVolume (HVI) as a percentage of Even50's HyperVolume (higher is better), and Ratio of Non-Dominated Individuals (RNI) (higher is better).</p><p>earlier, points not on the front represent sub-optimal configurations, so a higher ratio is better. RNI does not measure the magnitude of quality; instead, it informs us of a point selection technique's efficiency. Therefore, evaluating HVI and RNI together is a comprehensive approach to analyzing techniques that find the minimal number of key points in MRCs. We evaluated our framework across all 212 two-tier MRCs using Z-Method, compared to a na&#239;ve approach of selecting evenly-spaced points. We also tried geometrically-spaced points, but this yielded worse results than even spacing so we omit them from this analysis. It was not practical to evaluate every point in MRCs containing thousands of points, so we used 50 evenlyspaced points (Even50) as a reasonable approximation of the full configuration space and the true Pareto front. We varied the number of evenly-spaced points to most closely match Z-Method's average HVI or number of points, resulting in Even4, 10, and 13.</p><p>In Table <ref type="table">1</ref>, we show the averages across all 212 MRCs of the number of points selected, HVI as a percentage of Even50's HVI, and RNI. When measuring the efficiency of a method, a lower number of points and a higher RNI are better; when measuring the accuracy of a method, higher HVI is better. The number of points for even spacing is always constant, calculated as X + X 2 for two-tier MRCs using EvenX. Z-Method has HVI similar to that of Even10 for ARC and to Even13 for LRU, but Z-Method evaluates 5.5&#215; fewer points for ARC and 7.7&#215; for LRU to get those results. This efficiency is also reflected in Z-Method's RNI of 0.94 for ARC and 0.97 for LRU. Conversely, the RNI of the evenly-spaced methods ranges from 0.28 to 0.41, meaning that the majority of points they select are sub-optimal and uninteresting to explore.</p><p>In Figure <ref type="figure">8</ref>, we show box plots for all 212 MRCs. Figure <ref type="figure">8a</ref> displays the number of points selected by each technique. We can see that Z-Method and Even4 selected approximately the same median number of points. A significant result is that in the worst case, Z-Method still picked fewer points than Even10. We can also see cases where Z-Method picked very few points. There are times when such a low number of points is appropriate, but this can also represent cases where the default parameters were too conservative, resulting in too few points and a low HVI.</p><p>Figure <ref type="figure">8b</ref> displays the HVI as a percentage of Even50's HVI. This figure reveals several outliers where Z-Method performed poorly, but also many cases where it had a higher HVI than Even50. These results inform us about Z-Method's sensitivity to its hyper-parameters. The default parameters worked well for the majority of our workloads, but needed to be tuned better for others. With the right parameters, Z-Method performed better than na&#239;ve approaches while selecting a minimal number of points. Lastly, Figure <ref type="figure">8c</ref> displays the RNI. Z-Method consistently had a greater RNI than all of the evenly spaced methods, indicating that it properly identified key points. We can also see that there were diminishing returns when increasing the number of evenly spaced points. The median RNI decreased from Even13 to Even50, meaning that Even50 selected many points that did not contribute to the Pareto front.</p><p>In Figure <ref type="figure">9</ref>, we show visualizations of the points chosen by each method for a few selected two-tier MRCs with fairly different characteristics. <ref type="foot">2</ref> Figure <ref type="figure">9a</ref> (top row) displays the MRCs for workload w04 using LRU replacement, where several knees of various sizes are followed by gradually-sloped regions. We can see that Z-Method accurately selects each knee, achieving 92% of Even50's HVI while evaluating over 100&#215; fewer points. Conversely, Even13 and Even4 perform poorly, selecting points at the tops of the cliffs before the knees, resulting in lower HVI's of 86% and 49%, respectively. When several knees are present, Z-Method has more opportunities to exploit these significant improvements in miss ratio, performing much better than evenly-spaced points.</p><p>Figure <ref type="figure">9b</ref> (middle row) displays the MRCs of workload w66 using ARC replacement, which exhibits large amounts of non-monotonicity, creating several hilly regions. Z-Method finds the interesting knee points at the hill bottoms, while the post-processing filter prevents selecting any points at the hilltops. Z-Method is even more efficient here than in the previous figure while still being highly accurate, selecting only 20 points and achieving 93% of Even50's HVI. Even13 gets close to Z-Method's HVI, but requires 9.1&#215; more points.</p><p>Finally, Figure <ref type="figure">9c</ref> (bottom row) displays the MRCs of workload w06 using ARC replacement, which contains only a couple of interesting points at the very beginning of the plot. Z-Method finds 3 points in this tiny space that are more optimal than those found by Even4 or Even13; it also does not waste time exploring the large, flat MRC region that offers almost no improvement in miss ratio. With only 9 points, Z-Method achieves 97% of Even50's HVI, while Even13 by our multi-knee detection framework can be used to seed the initial population of evolutionary algorithms.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.1.">Experimental Setup</head><p>We configured each experiment with choices for an input I/O trace, a population-initialization technique, an evolutionary algorithm, a knee-detection algorithm, a cache-replacement algorithm, and two parameters controlling the stopping criteria for the optimization. For each configuration, we analyzed the convergence of an evolutionary algorithm with each of the populationinitialization techniques and with our multi-knee detection framework.</p><p>We used our PyMimircache <ref type="bibr">[13]</ref> cache simulator extension (see Section 5.1) for all experiments. Simulation enabled us to study a wide variety of configurations, as trace replay on real hardware would be far too slow and would limit the configuration space we could explore. We optimized a single variable, cache size, for the performance metric of I/O operations per second (IOPS) per dollar ($), or IOPS/$. We calculated theoretical values for the IOPS using the same methodology as eMRC <ref type="bibr">[27]</ref>, and computed dollar costs from a given configuration's cache size and current market values for that type of device <ref type="bibr">[47,</ref><ref type="bibr">48]</ref>. We normalized both the IOPS and dollar cost and then combined them to determine IOPS/$.</p><p>We evaluated this use case on three different sets of real-world block traces obtained from CloudPhysics <ref type="bibr">[7]</ref> and the publicly available FIU <ref type="bibr">[49]</ref> and MSR <ref type="bibr">[50]</ref> traces, for a total of 151 individual traces. We used uniform randomized spatial sampling <ref type="bibr">[1,</ref><ref type="bibr">7]</ref> with a size-based sampling rate R (ranging from 0.1 to 0.0001) on the larger traces to reduce the running time while maintaining an accurate representation of the original trace. Our sampling produced a fairly diverse set of MRC sizes, with a mean of 70, 446 &#177; 110, 014 blocks, ranging from 263 to 829,424 blocks.</p><p>We evaluated the speed of convergence of evolutionary algorithms using four populationinitialization techniques: our multi-knee detection framework, random initialization, Latin Hypercube sampling (LHS) <ref type="bibr">[32]</ref>, and Halton sequences <ref type="bibr">[33]</ref>. For techniques that include randomization (all but multi-knee), we ran them three times with different random seeds to obtain stable results. Three seeds is generally considered the minimum acceptable number for this type of analysis. However, given the size of our dataset and configuration space, even three random seeds resulted in experiments that required significant running time while still remaining viable. We ran a total of over 3M experiments, which sufficiently covers the search space, allowing us to evaluate our proposed solution with statistical confidence. We experimented with three types of evolutionary algorithms: Generalized Differential Evolution 3 (GDE3) <ref type="bibr">[51]</ref>, a Genetic Algorithm (GA) <ref type="bibr">[52]</ref>, and Particle Swarm Optimization (PSO) <ref type="bibr">[53]</ref>. We focused on a subset of the kneedetection algorithms available in our framework: Menger, Kneedle, and Z-Method. We selected these three because Menger represents a baseline knee-detection method that uses a local feature, Kneedle is a well-known algorithm that greatly benefits from our framework, and Z-Method is our novel algorithm designed for this specific application.</p><p>We used both Adaptive Cache Replacement (ARC) and Least-Recently Used (LRU) cache replacement policies. These two popular policies present interesting scenarios for multi-knee detection since the MRCs produced by LRU are guaranteed to be monotonically decreasing, while ARC's MRCs can contain both convex and concave regions (see Section 2.1). Lastly, we enforced two types of stopping criteria for the optimization: (1) the number of evaluations and (2) an objective value that was some percentage of the "best" value for that configuration. The number-of-evaluations stopping criterion was fixed at 300. We found this value sufficient to allow approximately 99% of our experiments to converge. To handle the objective-based stopping criterion, for each trace we simulated 1,000 cache sizes evenly spaced from the minimum to the maximum and calculated their IOPS and dollar costs. We obtained the maximum IOPS/$ from these simulations, and treated it as the "best" value when calculating the objective stopping criterion for all optimizations involving that trace.</p><p>A rule of thumb for the population size is to use ten times the number of parameters in the solution <ref type="bibr">[54]</ref>. Since we are only trying to optimize a single parameter (cache size), this implies a minimum population of size 10. If our framework picks fewer points, we iteratively selected points in the center of the largest gap in the curve until we reached 10. It is also possible to optimize the hyper-parameters of the techniques in our framework to select a desired number of points, but we did not explore hyper-parameter optimization in this work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.2.">Acceleration Rate</head><p>We evaluated our experiments using the overall acceleration rate (AR) <ref type="bibr">[55]</ref> to quantify the increased convergence speed when using our framework to select an initial population for evolutionary algorithms. This metric compares the number of function calls (NFCs) made by two separate sets of optimization problems. For our purpose, the NFCs will correspond to the number of epochs (iterations) an evolutionary algorithm takes to converge. Each optimization problem uses an evolutionary algorithm to optimize the IOPS/$ of a cache and has several parameters: an input trace, an evolutionary algorithm, a knee-detection algorithm, a population-initialization technique, a threshold for the value-based stopping criterion, and a cache-replacement algorithm. The AR compares two sets of problems and reports the percent difference in convergence speed. For all of our evaluations, we compared a set of problems PM that use our multi-knee detection framework for population initialization, against a set PO that uses some other technique for initialization. The AR is calculated as follows:</p><p>i.e., an x% AR implies an x% reduction in running time. We evaluated 151 traces, four population initialization techniques, two cache-replacement algorithms, and three variations of all other parameters, resulting in 32,616 total problems and over three million cache simulations. The overall AR achieved using our multi-knee detection framework for population initialization was 34%. In the remainder of this section, we show the effects of each configuration parameter by creating subsets of the total problems via parameter constraints.</p><p>Figure <ref type="figure">10</ref> presents bar plots showing the AR achieved using our multi-knee detection framework for population initialization. Each bar represents a comparison between two sets of optimization problems, PM and PO, which are different sets for each bar, depending on the constraints of the axes and legend. PM uses our multi-knee detection framework for population initialization with a knee-detection algorithm identified by the color of the bar (Menger, Kneedle, or Z-Method). PO uses the initialization technique shown on the x2-axes (top of figure): a pseudo-random number generator (Random), Latin Hypercube sampling (LHS), or Halton sequences. The value of the objective threshold t stopping criterion for both problem sets is shown on the y2-axes.</p><p>In each plot, we show three knee-detection algorithms: Menger, Kneedle, and Z-Method. The bars labeled "Menger" represent a baseline knee-detection method; it was the least accurate of those depicted. "Kneedle" is the robust version that we optimized for this scenario; we employed Global RDP (gRDP) before using Menger or Kneedle, reducing noise in the MRCs and 22</p><p>0 10 20 30 40 50 60 Random LHS Halton GA GDE3 PSO 0 10 20 30 40 50 60 Acceleration Rate (%) GA GDE3 PSO Evolutionary Algorithm GA GDE3 PSO Objective Threshold (%) Menger Kneedle Z-Method t = 99% t = 95%</p><p>(a) Acceleration rates using GA, GDE3, and PSO algorithms.</p><p>0 10 20 30 40 50 60 Random LHS Halton ARC LRU 0 10 20 30 40 50 60 Acceleration Rate (%) ARC LRU Cache Replacement Algorithm ARC LRU Objective Threshold (%) Menger Kneedle Z-Method t = 99% t = 95%</p><p>(b) Acceleration rates using ARC and LRU cache replacement.</p><p>Figure <ref type="figure">10</ref>: The acceleration rate (AR) achieved using our multi-knee detection framework for population initialization vs. other techniques. The height of each bar represents the acceleration rate (y-axis), where higher is better. The bottom row represents experiments using the objective threshold t = 95%; the top row is those using t = 99% (the most challenging threshold to meet). Each group of bars, from left to right, shows the AR using our framework for population initialization with the baseline (Menger, in blue), with Kneedle (orange), and with our Z-Method (green), each evaluated against three different initialization methods on the x2-axis (Random, LHS, and Halton, at the top of the figure). (a) shows the AR for three different Evolutionary Algorithms on the x-axis (GA, GDE3, and PSO), with results included from both LRU and ARC cache replacement algorithms. (b) shows the same results as in (a) but separated by LRU vs. ARC, with results included from all three Evolutionary Algorithms.</p><p>improving knee detection. After the knee-detection phase, we applied the post-processing filters described in Section 3.1 to refine the selected knees. We varied the objective-threshold stopping criterion t between 99%, 98% (omitted in Figure <ref type="figure">10</ref> for brevity), and 95% for all configurations. We observed that a lower threshold usually yielded a lower AR. A higher threshold makes optimization more difficult by requiring a solution closer to the most optimal value. Thus, a lower threshold increases the number of acceptable solutions, giving less-informed population initialization techniques a better chance at finding a solution.</p><p>Figure <ref type="figure">10a</ref> shows the effects of using different evolutionary algorithms. The optimization problems analyzed in each group of bars are shown on the x-axis: Genetic Algorithm (GA), Generalized Differential Evolution 3 (GDE3), and Particle Swarm Optimization (PSO). Results in this figure include problem sets with configurations using both ARC and LRU cache replacement. Therefore, in the upper leftmost subfigure of Figure <ref type="figure">10a</ref>, the first blue bar on the left represents, for the 151 traces, the AR for all optimization problems using: (1) our framework with Menger for population initialization vs. Random, (2) using a Genetic Algorithm (GA), (3) with either ARC or LRU cache replacement, and (4) an objective threshold t = 99%. Z-Method is our novel method designed for this task; it outperformed Kneedle in most cases. Kneedle was still competitive, usually only a few percent behind Z-Method and even winning by a small margin in three out of the 18 configurations displayed. (It should be noted that Kneedle benefited greatly from our framework's pre-and post-processing filters, and that Kneedle on its own yielded much poorer results; see Section 2.2). We also saw a wide range of AR values in these configurations, from under 10% AR (Menger with PSO) to over 50% AR (Z-Method with GA). Lastly, ranking the AR from highest to lowest yields GA (best), GDE3, and then PSO. We attribute this ranking to the difference in efficiency of the evolutionary algorithms. The more efficient algorithms have a lower AR because they are less sensitive to the initial population.</p><p>Figure <ref type="figure">10b</ref> shows the effects of using either ARC or LRU cache replacement. Results in this figure include problem sets with configurations using any of the three evolutionary algorithms. The most relevant difference between ARC and LRU is that LRU MRCs always decrease monotonically, while ARC can have both convex and concave regions (i.e., can go up and down). This poses a unique challenge for knee detection, since a curve can have a knee that is less optimal than a previous point. Said differently, in ARC and similar non-stack cache algorithms, counterintuitively, adding more cache can actually hurt performance. This non-monotonic property can also distort many metrics that knee-detection algorithms use to detect or rank points. Z-Method significantly outperformed Kneedle for all ARC cases in Figure <ref type="figure">10b</ref>, while Kneedle beat Z-Method somewhat for all but one of the LRU configurations. This is to be expected, as Z-Method was originally designed with cache optimization for non-monotonic MRCs in mind, enforcing constraints in a grid-like pattern to prevent proximal knees. Conversely, Kneedle was designed under the assumption of monotonicity. Again, we note that our pre-and post-processing filters were essential to Kneedle's good results.</p><p>The population-initialization techniques did not alter any of the previous trends we observed in Figure <ref type="figure">10</ref>, but we did see an approximately 5% difference in AR between the worst and best case: Random performed the worst, followed by Halton, and then LHS. These results are consistent with those seen in previous studies <ref type="bibr">[32]</ref><ref type="bibr">[33]</ref><ref type="bibr">[34]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.">Conclusion</head><p>The many configurations of multi-tier caching systems produce a wide range of performance and costs. As the configuration space continues to grow due to advancements in caching and storage technology, exploring the space through physical experiments or traditional simulation becomes infeasible.</p><p>We introduced the novel concept of applying multi-knee detection to MRCs using a framework for selecting key points, reducing the cost of exploration significantly. We present Z-Method, an algorithm that robustly and efficiently identifies multiple key points in MRCs with minimal overhead. We also designed a recursive algorithm that enables any single-knee-detection algorithm to find multiple knees. We demonstrated that our framework using Z-Method can be applied to reduce the total number of points required to identify optimal two-tier cache configurations by an average factor of approximately 5.5&#215; for ARC and 7.7&#215; for LRU compared to na&#239;ve approaches. Finally, we evaluated our framework across a highly diverse set of configurations and datasets for the additional application of seeding the initial population of evolutionary algorithms, showing an overall acceleration rate of 34% compared to commonly used populationinitialization techniques.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>Although the reference point is placed at the largest coordinates, prior literature on hypervolume indicators uses the term "nadir" rather than "zenith" because it represents the worst performance; we follow that convention.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1"><p>A similar figure that appeared as Figure4in an earlier version of this paper<ref type="bibr">[19]</ref> inadvertently showed visualizations for Even5 instead of Even4.</p></note>
		</body>
		</text>
</TEI>
