High Load Averages --- SSH USERS TAKE NOTE

I am using ssh and an rsync script I wrote to incrementally back up my three Win7 computer drives nightly.

I am concerned that my MyCloud ‘top’ load averages start out at about 5 when my backup starts and gradually increase to over 25 by the time my third drive finishes.

Wait time seems very high. Free mem and swap seem OK.

Is there anything I can do to get my load averages down?

MyHomeCloud:~# top -b -n 1 | awk '{if (NR <=7) print; else if ($8 == "D") {print; count++} } END {print "Total status D: "count}'
top - 16:19:42 up  6:36,  1 user,  load average: 19.75, 20.16, 17.41
Tasks: 104 total,   1 running, 103 sleeping,   0 stopped,   0 zombie
%Cpu(s):  2.0 us,  5.1 sy,  0.3 ni, 37.1 id, 54.5 wa,  0.0 hi,  1.0 si,  0.0 st
KiB Mem:    232320 total,   184576 used,    47744 free,     7296 buffers
KiB Swap:   500672 total,   197312 used,   303360 free,     3392 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
 6920 root      20   0  846m 2048  640 D   5.2  0.9   1:04.08 restsdk-server
15285 root      20   0  5504 2112  576 D   5.2  0.9   1:01.77 rsync
    3 root      20   0     0    0    0 D   0.0  0.0   0:00.00 cpu1_hotplug_th
  293 root      20   0     0    0    0 D   0.0  0.0   2:30.65 kswapd0
  393 root      -2   0     0    0    0 D   0.0  0.0   0:07.91 btn_t
 2474 root      20   0     0    0    0 D   0.0  0.0   1:11.80 pfe_ctrl_timer
 4700 root      20   0 56128  256    0 D   0.0  0.1   0:10.59 apache2
14551 root      39  19  6080    0    0 D   0.0  0.0   0:59.66 du
15282 root      20   0 12736  576   64 D   0.0  0.2   0:09.94 sshd
15290 root      20   0 43584 2752  512 D   0.0  1.2   0:25.38 rsync
15821 www-data  20   0 63040   64   64 D   0.0  0.0   0:02.70 apache2
15825 www-data  20   0 62976   64   64 D   0.0  0.0   0:02.73 apache2
15827 www-data  20   0 63040  128  128 D   0.0  0.1   0:03.09 apache2
15829 www-data  20   0 63040  192  128 D   0.0  0.1   0:02.32 apache2
15832 www-data  20   0 63040  640  192 D   0.0  0.3   0:02.36 apache2
15835 www-data  20   0 63040  832  256 D   0.0  0.4   0:02.55 apache2
15842 www-data  20   0 63040  448  192 D   0.0  0.2   0:02.44 apache2
15844 www-data  20   0 63040  384  192 D   0.0  0.2   0:02.40 apache2
15847 www-data  20   0 63040  192    0 D   0.0  0.1   0:02.30 apache2
15914 www-data  20   0 61568  576  192 D   0.0  0.2   0:00.76 apache2
Total status D: 20
MyHomeCloud:~#

So last night I was taking a break and started reading Robert_England’s sad but hilarious exploits in this thread and if it matters I do NOT think he is a troll.

And I came across the fact that people are stopping the restsdk-server to try to fix sleeping issues. Since it was at the top of my ‘top’ list I figured why not try it. I had already stopped a couple of wd… services but hesitated on restsdk-server as wd did not seem take ‘ownership’ of it with a wd prefix :).

Anyway with restsdk-server stopped my max loads stay in the 10ish area and my incremental backup times went from about 2 hours down to 1/2 hour.

Got our MyClouds about a month ago and have been literally working full time to be able to use them as a remote backup location ever since. Fortunately I am not afraid of delving into the muck but I can see Roberts point of view. It should work better right out of the box, or at least have better apps and documentation and more configuration access to turning off low level features not needed for certain uses.

I have overcome almost every issue, including a corrupted file system (that was a true nightmare trying to umount the file sytem so that it could be repaired. That story here). I have a true LOVE/HATE relationship with these units. Right now I am back on the love side.

Here is my script code that makes sure these services are off whenever I backup if anyone is interested (modify accordingly):

