# Amphishea: A Novel Persistent Buffer Management Strategy to Improve SMR Disk Performance
## 2 Background and Motivation
### Motivation  
To take full advantage of CMR-based persistent buffers, the characteristics of the workload and the inherent properties of SMR disks must be considered. This motivates us to gain insight into the key factors that affect the efficiency of CMR-based persistent buffer cleanup. **Differences in hot block update periods. ** The recency- and frequency-based classification methods use temporal locality to identify frequently updated blocks in the workload, which often yields satisfactory results [23; 24; 25; 26; 27]. However, in real-world workloads, some blocks have short update periods (in this paper, the update period indicates how many other unique blocks exist between two update operations to a block, where the update period is greater than the persistent buffer is called the long update period, and the reverse is called the short update period) but low update frequencies, while some blocks have long update periods but high update frequencies [28]. In this case, it is difficult to capture such blocks using a frequency- or recency-based classification method. In contrast, the reuse distance-based classification methods can accurately capture the blocks that are frequently updated and have long update periods by predicting the update distance of the blocks. To observe the distribution of block update periods under different workloads, we utilize the concept of reuse distance to quantify the block update periods. Figure 2 show the update period distribution of updated blocks under real-world workloads from MSR, where the blue dashed line indicates the persistent buffer size bound for the current workload (details of the persistent buffer size configuration are given in Section 6.1). For Figure 2a, the blocks with short update periods are about 83.7%, of which only 6.76% are updated once. Therefore, the frequency- or recency-based classification method can effectively identify the frequently updated blocks. In contrast, the workload shown in Figure 2b has more than 85% blocks with long update periods, and 70% of them are updated more than twice. Since the long update period blocks are greater than the size of the persistent buffer, this causes the frequency- and recency-based classification method to incorrectly treat them as cold blocks to be discarded. Frequently updated blocks that move back and forth between the persistent buffer and the native zones introduce unnecessary RMW operations, which lead to jittery disk performance. Although the reuse distance-based classification methods have been widely deployed with good practical results [28; 29; 30; 31], these well-designed strategies applied directly to CMR-based persistent buffers may not yield satisfactory performance gains. There are two reasons for this: first, these strategies are designed for the RAM-based cache, and without the seek overhead of collecting victim blocks; second, the main purpose of these strategies is to accelerate read requests, whereas for SMR disks with write performance bottlenecks, more attention should be paid to the blocks with frequent upd  
Figure 2: The distribution of the update period for block under real MSR workloads. In (**a**,**b**), the x-axis represents the average update period of an updated block, the left y-axis represents the number of logical blocks accessed by the write request, and each dot represents a logical block. Therefore, it is necessary to develop a data classification method dedicated to the write-reuse distance to avoid the write-back of blocks with frequent updates. **Conventional data layout scheme. ** Current persistent buffer data layout schemes fall into two broad categories: circular log-based or segment-based data layout schemes. To improve the write efficiency of SMR disks, the circular log data layout scheme appends the written data sequentially to the end of the log, but this also causes blocks in the same SMR zone to be scattered to different physical locations. When the buffer is cleaned, the victim block collection process triggers multiple time-consuming random read operations.