Skip to content

Change standard slog buffer allocation from pre-allocated to on-demand #999

Description

@hnwyllmm

Description

Currently, ObStorageLoggerManager unconditionally pre-allocates 128 standard slog buffers during startup, each sized at 8KB. This results in the consumption of over 1MB of StorageLoggerM memory, even when no slog writing is actually occurring.

The goal is to change this "standard log buffer pool" to an on-demand allocation model:

  • At startup, do not pre-allocate the 128 buffers.
  • Only retain the maximum concurrency limit (MAX_CONCURRENT_ITEM_CNT=128) and the necessary management structures.
  • Allocate a standard buffer only when a slog write operation actually requires one.
  • Ensure the following characteristics remain unchanged:
    • The 8KB standard buffer size.
    • Alignment requirements.
    • The maximum concurrency limit.
    • The semantics for buffer reuse and release.
    • The behavior of the OB_SLOG_REACH_MAX_CONCURRENCY error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions