# Amphishea: A Novel Persistent Buffer Management Strategy to Improve SMR Disk Performance
## 2 Background and Motivation
### Optimization for CMR-Based Persistent Buffers  
The reasonable use of a persistent buffer to accommodate non-sequential write data can effectively mitigate the performance degradation of SMR disks caused by frequent RMW operations. Currently, the persistent buffer in SMR disks includes a flash-based persistent buffer and a magnetic media-based persistent buffer. Intuitively, the performance of flash-based buffers may be better than magnetic media-based persistent buffers, but the former comes at a higher price. In practice, as back-end storage devices, SMR disks have to cope with a lot of write traffic. Under write-intensive workloads, this can place a heavy burden on flash memory, which suffers from endurance issues. Therefore, flash memory with limited erase cycles is not suitable as an on-disk buffer.  
Magnetic recording-based persistent buffers are considered a practical solution because of their low cost and no erase-cycle limit. In general, a magnetic record-based persistent buffer can be constructed using either the SMR zone or the CMR zone. SMR-based persistent buffers are configured in most current SMR disks due to their ability to fully utilize disk space. However, sequential write constraints prevent data from being updated in place, requiring frequent cleanup to reclaim available space. Buffer cleanup inevitably introduces time-consuming RMW operations, which dramatically degrade the performance of SMR disks [21; 22]. Compared to SMR-based persistent buffers, CMR-based persistent buffers have in-place update capability, which can reduce the frequency of cleanup to some extent. The emergence of HM-SMR disks configured with CMR zones provides a great opportunity to design flexible and host-controllable data layout schemes and garbage collection strategies. There have been several efforts to optimize CMR-based persistent buffers. For example, Western Digital proposed an open-source solution for HM-SMR called dm-zoned [14]. The entire CMR space is divided into a fixed number of CMR zones of the same size as the SMR zones, and the CMR zones are organized in a set-associative manner. When the CMR zones are exhausted, a Zone-LRU [22] policy is used to evict the victim CMR zone. However, under temporal locality-dominated write workloads, the coarse-grained space allocation unit frequently triggers cleanup, severely degrading disk performance. \(\mu\)Cache [15] adopts a data layout scheme similar to dm-zoned, except that the former proposes a spatial locality-based promotion operation to try to eliminate the need for garbage collection. However, the strategy omits any discussion of garbage collection policies, making it applicable only to spatial locality-dominated workloads. Recently, [PERSON] et al. [16] proposed a loop-back logging strategy that uses append-write to improve write efficiency. Typically, under this data layout, victims can only be cleaned in a first-in-first-out (FIFO) way. To avoid frequent updates of blocks moving back and forth between the buffer and the native zone, blocks that belong to the hot zone are re-queued to the log header when the buffer is cleaned. In summary, these strategies either do not take into account the actual workload characteristics or lack efficient garbage collection policies, making them ineffective overall.