# turn off indexing type services ??? on MYCLOUD
ssh -p "${Sshport}" "${User}@${Dest}" "/etc/rc2.d/S20restsdk-serverd stop" >> "$Runsumfile"
Thiserror="$?"
errorcheck
ssh -p "${Sshport}" "${User}@${Dest}" "/etc/init.d/wdmcserverd stop" >> "$Runsumfile"
Thiserror="$?"
errorcheck
ssh -p "${Sshport}" "${User}@${Dest}" "/etc/init.d/wdphotodbmergerd stop" >> "$Runsumfile"
Thiserror="$?"
errorcheck

OR this version which logs their status and then only turns them OFF if they are ON:

# turn off indexing type services ??? on MYCLOUD
ssh -p "${Sshport}" "${User}@${Dest}" "/etc/rc2.d/S20restsdk-serverd status" | tee -a "$Runsumfile"
if (( PIPESTATUS[0] == 0 )); then #if it is running
    ssh -p "${Sshport}" "${User}@${Dest}" "/etc/rc2.d/S20restsdk-serverd stop" | tee -a "$Runsumfile"
    Thiserror="${PIPESTATUS[0]}"
    errorcheck
    echo "Stopped restsdk-server" | tee "$Runsumfile"
fi

ssh -p "${Sshport}" "${User}@${Dest}" "/etc/init.d/wdmcserverd status" | tee -a "$Runsumfile"
if (( PIPESTATUS[0] == 0 )); then #if it is running
    ssh -p "${Sshport}" "${User}@${Dest}" "/etc/init.d/wdmcserverd stop" | tee -a "$Runsumfile"
    Thiserror="${PIPESTATUS[0]}"
    errorcheck
    echo "Stopped wdmcserverd" | tee "$Runsumfile"
fi

ssh -p "${Sshport}" "${User}@${Dest}" "/etc/init.d/wdphotodbmergerd status" | tee -a "$Runsumfile"
if (( PIPESTATUS[0] == 0 )); then #if it is running
    ssh -p "${Sshport}" "${User}@${Dest}" "/etc/init.d/wdphotodbmergerd stop" | tee -a "$Runsumfile"
    Thiserror="${PIPESTATUS[0]}"
    errorcheck
    echo "Stopped wdphotodbmergerd" | tee "$Runsumfile"
fi
1 Like

If you look at the log file at /var/log/user.log. You will see that the restsdk-serverd process is logging error messages about every ten seconds. This only occurs if remote access is turned off.
Not sure what the process does. It appeared with firmware upgrade 307.

RAC

It should work better right out of the box, or at least have better apps and documentation and more configuration access to turning off low level features not needed for certain uses.

I think everyone will agree wholeheartedly with that; I said almost the exact same thing in my first few posts here. We shouldn’t have to resort to Linux admin skills to get the thing to work. But we do, so the pragmatic option is to just get on with it…

Thanks for that info, I hope I do not have to research that further. Lets hope turning it off does not affect my use.

cpt_paranoia I agree! My motto is ‘Just DO it!’

That is unfortunately a common complain by many of us. The My Cloud firmware is what it is. For some the sleep issue isn’t a problem. For others it is. For those folks there are several steps they can take. Unfortunately there are numerous threads on the sleep issue most have similar procedures that may or may not work for each individual. Compounding the issue is the fact some have modified their firmware through SSH which has the potential to induce additional sleep (or other) problems.

It would be nice if WD would have put more effort into fixing the firmware issues rather than introducing a whole host of new ones with the OS 3 firmware. But things are what they are. Like you I too have a love/hate relationship with the My Cloud. For the most part the My Cloud works for basic tasks that I use it for (mainly as a media server). But the fact it doesn’t mount one of my 1T external USB drives in the OS 3 firmware is a frustration. So to is the limited control over the folder permissions from the Dashboard.

@Bennor I think I will look into why mine are not sleeping too. I think I read somewhere that these drives are 50000 hr MTBF but that is only 6 years. I only use once a day for hour or so, so if I can get it to sleep for the other 23 hrs I think that would be wise.

So far I have left Cloud Access on and it seems to still work. So at least I have access to my backup files anywhere in the world that I can get to a browser. That is neat.

Personally, now that I have persevered, I don’t mind if these devices get a bad name. That just makes it cheaper for me to buy more aftermatket ones and use them for the last 20 years of my existence :slight_smile:

Wow, after spending a couple hours reading up on the long standing sleep problem I have decided not to care about it.

After all WD says that they are designed to run 24/7 (haha). As long as I have those indexing services off I think I can live with it.

I also decided to turn Sleep OFF in the WD Dashboard settings. Just to prevent constant sleep cycling if I ever got the system configured so that it was attempting that.