-
I have set my cache-size-mb to 128 which would mean that transmission program would download the file to ram untill its size gets to 128 MiB and then it flushes that to disk, correct? I have some question about this. 1: 2: 3: I tested with a torrent and my ram size goes up when it starts to download. so far good. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 19 replies
-
Mostly yes, but
Correct. There's no time limit.
Should be, yes. I've never seen any issues with that. If there's an issue there, please file a bug report. Otherwise, if you're just asking because you're looking for best practices, exiting cleanly (instead of force-killing the process) should be enough. If you are feeling paranoid and want to be super-safe, you could stop the torrent before shutting down 😄
Per session, i.e. for all torrents together.
Most (all?) OSes don't immediately return freed memory back to the system for reuse; instead, they keep it around for the next time the app tries to allocate memory. The individual cache segments are freed inside the for loop in |
Beta Was this translation helpful? Give feedback.
-
No shade on either of you, it often feels like development help is needed outside of the Transmission devs for dev help. I totally understand @rezad1393 edge case, it's just that some of us, me too, wouldn't know how to set up a cron job, and depending on OS, how to configure anything correctly. |
Beta Was this translation helpful? Give feedback.
-
Just to clarify, is this used as download cache only, or for seeding torrents as well? For seeding torrents a larger cache makes sense, to reduce disk reads (e.g. lead if spin down/silent) while seeding. For downloads however (as mentioned above), I do not see the need for a larger additional cache (on top of native filesystem cache) at all. |
Beta Was this translation helpful? Give feedback.
-
Is this really enough these days when most people have 2GB of RAM or more, usually 8GB? |
Beta Was this translation helpful? Give feedback.
-
I think I saw something like that when I put the ram cache to a high enough value. I will test to see if it is still true. with new versions. |
Beta Was this translation helpful? Give feedback.
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
…