Skip to content
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

Segment fadvise #489

Merged
merged 3 commits into from
Dec 18, 2024
Merged

Segment fadvise #489

merged 3 commits into from
Dec 18, 2024

Conversation

kjnilsson
Copy link
Contributor

@kjnilsson kjnilsson commented Dec 18, 2024

Make segment fadvise option configurable.

It is not clear if random or normal is the better option for external read plan segment reads so this is now configurable.

This setting also affects segments opened for append as when the segment is full and is closed we perform an fadvise call. By default this is set to dont_need to ensure page cache data is reclaimed after a segment flush.

When closing the WAL we also set dont_need advise as this data is unlikely to ever be read again.

@kjnilsson kjnilsson marked this pull request as ready for review December 18, 2024 12:12
@kjnilsson kjnilsson added this to the 2.16.0 milestone Dec 18, 2024
Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

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

I tested this locally on rabbitmq/rabbitmq-server#12713 with:

perf-test -qq -u qq -x 1 -y 0 -c 1000 -s 4000 -ms -C 5000000

before (7406ed2):

$ free -wh
               total        used        free      shared     buffers       cache   available
Mem:           125Gi        10Gi        54Gi       1.2Gi       3.2Gi        60Gi       115Gi

after (ddfbec9):

$ free -wh
               total        used        free      shared     buffers       cache   available
Mem:           125Gi       9.9Gi        74Gi       1.2Gi       3.2Gi        40Gi       115Gi

🚀

@michaelklishin michaelklishin merged commit ece627a into main Dec 18, 2024
7 checks passed
@kjnilsson
Copy link
Contributor Author

I tested this locally on rabbitmq/rabbitmq-server#12713 with:

perf-test -qq -u qq -x 1 -y 0 -c 1000 -s 4000 -ms -C 5000000

before (7406ed2):

$ free -wh
               total        used        free      shared     buffers       cache   available
Mem:           125Gi        10Gi        54Gi       1.2Gi       3.2Gi        60Gi       115Gi

after (ddfbec9):

$ free -wh
               total        used        free      shared     buffers       cache   available
Mem:           125Gi       9.9Gi        74Gi       1.2Gi       3.2Gi        40Gi       115Gi

🚀

thanks! what kind of machine do you have with 126Gi RAM?

@the-mikedavis
Copy link
Member

It's a custom-built desktop, I went a little overboard on the memory 😅

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.

3 participants