Skip to content

Update default object store page size to 4k #1195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 10, 2025
Merged

Conversation

badrishc
Copy link
Collaborator

@badrishc badrishc commented May 9, 2025

Update default object store page size to 4k. See discussion here: #1097 (comment) and the documentation here: https://microsoft.github.io/garnet/docs/getting-started/memory#log-size-object-store

Default object store page size of 1m is way too large, as memory is reclaimed in chunks of page-worth of objects. This PR will allow the ObjectStoreHeapMemorySize setting to reclaim heap space in reasonable granularity (around 170 objects at a time).

10::50::31 info: Options[0] [Object Store] Using page size of 4k
10::50::31 info: Options[0] [Object Store] Each page can hold ~170 key-value pairs of objects
10::50::31 info: Options[0] [Object Store] Using log memory size of 32m
10::50::31 info: Options[0] [Object Store] This can hold ~1398101 key-value pairs of objects in memory total
10::50::31 info: Options[0] [Object Store] There are 8k log pages in memory

@Copilot Copilot AI review requested due to automatic review settings May 9, 2025 17:52
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the default object store page size from "1m" to "4k" to allow for more granular memory reclamation.

  • Updated the default page size in the server options.
  • Updated the default configuration file accordingly.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
libs/server/Servers/GarnetServerOptions.cs Default object store page size updated from "1m" to "4k".
libs/host/defaults.conf Default configuration updated to reflect the new page size "4k".

@badrishc badrishc merged commit 1b9a174 into main May 10, 2025
94 of 95 checks passed
@badrishc badrishc deleted the badrishc/obj-page-size-4k branch May 10, 2025 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants