I've written a bash script that takes media from my mobile phone via webdav mount and DSLR sd card via usb connection and puts it in my ~/Pictures and ~/Video directories.
I'm using rsync to move the files (--remove-source-files) to my home directory and then I use find to find the specific files I need to process and then I'm running exiftool on each to put them where I want them (dated directories, sub-directories from tags, etc). I copy them to one directory and then move them to a similarly structured backup drive which is samba mounted.
$ free -h
total used free shared buff/cache available
Mem: 31Gi 6.6Gi 324Mi 253Mi 24Gi 24Gi
Swap: 15Gi 1.9Gi 14Gi
This process starts off fast but slows down quickly and dramatically.
What is the proper way to accomplish this task that won't use up so much buff/cache or clears it out more often within the process?
I've found many references to use nocache but I have not been able to use this solution.
I have found that doing sync; echo 3 > /proc/sys/vm/drop_caches before and after the script helps but depending on how much I'm moving, the cache still fills up.
Here is something that looks promising but I haven't tried it yet. https://access.redhat.com/solutions/5652631
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.