Comments (10)
Yes, that would be great. I think the interface is simple enough to be implemented in memory.
from rain.
This may also include some overlapping work for #19 .
from rain.
This project might worth checking out: https://github.com/spf13/afero
from rain.
Another resource: https://benjamincongdon.me/blog/2021/01/21/A-Tour-of-Go-116s-iofs-package/
from rain.
from rain.
I would like to help on debugging the issue. Can you elaborate how it is being abused? Is it read or write cache that is being abused? What is the access pattern?
I'd like to give some information about the current state of the read cache.
Lines 146 to 153 in 4bda7a0
When a piece is requested from Rain, it assumes that the peer will request blocks from the same piece again. For that reason, Rain reads more than the actual requested block size. It divides the piece in larger blocks of size
ReadCacheBlockSize
and read all at once.
Example:
Let's assume that torrent piece size is 256K peer will request blocks in size of 16K.
0123456789ABCDEF
If ReadCacheBlockSize
is 128K (default value), from the perspective of read cache, torrent piece is divided to 128K blocks.
01234567 89ABCDEF
In ideal scenario, the peer starts requesting peers from the start in order. When the first block (0) is requested, Rain reads the range between 0 and 7 into memory and caches it. The following requests from 1 to 7 are served directly from cache without going to disk. For the next range between 8 and F, a second read is made from the disk.
from rain.
If peer requests pieces and blocks completely random, then the read cache will not be useful. If that is the case, you can try increasing ReadCacheSize
.
from rain.
I might give this a try, but I noticed that my disk problem was completely unrelated to this library, so feel free to close this ticket, or use it for reference.
from rain.
This issue is stale because it has been open for 30 days with no activity.
from rain.
This issue was closed because it has been inactive for 14 days since being marked as stale.
from rain.
Related Issues (20)
- Health check crashes while printing a log statement HOT 5
- Panic when tracker announce fail HOT 1
- Speed limit issue HOT 6
- Removed torrent directory after download HOT 1
- torrent_start.go:116 cannot listen port error HOT 14
- Why do you use a sstree instead of a key/value pair? HOT 3
- Status: Stopped: file allocation error HOT 4
- can i see how many total bytes was uploaded or transfered to another peer ? HOT 1
- Support binding to any port (for testing, 127.0.0.1) for acceptor HOT 2
- Feature request: each torrent may have different store location HOT 1
- Should add timeout for udp trackers in PeriodicalAnnouncer HOT 7
- remove or edit peer and tracker HOT 7
- Does this repo need go 1.18? HOT 1
- Support for BitComet Padding files HOT 1
- Improvement to 'console' HOT 2
- Exposing per-File data? HOT 10
- close of closed channel in peer.(*pex).close(...) HOT 4
- Logger in library mode HOT 3
- No ability to set custom headers for webseed client HOT 5
- seed off for whole torrent client ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rain.