Sleeping problem is worse then we thought

Yes this device has become my life obsession.

Edit: both wdmcserver and wdphotomergerd are off so no scans are occuring through the night. However all the remaining processes are left as per the device design without changes from bootup.

Although I have another post " Letting Sleeping Drive lie - don’t wake up"  related to the same thing, this one is more urgent as I discovered something last night and I figure it deserves another post of its own. 

After getting tired of checking on Cloud on whether it is asleep or awake, and not bothering it unless it is woken for some other reason, my daily routine was in shambles as I could no longer access my drive at will, for fear that I would have wakened it just after it fell asleep moments ago.

What does it matter?

Well they say that the spin up cycle is worse for wear on the hard drive then leaving it constantly spinning. However in many ways it shouldn’t matter as this is a WD Red Drive and the life cycle should last at least a couple of years, as well as there is a warranty on the drive for at least that long and I’ll probably upgrade to their new 50TB WDCloud model in 2016.

Also I never worried about the WD live when I first bought it and it survived for 2 years before I sold it. For the price, it is a throwaway drive.

With that said, still a non sleeping drive concerns me… and the thing that bothered me greatly today is:

Short sleep and wake cycles

From the user.log

Feb 24 23:24:28 WDMyCloud logger: exit standby after 7 (since 2014-02-24 23:24:21.530000001 -0800)

Feb 24 23:47:06 WDMyCloud logger: exit standby after 329 (since 2014-02-24 23:41:37.660000001 -0800)
Feb 24 23:59:59 WDMyCloud logger: exit standby after 45 (since 2014-02-24 23:59:14.240000001 -0800)
Feb 25 00:11:31 WDMyCloud logger: exit standby after 87 (since 2014-02-25 00:10:04.350000001 -0800)
Feb 25 00:22:07 WDMyCloud logger: exit standby after 29 (since 2014-02-25 00:21:37.110000001 -0800)
Feb 25 00:34:26 WDMyCloud logger: exit standby after 134 (since 2014-02-25 00:32:12.250000001 -0800)
Feb 25 00:45:00 WDMyCloud logger: exit standby after 29 (since 2014-02-25 00:44:31.750000001 -0800)
Feb 25 00:55:12 WDMyCloud logger: exit standby after 7 (since 2014-02-25 00:55:05.910000001 -0800)

Remember again that the numbers are in seconds, so my drive woke up after

7 seconds,

5 minutes 30 seconds,

45 seconds,

87 seconds,

29 seconds,

134 seconds,

29 seconds and

7 seconds again.

over an hour and half period. 

The buttons that I pressed prior

Now this is what I did that caused that effect

  1. turned off Energy Saver for the evening

  2. mapped the drives on both pc and mac

at the end of the evening

  1. unmapped the drives by powering off the PC and ejcting the cloud drives from my Mac

  2. turned on Energy Saver

and went to bed.

Resetting the Short sleep and wake cycle

When I got up about an hour and half later, I noticed that the drive lights remained constantly lit, so I got on my Mac and mapped out the drives, did some work for an hour, then ejected them.

This is the results after the mapping and ejecting. PC is off, Mac is sleeping, Firewall is set to high blocking all ports.

user.log

Feb 25 02:04:57 WDMyCloud logger: exit standby after 3580 (since 2014-02-25 01:05:17.220000001 -0800)
Feb 25 03:00:10 WDMyCloud logger: exit standby after 2708 (since 2014-02-25 02:15:02.400000001 -0800)
Feb 25 03:05:01 WDMyCloud logger: disable lazy init
Feb 25 03:15:26 WDMyCloud logger: exit standby after 8 (since 2014-02-25 03:15:18.880000001 -0800)
Feb 25 03:47:22 WDMyCloud logger: exit standby after 1311 (since 2014-02-25 03:25:31.380000001 -0800)
Feb 25 09:12:46 WDMyCloud logger: exit standby after 18919 (since 2014-02-25 03:57:27.260000001 -0800)
Feb 25 09:41:34 WDMyCloud logger: exit standby after 1123 (since 2014-02-25 09:22:51.410000001 -0800)

