-
I was wondering if it is possible to have any data that comes through which is normally written to disk to only be held in ram or a specific path (like a ramdisk or a disk in which i/o is less of a concern)? I already use DataDir but there is still disk operations happening with something like writeChunk right? So for example I don't want it to touch my hdd/ssd and to let any of the piece data go to my sys ram or gpu ram mounted as a local disk before it passes the rest to DataDir unless I misunderstood it. I'm just trying to prevent as much local disk activity as possible. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, this is possible by creating your own Storage implementation. In particular, in https://pkg.go.dev/github.com/anacrolix/[email protected]/storage#PieceImpl, if you handle writes to an in memory buffer that you manage, and then when the client is ready to mark data as complete with MarkComplete, you can ship it off to cloud storage/write it to disk (whether mounted from cloud or not, all good). |
Beta Was this translation helpful? Give feedback.
Yes, this is possible by creating your own Storage implementation. In particular, in https://pkg.go.dev/github.com/anacrolix/[email protected]/storage#PieceImpl, if you handle writes to an in memory buffer that you manage, and then when the client is ready to mark data as complete with MarkComplete, you can ship it off to cloud storage/write it to disk (whether mounted from cloud or not, all good).