Skip to content

questions about the ram cache #2400

Answered by ckerr
rezad1393 asked this question in Q&A
Jan 15, 2022 · 6 comments · 19 replies
Discussion options

You must be logged in to vote

I have set my cache-size-mb to 128 which would mean that transmission program would download the file to ram until its size gets to 128 MiB and then it flushes that to disk, correct?

Mostly yes, but

  • When the upper limit is reached, it doesn't flush the entire cache to disk. Rather, it flushes just enough to get the content under the limit again. It's been a long time since I wrote this code but IIRC this gave better overall performance since parts of the torrent often arrive out-of-order.

  • When the torrent becomes complete, anything in the cache for that torrent is flushed. This is because we close the write file handle to the file before (possibly) renaming it, e.g. removing the .part

Replies: 6 comments 19 replies

Comment options

You must be logged in to vote
3 replies
@rezad1393
Comment options

@ckerr
Comment options

@MichaIng
Comment options

Answer selected by ckerr
Comment options

You must be logged in to vote
5 replies
@ckerr
Comment options

@rezad1393
Comment options

@ckerr
Comment options

@rezad1393
Comment options

@ckerr
Comment options

Comment options

You must be logged in to vote
2 replies
@ckerr
Comment options

@MichaIng
Comment options

Comment options

You must be logged in to vote
1 reply
@MichaIng
Comment options

Comment options

You must be logged in to vote
7 replies
@andreygursky
Comment options

@andreygursky
Comment options

@MichaIng
Comment options

@andreygursky
Comment options

@MichaIng
Comment options

Comment options

You must be logged in to vote
1 reply
@rezad1393
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants
Converted from issue

This discussion was converted from issue #2398 on January 15, 2022 11:29.