exec: No such file or directory

little bit better 

1 hour

45 minutes

8 seconds

22 minutes

5 hours 30 minutes <=== impressive!!

19 minutes

Today

I got up, woke my mac up and did not map my drives. 15 minutes later, the drives woke up by themselves of which I grabbed my logs.

Last words

The reason that I am posting about this is that I have noticed, many times, that if I turn on the Energy Saver,

  1. the drives must be mapped and my Mac should fall asleep with the mapped drives, before the Energy Saver will kick in.

  2. I’ve also noticed the converse of #1, that if I left my drives unmapped after usage, the cloud doesn’t sleep and I think the above log is the result of that, meaning not only is it not sleeping but it is going through a sleep, wake cycle of 7 seconds to a few minutes which is worse for wear then if you had left them on.

1 Like

Feb 25 12:53:48 WDMyCloud logger: exit standby after 8 (since 2014-02-25 12:53:40.880000001 -0800)
Feb 25 13:04:21 WDMyCloud logger: exit standby after 28 (since 2014-02-25 13:03:53.440000001 -0800)
Feb 25 13:15:10 WDMyCloud logger: exit standby after 44 (since 2014-02-25 13:14:26.760000001 -0800)
Feb 25 13:26:00 WDMyCloud logger: exit standby after 45 (since 2014-02-25 13:25:15.840000001 -0800)

Feb 25 14:39:09 WDMyCloud logger: exit standby after 3784 (since 2014-02-25 13:36:05.550000001 -0800)
exec: No such file or directory

Today… it takes about 4 tries, waking up 8, 28, 44 and 45 seconds after going to sleep before it finally sleeps for 1 hour and 3 minutes.

Throughout this time since 12:43, I turned “ON” energy saver then ejected the drives from the Mac. The Mac went to sleep 5 minutes later, and the device attempted to sleep at 12:53 waking up 8 seconds later. 

try this from the terminal:

/etc/init.d/wdmcserverd stop

/etc/init.d/wdphotodbmergerd stop

update-rc.d wdphotodbmergerd disable

update-rc.d wdmcserverd disable

basically with these commands you cancel the schedeuled scans  (don’t do this if you are using twonky or DLNA)

of course disable twonky media server, ntp service

Having done this you’ll notice significally reduced waking ups. And not only that, the cpu usage will be almost at 0

eg.

top - 15:12:49 up 1 day, 17:05, 1 user, load average: 3.67, 3.32, 3.56
Tasks: 86 total, 2 running, 84 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.5 us, 0.0 sy, 0.0 ni, 99.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 230560 total, 181664 used, 48896 free, 9060 buffers
KiB Swap: 500732 total, 23840 used, 476892 free, 97756 cached

already done… 

should have mentioned that I don’t have any media scans on… These awakenings are not from scans but from some linux process that is fighting with monitorio when it tries to put the hard drive to sleep.

You can always prevent any sleeping at all

issue this

hdparm -B 255 /dev/sda

that disables the hard disk power management and lets it spin continuously

or do it manually: 

go to /etc/hdparm.conf

In there you find a commented line like this:

#apm = 255

Just delete the # to uncomment so that the hd power management will be disabled by default.

true… but I really want the opposite :stuck_out_tongue:

I do want the device to sleep or at least sleep continuously through the night instead of waking every 7 seconds to every hour.

The minimum I would appreciate is that it doesn’t wake up repeatedly between 7 to 50 seconds after the hard drive sleeps. This is the worse possible scenario for the shortest spin down and spin up imaginable. If it spinned down and slept for at least 10 minutes (preferably an hour) then fine… it is more acceptable, but repeatedly at 7 seconds? 

If I set the Energy Saver/Drive Sleep off, the hard drive stays on without powering down, so we are good.