Hi Folks,
let’s continue possible optimization for the WD MyCloud NAS drive. In the last part we killed not really needed services which consumes a bunch of CPU resources but there are still some other services that could be skipped.
First of all i don’t have any Apple devices in my environment and already disabled the itunes server and Time Machine Mac-Backups in the MyCloud configuration but still there is a netatalk (Apple network communication) service running.. Why can i not configure this in the WD GUI?
So we need putty again…
Like in Part 1 you have to open a SSH connection to the MyCloud, proceed with Step 1 to 3 from Part 1.
1) To stop the “netatalk” Apple network service enter the following command: service netatalk stop
2) If you want to “stop” it after a reboot enter: crontab -e
3) Scroll down in the shown editor and add as last “new” line the command: @reboot /bin/sh /etc/rc2.d/S50netatalk stop
4) Press ctrl-x -> y -> enter to save the changes
Next point… WD has enabled IPv6 in the used Debian distribution, what a nonsense! You can’t configure it, you can’t use it but still it’s enabled and consumes network resources (doesn’t matter if used or not, it creates IPV6 related traffic at anytime if enabled). Yes, this is no joke! So let’s remove it.
To disable IPV6 follow the steps below:
1) Connect thru the SSH console
2) Enter the following command (use copy and paste to enter the command in putty, it’s one line of code!), this disables ipv6 on demand:
echo '/sbin/ifconfig eth0 inet6 del `ifconfig | /bin/grep "Scope:Link" | /bin/sed -e "s/^.*addr: //" -e "s/ .*//"` '> /bin/disableipv6
3) Enter the following command, this modifies the permanent ipv6 configuration (it’s one line of code):
echo "echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6" >> /bin/disableipv6
4) Enter the following command: chmod a+x /bin/disableipv6
5) Verify the script, enter ifconfig and verify the ipv6 address shown for the eth0 adapter. Now execute the disableipv6 command and verify with ifconfig that the ipv6 address is gone for eth0. If the ipv6 address is not gone or you received an error check the script with nano /bin/disableipv6
6) If the ipv6 address was gone after executing the disableipv6 command execute crontab -e
7) Scroll down in the shown editor and add as last “new” line the command: @reboot /bin/sh /bin/disableipv6
8) Press ctrl-x -> y -> enter to save the changes
9) Reboot the device by using the reboot command
Please note, other options to disable IPV6 will be overwritten by the WD configuration tools so you have to use this way. Step 3 is required to modify the default configuration which will be overwritten during bootime by WD configuration tools, it’s required regarding the fact that some services/configurations might restart the network services and in this case the previous on demand deactivation will not work anymore. So we need two ways to prevent ipv6. 🙂 Also if you are using ifconfig you will see that the dropped RX frames will increase, this is by design and counts ipv6 frames from other devices in the network which can not be handled anymore and it’s not critical.
Reboot the device to take over the network configuration, after the reboot connect via SSH and enter the command ifconfig to verify the result but wait some time, it maybe take a while until all cron commands are executed.
These two steps will also increase the performance again and should be used with the configuration done in Part 1 of the WD MyCloud optimization article.
Results so far:
With my two 3TB WD MyCloud drives i was able to increase the performance for writing a large file from max. 2-6 mb/s up to max. 70-90 mb/s. This could be reproduced with both drives, both drives currently host more than 30.000 files for tests, mostly images coming from misc clipart collection DVD’s and own pictures. Important: Before you copy a large amount of files make sure that the DLNA Database update service is not running, this can be checked quite simple in the WebGui -> Settings -> Media -> Last refresh. If last refresh shows “running” wait until it finished. As already written i will look out for an alternative DLNA solution but this will be a future step. Tip for the WD Support and R&D Team: If you try to reproduce customer issues try to fill up the HDD with 30.000 or more files hosted in the public default shares, otherwise you will not see any issues and it’s quite easy to blame customers for there network without any real reproducing. Iam quite sure that the weakness of the software is known at WD and it doesn’t make sense to have a 2,3 or 4TB NAS to only save a few large files… Nobody will do this and use the device in this way.
Cheers
Michael
P.S.: Like everytime no warranty from my side, iam not responsible for any damage or the loss of warranty related to the provided tweaks.