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

Is the max DRAM cache size 256GB? And how to make it larger? #193

Closed
sunnyszy opened this issue Feb 15, 2023 · 2 comments
Closed

Is the max DRAM cache size 256GB? And how to make it larger? #193

sunnyszy opened this issue Feb 15, 2023 · 2 comments

Comments

@sunnyszy
Copy link

Hi,

I'm working on a cache configuration project, and I would like to configure CacheLib with ~700GiB of DRAM.

  • I believe the current code has a max DRAM size limitation. The fixed 4MB slab and the max number of slabs (I believe is 65535) make the max DRAM size 256GB. Is there true?
  • If so, is there any easy way you can recommend to lift this limit?
@haowu14
Copy link
Contributor

haowu14 commented Feb 15, 2023

It is true that the maximum DRAM size of cachelib supported is 256GB. Explained https://github.com/facebook/CacheLib/blob/main/cachelib/allocator/memory/CompressedPtr.h#L35.

What's your workload like? One way is to create multiple cachelibs and have each of them handle different allocation sizes.

We want to use 32 bits to address every allocation in the slab space with the smallest addressible allocation being 64 bytes, we have 256GB. If you want to address more than this, you can make the smallest addressible allocation larger by changing https://github.com/facebook/CacheLib/blob/main/cachelib/allocator/memory/Slab.h#L81.

But I think creating multiple cachelibs may be easier.

@sunnyszy
Copy link
Author

Thanks for the quick response!

My workload is a video streaming request trace. Each object is pretty large (~MB), so it is easier for me to increase the smallest addressable allocation.

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

No branches or pull requests

2 participants