[SOLVED] rClone move script leading to heavy load

Hi,

I use rClone 1.36 (not BETA) on a Debian8 CT. Also tested on dedicated servers, the same.
I wanted to test @Ajki script for the upload (thank you BTW!): https://github.com/ajkis/scripts/blob/master/rclone/rclone-upload.sh

Here’s my version:

#!/bin/bash
# RCLONE UPLOAD CRON TAB SCRIPT 
# Type crontab -e and add line below (without #)
# * * * * * /home/plex/scripts/rclone-upload.cron >/dev/null 2>&1

if pidof -o %PPID -x "rclone-upload.cron"; then
   exit 1
fi


LOG="/home/XXX/Logs/rclone-upload.log"
FROM="/home/XXX/Pre/"
TO="ACD_Enc:/"
EXC1="/PreFilms/**"
EXC2="/PreSeries/**"

# CHECK FOR FILES IN FROM FOLDER THAT ARE OLDER THAN 15 MINUTES
if find $FROM* -type f -mmin +20 | read
  then
  echo "$(date "+%d.%m.%Y %T") RCLONE UPLOAD STARTED" | tee -a $LOG

/usr/sbin/rclone move "$FROM" "$TO" -c -v --no-traverse --transfers=16 --checkers=32 --delete-after --exclude="$EXC1" --exclude="$EXC2" --min-age 20m --log-file="$LOG"
  echo "$(date "+%d.%m.%Y %T") RCLONE UPLOAD ENDED" | tee -a $LOG

Everything is fine for 10-15 minutes after CT/server upstart, I got about 10-12 connections to my cloud and then I got more and more processes/connections till the CT/servers load is too heavy I got to stop/reboot it.

Any idea on what’s going on? thank you

Those aren’t processes, but threads in htop which is totally normal.

You are moving 16 files at a time with transfers=16. If that’s too much, make it lower or lower the bandwidth.

I posted the htop info -> How many rclone mount sessions should my server be running?

Thanks but I still can’t understand that load: 138 249 180. As this CT is running rClone/script only (rTorrent stopped).

Because you are transferring 16 files, make that number lower. Try the default at 4 and work your way up or down.

I’ll go for that and get back to you.

Got it, the script runs too many times… this part didnt work.

That would do it too :slight_smile:

Glad you found that as well.

1 Like