Abstract:Solid-state drives (SSDs), owing to their high read/write performance and low power consumption, have been widely used in diverse scenarios such as embedded systems and data centers. Among them, the garbage collection (GC) mechanism plays a critical role in space reclamation efficiency and device lifespan. However, existing GC methods still suffer from limitations in triggering flexibility, data migration efficiency, and wear leveling effectiveness. To enhance the adaptability and reliability of GC under varying workloads, this study proposes a write pattern-aware and heat-tiered garbage collection (WHGC) method. WHGC first constructs a write pattern-aware indicator and designs a multi-threshold triggering mechanism to enable dynamic GC scheduling under both idle and busy system states. It then introduces a block scoring strategy that integrates space utilization and wear level to guide victim block selection. During the valid page migration phase, WHGC employs an exponential decay model to identify the heat of logical pages, and combines it with block erase count classification to establish a mapping between heat levels and wear levels, thus guiding valid pages to migrate to blocks of corresponding levels. Experimental results based on the SSDsim platform demonstrate that WHGC achieves a longer device lifespan than other typical GC methods across all datasets, while maintaining superior overall performance in terms of write amplification factor, the number of migrated valid pages, and the standard deviation of erase counts.