-
Notifications
You must be signed in to change notification settings - Fork 15
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 automatic swap-to-disk support #60
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jpsamaroo
force-pushed
the
jps/storage
branch
2 times, most recently
from
January 3, 2022 18:55
5e68f45
to
a538811
Compare
This PR is basically good-to-go. I plan to test this with Dagger's |
I think this will need to change to avoid the implicit assumption that
|
16 tasks
jpsamaroo
force-pushed
the
jps/storage
branch
from
February 6, 2022 20:43
0175b60
to
b121cbb
Compare
jpsamaroo
force-pushed
the
jps/storage
branch
2 times, most recently
from
June 30, 2022 03:50
5c434f3
to
2410b06
Compare
Set Julia 1.7 lower-bound Add more `show` methods datastore: Split global datastore lock counters: Add datastore counter lock counters: Add send and recv datastore counters lock storage: Implement RCU for storage access storage: Thread `RefState` through methods storage: Make some operations lazy storage: Document design and internals LRUAllocator: Rename to SimpleRecencyAllocator SimpleRecencyAllocator: Add MRU support SimpleRecencyAllocator: Implement batched migration SimpleRecencyAllocator: Add locking for concurrent access SimpleRecencyAllocator: Cache `RefState`
krynju
approved these changes
Jun 30, 2022
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements support for "storage devices", which represent memory, disks, and storage manager algorithms that MemPool can leverage to perform automatic data management. We implement an
SimpleRecencyAllocator
device which, when assigned to one or moreDRef
s (via apoolset
kwarg), will manage migrating refs from memory to disk (or really between any two devices) as memory fills up, and from disk to memory as data is accessed viapoolget
.The
SimpleRecencyAllocator
isn't intended to be a perfect, all-encompassing storage manager; instead, it's a simple example of how to do memory management in this new scheme. Interested users are encouraged to implement their own storage devices and managers to suit their workload.This is also intended as a replacement for some of the logic in JuliaParallel/Dagger.jl#289. This PR should be better able to prevent in-memory data and files on disk from lingering for longer than they're needed, and should give a storage manager fine-grained control over data migration decisions. It doesn't currently integrate metrics about data migration speeds and data compression ratios (which Dagger would want to know), but we should be able to easily expose those metrics later on.
Todo:
SimpleRecencyAllocator
CPURAMDevice
andSerializationFileDevice
read_from_device
SerializationFileDevice
retain
alternative todestroyonevict
and test itBase.diskstats
if availableDetermine how to support aliased storage resourcesOut of scope for nowatexit
SerializationDiskDevice
for compression/encryption/etc.