Remix.run Logo
yoavm 4 hours ago

You configure Levin to "always leave 2GB available". Levin checks the available diskspace using a simple statvfs call, deducts 2GB, and sees that as its budget. It then checks your diskspace every minute (more or less, depending on the device) to see if anything changes. If more free space is suddenly available, it will download more content. If there's less than 2GB available, it will immediately start deleting its own files until 2GB are free.

filleduchaos 2 hours ago | parent | next [-]

Out of curiosity, how much RAM do you have and have you tested this on a computer that does not have as much?

Asking because this sounds like a mini-disaster in the making with e.g. macOS' swap and a device with 16GB or even 8GB of RAM.

yoavm 2 hours ago | parent [-]

I'm not sure why you're concerned about RAM; the numbers I mentioned are all relating to diskspace. It doesn't take much RAM at all to run a torrent client daemon. FWIW it runs without any noticeable effects on my OnePlus 6 from 2018.

kortilla an hour ago | parent [-]

swap consumes disk. Commenter was talking about a scenario where swap dynamically filling and emptying space on the disk would make your software thrash

throw10920 4 hours ago | parent | prev [-]

That's a neat hack, thank you for sharing.