dynamically adjust readahead, for nearly sequential download

This commit is contained in:
h31p
2019-11-12 21:40:16 +02:00
parent 72c5ac7031
commit c298ce2eb2
2 changed files with 20 additions and 1 deletions

View File

@@ -211,3 +211,10 @@ func (c *Cache) ReadersLen() int {
}
return len(c.readers)
}
func (c *Cache) AdjustRA(readahead int64) {
for r, _ := range c.readers {
r.SetReadahead(readahead)
}
}