Abstract
Standard Merkle hash trees (MHTs) ensure data integrity in confidential cloud storage but suffer from significant performance degradation as disk capacities grow. This paper identifies CPU-bound hashing as the primary bottleneck in modern high-speed storage systems. We introduce Dynamic Merkle Trees (DMTs), which utilize an unbalanced, self-adjusting structure to move frequently accessed data closer to the root. Our evaluation shows that DMTs provide up to a 2.2× improvement in throughput, effectively scaling integrity verification for multi-terabyte cloud storage.
Introduction
Confidential computing requires verifying that data retrieved from untrusted cloud storage has not been tampered with or replayed. Merkle Hash Trees (MHTs) are the standard mechanism for this verification. However, as storage devices like NVMe SSDs become faster and capacities increase, the overhead of traversing deep, balanced trees becomes the dominant factor in system latency. A standard MHT for a 1 TB disk is approximately 28 levels deep, requiring 28 cryptographic hashes for every single read or write.
The Hashing Bottleneck
In a traditional balanced binary MHT, every I/O operation requires a number of cryptographic hashes proportional to the logarithm of the disk capacity. As storage hardware improves, the "I/O critical path" is increasingly dominated by this CPU hashing time rather than disk latency.
As illustrated above, the time spent on hash updates increases significantly with disk capacity, while raw data I/O remains relatively constant. On large-scale storage, the CPU becomes the bottleneck, spending more time on metadata verification than the hardware spends on data transfer. Furthermore, research indicates that simply increasing tree arity (making trees "wider") is not a panacea, as it can actually increase the total data hashed at each level.
Dynamic Merkle Trees (DMTs)
To address this, we propose Dynamic Merkle Trees (DMTs). Unlike static balanced trees, DMTs adapt to the non-uniform access patterns typical of real-world workloads. By treating the hash tree as an optimal prefix code problem (similar to Huffman coding), we can minimize the average verification path length for the most frequently accessed data.
DMTs employ a modified splaying mechanism to reorganize the tree dynamically. When a data block is identified as "hot," it is rotated toward the root, reducing the number of hashes required for subsequent verifications.
Key design features of DMTs include:
- Randomized Splaying: Splay operations are performed on only a small percentage of accesses (e.g., 1%) to keep management overhead low.
- Leaf-Only Data: The splay algorithm is constrained to ensure data blocks always remain at the leaves, preserving the security properties of the Merkle tree.
- Hotness Tracking: Internal nodes track access frequency to guide tree reorganization efficiently.
Performance and Scalability
We evaluated DMTs using synthetic Zipfian workloads and real-world traces from Alibaba Cloud and Filebench OLTP. DMTs consistently outperformed standard balanced trees, such as Linux's dm-verity. While balanced trees experienced a 75% performance drop when scaling from 16 MB to 4 TB, DMTs maintained high throughput by focusing computational resources on the "working set" of the application. On 4 TB volumes, DMTs achieved up to 2.2× higher throughput than static alternatives, delivering over 85% of the performance of a theoretical "optimal" tree.
Conclusion and Future Work
Dynamic Merkle Trees provide a scalable path forward for high-performance confidential storage. By adapting to workload skew, they mitigate the CPU bottleneck inherent in traditional hash trees. While DMTs introduce some metadata storage overhead due to the need for explicit pointers, the performance gains are substantial. Future research will investigate the use of higher-arity trees within the dynamic framework to further optimize the trade-off between tree depth and hashing complexity.
Summary updated