Rate This Document
Findability
Accuracy
Completeness
Readability

Principles

  • Frontend and backend separation

    Global Cache divides an end-to-end I/O processing path into two parts: frontend and backend. The frontend part ensures the fastest response to read/write requests of applications. Applications only sense the execution time of the frontend part. For a data write request, the cache frontend stores service data in non-volatile media as WALs and immediately responds to the application. Then the write request is completed for the application. In the cache backend, service data is asynchronously aggregated and flushed to the backend storage pool in batches to complete the data write process. For a data read request, data is directly obtained from the read cache pool and then returned to the application. The cache backend prefetches data from the storage pool to the read cache pool based on the service workload to ensure that the read request can be hit. In addition, the frontend processing flow is cached to implement zero context switchover, minimize software overhead, and ensure low latency.

  • I/O aggregation

    Different workloads written to storage media affect the performance of storage media. Take HDDs as an example. When each HDD in the Ceph cluster processes a random 4 KB request, the IOPS is only about 150, which is equivalent to 600 KB/s bandwidth. After the workload is changed to sequential 1 MB requests, the bandwidth of HDDs can reach over 100 MB/s. Compared with the bandwidth of random 4 KB requests, the bandwidth of HDDs is increased by more than 160 times. In real service scenarios, data workloads are various requests of different sizes and in different sequences. The I/O aggregation feature consolidates data with random access addresses and different block sizes into large I/Os of 4 MB or 8 MB and writes the I/Os to backend storage drives in sequence. In this way, the performance of backend storage media is greatly improved. In addition, the number of HDDs is determined based on the maximum IOPS of the system, ensuring that the write cache will never be worn out. To avoid read amplification after I/O aggregation, metadata management of the I/O aggregation function supports on-demand read of some data.

  • Smart prefetch

    The smart prefetch technology parses the pattern of read requests initiated by applications and matches the access mode (sequence flow, reverse flow, interval flow, hotspot flow, associated flow, etc.). If the matching is successful, the data that may be read by the service can be predicted and prefetched from the backend storage pool to the cache pool. To obtain more accurate prefetch data, parameters such as pattern matching, prefetch threshold, and prefetch length are dynamically adjusted in real time based on the negative feedback of the read cache hit ratio. According to multiple service load tests, the read cache hit ratio can reach about 80%.