Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[common] Add encrypted-file-node-size slab into slab allocator
Allocating the file nodes (`file_node_t`) of Gramine's encrypted files can be one source of overhead for certain workloads (e.g., RocksDB compaction). To address this performance bottleneck, this commit introduces a new slab size (8288B, considering the alignment) tailored for the size of the file node (8235B) and therefore a new free list for 8256B blocks managed by the slab allocator. Additionally, one more slab size (~4KB) is added, to have proper powers-of-2 slab levels. Note that while this change can improve performance for certain memory allocation patterns, it introduces internal fragmentation and may also increase memory overhead and external fragmentation if the application rarely makes allocations of the file node size. However, our limited experiments did not show any issues. In addition, this commit fixes an issue where in-memory files are not zeroed out when resized. Signed-off-by: Kailun Qin <[email protected]>
- Loading branch information