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

Add support for FFMA without hugepages and using only mmap #296

Merged
merged 32 commits into from
Apr 2, 2023

Conversation

danielealbano
Copy link
Owner

This branch adds support for Fast Fixed Memory Allocator (FFMA) to function without hugepages and using only mmap.

Overall, it makes FFMA more versatile by allowing it to work without hugepages and with only mmap, which can improve its performance and efficiency in certain scenarios, but most importantly as FFMA doesn't suffer from memory fragmentation makes it a perfect choice for a long-running software like cachegrand as reduce the scope of any garbage collector that will be implemented down the line.

The only downside, currently, is that the storage_db has to operate using blocks of 64kb and this limits the maximum size of the chunks to about ~170MB of data.

This limitation will be removed with a future PR.

There are also some additional PRs planned to make FFMA less dependant on malloc and rely instead on mmap for its own internal allocations.

…che, also add support for mmap direct allocations
…fy the test to use a 160MB string instead of 256MB
@danielealbano danielealbano added the enhancement New feature or request label Apr 2, 2023
@danielealbano danielealbano added this to the v0.2 milestone Apr 2, 2023
@danielealbano danielealbano enabled auto-merge (squash) April 2, 2023 21:23
@codecov
Copy link

codecov bot commented Apr 2, 2023

Codecov Report

Patch coverage: 87.86% and project coverage change: -0.02 ⚠️

Comparison is base (d0202e2) 81.71% compared to head (1584935) 81.70%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #296      +/-   ##
==========================================
- Coverage   81.71%   81.70%   -0.02%     
==========================================
  Files         161      163       +2     
  Lines       11009    11031      +22     
==========================================
+ Hits         8996     9012      +16     
- Misses       2013     2019       +6     
Flag Coverage Δ
unittests 81.70% <87.86%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rc/module/redis/command/module_redis_command_get.c 100.00% <ø> (ø)
...module/redis/command/module_redis_command_getdel.c 88.00% <ø> (ø)
.../module/redis/command/module_redis_command_getex.c 91.23% <ø> (ø)
...dule/redis/command/module_redis_command_getrange.c 93.10% <ø> (ø)
...module/redis/command/module_redis_command_getset.c 78.57% <ø> (ø)
...c/module/redis/command/module_redis_command_mget.c 81.25% <ø> (ø)
...module/redis/command/module_redis_command_rename.c 88.37% <ø> (ø)
...dule/redis/command/module_redis_command_renamenx.c 89.13% <ø> (ø)
...rc/module/redis/command/module_redis_command_set.c 88.61% <ø> (ø)
.../module/redis/command/module_redis_command_setex.c 89.47% <ø> (ø)
... and 9 more

... and 3 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@danielealbano danielealbano merged commit 3f422b9 into main Apr 2, 2023
@danielealbano danielealbano deleted the impl-ffma-support-no-hugepages branch April 2, 2023 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant