From b71ffc5560e6d5cea6942d75a5aad491eca0fcb6 Mon Sep 17 00:00:00 2001 From: SF-Zhou Date: Wed, 12 Mar 2025 13:49:07 +0800 Subject: [PATCH] Modify the direct io align size to 4K (#158) Co-authored-by: dev --- src/fbs/storage/Common.h | 2 +- src/storage/chunk_engine/src/utils/aligned.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fbs/storage/Common.h b/src/fbs/storage/Common.h index 147ac54..c507513 100644 --- a/src/fbs/storage/Common.h +++ b/src/fbs/storage/Common.h @@ -77,7 +77,7 @@ enum class FeatureFlags : uint32_t { ALLOW_READ_UNCOMMITTED = 8, }; -constexpr auto kAIOAlignSize = 512ul; +constexpr auto kAIOAlignSize = 4096ul; class ChunkId { public: diff --git a/src/storage/chunk_engine/src/utils/aligned.rs b/src/storage/chunk_engine/src/utils/aligned.rs index e47ffcf..3a58555 100644 --- a/src/storage/chunk_engine/src/utils/aligned.rs +++ b/src/storage/chunk_engine/src/utils/aligned.rs @@ -1,7 +1,7 @@ use super::super::Size; use std::alloc::Layout; -pub const ALIGN_SIZE: Size = Size::new(512); +pub const ALIGN_SIZE: Size = Size::new(4096); pub struct AlignedBuffer(&'static mut [u8]);