Skip to content

[upstream] extend the memory tier config to work with NUMA bindings and add tests #49

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

Closed
wants to merge 92 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
160bb77
Updating submodules
Feb 16, 2023
ba8d6b0
Updating submodules
Feb 16, 2023
ba9dd68
Change some of the stats to rate
Feb 17, 2023
ad8bfd6
Updating submodules
Feb 17, 2023
bdad762
Updating submodules
Feb 18, 2023
b42327a
Updating submodules
Feb 19, 2023
0d49b53
Updating submodules
Feb 20, 2023
bb2d1c6
Updating submodules
Feb 21, 2023
c167a83
Updating submodules
Feb 21, 2023
32ed439
Return replacedPtr from InsertOrReplace API
Feb 21, 2023
dd0af61
Updating submodules
Feb 21, 2023
cce19ea
Updating submodules
Feb 22, 2023
6357906
Pin fmt version at 8.0.1 (#196)
wonglkd Feb 24, 2023
a925737
KVReplayGenerator: parse GET_LEASE and SET_LEASE operations
Feb 25, 2023
f7e13a4
Update @braintree/sanitize-url version
Feb 27, 2023
70ff91f
Add missing numa deps for fedora, rocky, arch (#197)
wonglkd Feb 27, 2023
6ad7a31
fbcode/cachelib/allocator/datastruct/serialize
Feb 27, 2023
df5b9f6
Run Github Actions on pull requests (#198)
wonglkd Feb 28, 2023
e8151ad
Add a custom deleter class to access the Item Handle
Feb 28, 2023
9827818
fix flaky tests in NvmCacheTests
Feb 28, 2023
9447a8a
Added PM9A3 support for Cachebench Write Bytes Calculations
Mar 1, 2023
293118b
Fix XDCHECK regression in lambda for gcc-8.x (#201)
wonglkd Mar 1, 2023
f853a42
Get or update object TTL via object shared_ptr
Mar 1, 2023
c120a53
Remove isWriteHandle() API
Mar 2, 2023
7785d24
Edit Cachebench_FB_HW_eval.md using inpage editor
Mar 2, 2023
185bbe6
Fix Debian GitHub build & zstd CMake error (#200)
wonglkd Mar 2, 2023
968533f
fix broken installation page link
Mar 3, 2023
496ed37
fix another broken installation page link in index.js
Mar 3, 2023
67d2d8b
temporarily disable PackIt (#205)
michel-slm Mar 5, 2023
115732a
Edit Overview_A_random_walk_down_the_Cache_Library.md using inpage ed…
Mar 6, 2023
17bdc18
fbcode/cachelib/experimental/objcache2/persistence
Mar 7, 2023
e679b72
README.md: added build status badges to main README.md
Mar 7, 2023
43a7ce3
Fix Bug in ItemValue handling in CacheBench
Mar 8, 2023
872d61a
fbcode/cachelib/benchmarks
Mar 9, 2023
ffa5470
fbcode/cachelib/allocator/datastruct/tests
Mar 9, 2023
1031b13
fbcode/cachelib/experimental/objcache2/tests
Mar 9, 2023
d92910b
fbcode/cachelib/experimental/objcache/tests
Mar 9, 2023
1e05a16
fbcode/cachelib/navy/serialization
Mar 9, 2023
0bc9f66
Introduce 'markedForEviction' state for the Item. (#183)
igchor Mar 9, 2023
0bdb935
fbcode/cachelib/allocator/serialize
Mar 9, 2023
99a05d3
fbcode/cachelib/experimental/objcache
Mar 9, 2023
d1ff29c
fbcode/cachelib/
Mar 10, 2023
3a8d8b4
Add extra notes for object-cache find APIs
Mar 13, 2023
e0350ff
Updating submodules
Mar 16, 2023
8b98b6e
added PoolRebalancer stats for the loop
Mar 16, 2023
c90dd1d
WorkloadGenerator: fixed a bug in scaling key popularity distribution
Mar 16, 2023
ecc68cb
Updating submodules
Mar 16, 2023
81e8547
Updating submodules
Mar 17, 2023
29258e1
RebalanceStrategy: do not expose constructor with Type as public
Mar 17, 2023
5e7fb72
Updating submodules
Mar 17, 2023
e3c33c3
Updating submodules
Mar 18, 2023
b4a4f76
RebalanceStrategy: removed duplicated calls to getPoolStats()
Mar 18, 2023
66874ab
PoolRebalancer: add an option to disable waking up PoolRebalancer on …
Mar 18, 2023
5e58f07
Updating submodules
Mar 18, 2023
aad47e6
Updating submodules
Mar 18, 2023
63ee3ff
Updating submodules
Mar 19, 2023
ec46b29
Updating submodules
Mar 20, 2023
4096277
Updating submodules
Mar 21, 2023
b0ed11a
remove rust readonly bindings
markbt Mar 21, 2023
31805c4
rust: fix potential integer truncation for oversized cache allocations
markbt Mar 21, 2023
58fd7bf
rust: add type alias for LruAllocator
markbt Mar 21, 2023
8dc9c54
Updating submodules
Mar 21, 2023
f491583
Update CachelibWrapperTest for RocksDB 8.1.0
pdillinger Mar 21, 2023
c8b48b1
Updating submodules
Mar 21, 2023
bdb1fc6
Updating submodules
Mar 22, 2023
02ef4a1
properly support a file-backed nvm cache
Mar 22, 2023
bc4f809
Updating submodules
Mar 22, 2023
eddfed0
Updating submodules
Mar 23, 2023
4e24c25
Updating submodules
Mar 24, 2023
de66749
Updating submodules
Mar 25, 2023
3c58438
Updating submodules
Mar 26, 2023
d0ec6c7
cachelib_0
Mar 26, 2023
4388290
Updating submodules
Mar 27, 2023
1503943
Updating submodules
Mar 28, 2023
f373e23
Updating submodules
Mar 28, 2023
22d3fe6
Track object size for mutated objects
Mar 28, 2023
6934e0c
Updating submodules
Mar 28, 2023
9103a54
Updating submodules
Mar 29, 2023
8a62373
Updating submodules
Mar 29, 2023
7886d6d
Updating submodules
Mar 29, 2023
4f917bb
Updating submodules
Mar 30, 2023
dd5a1fd
Updating submodules
Mar 31, 2023
b65597e
Updating submodules
Apr 1, 2023
26f4c32
Updating submodules
Apr 2, 2023
a1df8cd
Updating submodules
Apr 3, 2023
206a49e
Updating submodules
Apr 3, 2023
aeb15c3
Make the user-configured entries limit the hard upper bound
Apr 3, 2023
f24408d
Updating submodules
Apr 3, 2023
6ca670a
Updating submodules
Apr 3, 2023
e4d1a9d
Enable enableFastNegativeLookups by default
Apr 3, 2023
db52315
Updating submodules
Apr 3, 2023
aab34a6
- Add memory tier configs to cache allocator based on NUMA bindings
byrnedj Jan 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-cachelib-centos-8-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
name: build-cachelib-centos-8-1
on:
# push:
pull_request:
schedule:
- cron: '0 11 * * 1,3,5'
jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-cachelib-centos-8-5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
name: build-cachelib-centos-8.5
on:
# push:
pull_request:
schedule:
- cron: '0 9 * * *'
jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-cachelib-debian-10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
name: build-cachelib-debian-10
on:
# push:
pull_request:
schedule:
- cron: '0 13 * * *'
jobs:
Expand Down Expand Up @@ -51,6 +52,9 @@ jobs:
g++ - || true
- name: "checkout sources"
uses: actions/checkout@v2
- name: "Add Git safe directory"
# Workaround for Docker image bug (GitHub issue #199).
run: git config --system --add safe.directory $GITHUB_WORKSPACE
- name: "Install Prerequisites"
run: ./contrib/build.sh -S -B
- name: "Test: update-submodules"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-cachelib-fedora-36.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
name: build-cachelib-fedora-36
on:
# push:
pull_request:
schedule:
- cron: '0 19 * * *'
jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-cachelib-rockylinux-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
name: build-cachelib-rockylinux-8.6
on:
# push:
pull_request:
schedule:
- cron: '0 15 * * 2,4,6'
jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-cachelib-rockylinux-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
name: build-cachelib-rockylinux-9.0
on:
# push:
pull_request:
schedule:
- cron: '0 17 * * *'
jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-cachelib-ubuntu-18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
name: build-cachelib-ubuntu-18
on:
# push:
pull_request:
schedule:
- cron: '0 5 * * 2,4,6'
jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-cachelib-ubuntu-20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
name: build-cachelib-ubuntu-20
on:
# push:
pull_request:
schedule:
- cron: '0 5 * * 1,3,5'
jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-cachelib-ubuntu-22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
name: build-cachelib-ubuntu-22
on:
# push:
pull_request:
schedule:
- cron: '0 7 * * *'
jobs:
Expand Down
25 changes: 0 additions & 25 deletions .packit.yaml

This file was deleted.

17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ cd CacheLib
Re-running `./contrib/build.sh` will update CacheLib and its dependencies
to their latest versions and rebuild them.

See [build](https://cachelib.org/docs/installation/installation) for more details about
See [build](https://cachelib.org/docs/installation/) for more details about
the building and installation process.


Expand All @@ -77,3 +77,18 @@ https://www.facebook.com/whitehat

Facebook's security team will triage your report and determine whether or not is
it eligible for a bounty under our program.


## Build status

Clicking on a badge will show you the recent builds for that OS. If your target OS's build is failing, you may wish to check recent issues and PRs for known workarounds.

- [![CentOS 8.1](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-centos-8-1.yml/badge.svg?event=schedule)](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-centos-8-1.yml?query=event%3Aschedule)
- [![CentOS 8.5](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-centos-8-5.yml/badge.svg?event=schedule)](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-centos-8-5.yml?query=event%3Aschedule)
- [![Debian 10](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-debian-10.yml/badge.svg?event=schedule)](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-debian-10.yml?query=event%3Aschedule)
- [![Fedora 36](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-fedora-36.yml/badge.svg?event=schedule)](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-fedora-36.yml?query=event%3Aschedule)
- [![Rocky Linux 8](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-rockylinux-8.yml/badge.svg?event=schedule)](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-rockylinux-8.yml?query=event%3Aschedule)
- [![Rocky Linux 9](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-rockylinux-9.yml/badge.svg?event=schedule)](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-rockylinux-9.yml?query=event%3Aschedule)
- [![Ubuntu 18](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-ubuntu-18.yml/badge.svg?event=schedule)](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-ubuntu-18.yml?query=event%3Aschedule)
- [![Ubuntu 20](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-ubuntu-20.yml/badge.svg?event=schedule)](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-ubuntu-20.yml?query=event%3Aschedule)
- [![Ubuntu 22](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-ubuntu-22.yml/badge.svg?event=schedule)](https://github.com/facebook/cachelib/actions/workflows/build-cachelib-ubuntu-22.yml?query=event%3Aschedule)
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ class CachelibWrapperTest : public ::testing::Test {
}
#endif

#if ROCKSDB_MAJOR > 8 || (ROCKSDB_MAJOR == 8 && ROCKSDB_MINOR >= 1)
static Cache::CacheItemHelper helper_no_secondary_;
#endif

static Cache::CacheItemHelper helper_;

static Status SaveToCallbackFail(void* /*obj*/,
Expand Down Expand Up @@ -191,13 +195,23 @@ class CachelibWrapperTest : public ::testing::Test {
std::string path_;
};

#if ROCKSDB_MAJOR > 8 || (ROCKSDB_MAJOR == 8 && ROCKSDB_MINOR >= 1)
Cache::CacheItemHelper CachelibWrapperTest::helper_no_secondary_(
CacheEntryRole::kMisc, CachelibWrapperTest::DeletionCallback);
#endif

Cache::CacheItemHelper CachelibWrapperTest::helper_(
#if ROCKSDB_MAJOR > 7 || (ROCKSDB_MAJOR == 7 && ROCKSDB_MINOR >= 10)
CacheEntryRole::kMisc,
CachelibWrapperTest::DeletionCallback,
CachelibWrapperTest::SizeCallback,
CachelibWrapperTest::SaveToCallback,
#if ROCKSDB_MAJOR > 8 || (ROCKSDB_MAJOR == 8 && ROCKSDB_MINOR >= 1)
CachelibWrapperTest::CreateCallback,
&CachelibWrapperTest::helper_no_secondary_);
#else
CachelibWrapperTest::CreateCallback);
#endif
#else
CachelibWrapperTest::SizeCallback,
CachelibWrapperTest::SaveToCallback,
Expand All @@ -210,7 +224,12 @@ Cache::CacheItemHelper CachelibWrapperTest::helper_fail_(
CachelibWrapperTest::DeletionCallback,
CachelibWrapperTest::SizeCallback,
CachelibWrapperTest::SaveToCallbackFail,
#if ROCKSDB_MAJOR > 8 || (ROCKSDB_MAJOR == 8 && ROCKSDB_MINOR >= 1)
CachelibWrapperTest::CreateCallback,
&CachelibWrapperTest::helper_no_secondary_);
#else
CachelibWrapperTest::CreateCallback);
#endif
#else
CachelibWrapperTest::SizeCallback,
CachelibWrapperTest::SaveToCallbackFail,
Expand Down
2 changes: 2 additions & 0 deletions cachelib/allocator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ if (BUILD_TESTS)
add_test (tests/ChainedHashTest.cpp)
add_test (tests/AllocatorResizeTypeTest.cpp)
add_test (tests/AllocatorHitStatsTypeTest.cpp)
add_test (tests/AllocatorMemoryTiersTest.cpp)
add_test (tests/MemoryTiersTest.cpp)
add_test (tests/MultiAllocatorTest.cpp)
add_test (tests/NvmAdmissionPolicyTest.cpp)
add_test (tests/CacheAllocatorConfigTest.cpp)
Expand Down
19 changes: 19 additions & 0 deletions cachelib/allocator/Cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,25 @@ void CacheBase::updateGlobalCacheStats(const std::string& statPrefix) const {
counters_.updateDelta(statPrefix + "reaper.skipped_slabs",
stats.numReaperSkippedSlabs);

counters_.updateDelta(statPrefix + "rebalancer.runs",
stats.rebalancerStats.numRuns);
counters_.updateDelta(statPrefix + "rebalancer.rebalanced_slabs",
stats.rebalancerStats.numRebalancedSlabs);
counters_.updateCount(statPrefix + "rebalancer.latency.loop_last_ms",
stats.rebalancerStats.lastRebalanceTimeMs);
counters_.updateCount(statPrefix + "rebalancer.latency.loop_avg_ms",
stats.rebalancerStats.avgRebalanceTimeMs);

counters_.updateCount(statPrefix + "rebalancer.latency.release_last_ms",
stats.rebalancerStats.lastReleaseTimeMs);
counters_.updateCount(statPrefix + "rebalancer.latency.release_avg_ms",
stats.rebalancerStats.avgReleaseTimeMs);

counters_.updateCount(statPrefix + "rebalancer.latency.pick_last_ms",
stats.rebalancerStats.lastPickTimeMs);
counters_.updateCount(statPrefix + "rebalancer.latency.pick_avg_ms",
stats.rebalancerStats.avgPickTimeMs);

const auto slabReleaseStats = getSlabReleaseStats();
counters_.updateDelta(statPrefix + "slabs.rebalancer_runs",
slabReleaseStats.numSlabReleaseForRebalanceAttempts);
Expand Down
Loading