I was hoping to reduce some disk thrashing with my downloads.
My system (ubuntu) has ~8GB of ram and uses nearly non of it. Of course the verify, repair, and extraction all take up a lot of IO cycles.
The majority of my downloads are <2GB but I do have the occasional 10GB+ download.
So I would like to make a pre-process script which if the DL was <=2GB it would use a temp folder that is a ramdisk (tmpfs of ~3GB). Anything greater than that would then IO to the normal hard disk. This would reduce any disk action to only the extraction (greatly speeding up all the other actions).
The input parameter #6 is the size in bytes so that makes the process easy to start. But I am confused on how to get SAB to put certain downloads into different temp folders.
My inkling is to take the name of the NZB (which would be the resulting tmp folder name) and create a symlink to the tmpfs. Then when it write to Downloads/incomplete/New_NZB/ -> /tmpfs/New_NZB/
I think I might run into issues with SAB incrementing New_NZB.1
Code: Select all
if [$6 -gt 2000000000] then ln -s /tmpfs/$1 Downloads/incomplete/$1 fi
Any suggestions on how to make this a bit more elegant?