Connect with me!

Have a question? Want to hire me? Reach out and Connect!
I'm available for remote and onsite consulting!
To live chat with me, Click Here!
Synology

Synology System Resource Optimization for NFS/iSCSI

If you’re like me and use a Synology NAS as an NFS or iSCSI datastore for your VMware environment, you want to optimize it as much as possible to reduce any hardware resource utilization.

Specifically we want to disable any services that we aren’t using which may use CPU or memory resources. On my DS1813+ I was having issues with a bug that was causing memory overflows (the post is here), and while dealing with that, I decided to take it a step further and optimize my unit.

Optimize the NAS

In my case, I don’t use any file services, and only use my Synology NAS (Synology DS1813+) as an NFS and iSCSI datastore. Specifically I use multipath for NFSv4.1 and iSCSI.

If you don’t use SMB (Samba / Windows File Shares), you can make some optimizations which will free up substantial system resources.

Disable and/or uninstall unneeded packages

First step, open up the “Package Center” in the web GUI and either disable, or uninstall all the packages that you don’t need, require, or use.

To disable a package, select the package in Package Center, then click on the arrow beside “Open”. A drop down will open up, and “Disable” or “Stop” will appear if you can turn off the service. This may or may not be persistent on a fresh boot.

To uninstall a package, select the packet in Package Center, then click on the arrow beside “Open”. A drop down will open up, and “Uninstall” will appear. Selecting this will uninstall the package.

Disable the indexing service

As mentioned here, the indexing service can consume quite a bit of RAM/memory and CPU on your Synology unit.

To stop this service, SSH in to the unit as admin, then us the command “sudo su” to get a root shell, and finally run this command.

synoservice --disable pkgctl-SynoFinder

The above command will probably not persist on boot, and needs to be ran each fresh boot. You can however uninstall the package with the command below to completely remove it.

synopkg uninstall SynoFinder

Doing this will free up substantial resources.

Disable SMB (Samba), and NMBD

I noticed that both smbd and nmbd (Samba/Windows File Share Services) were consuming quite a bit of CPU and memory as well. I don’t use these, so I can disable them.

To disable them, I ran the following command in an SSH session (remember to “sudo su” from admin to root).

synoservice --disable nmbd
synoservice --disable samba

Keep in mind that while this should be persistent on boot, it wasn’t on my system. Please see the section below on how to make it persistent on booth.

Disable thumbnail generation (thumbd)

When viewing processes on the Synology NAS and sorting by memory, there are numerous “thumbd” processes (sometimes over 10). These processes deal with thumbnail generation for the filestation viewer.

Since I’m not using this, I can disable it. To do this, we either have to rename or delete the following file. I do recommend making a backup of the file.

/var/packages/FileStation/target/etc/conf/thumbd.conf

I’m going to rename it so that the service daemon can’t find it when it initializes, which causes the process not to start on boot.

cd /var/packages/FileStation/target/etc/conf/
mv thumbd.conf thumbd.conf.bak

Doing the above will stop it from running on boot.

Make the optimizations persistent on boot

In this section, I will show you how to make all the settings above persistent on boot. Even though I have removed the SynoFinder package, I still will create a startup script on the Synology NAS to “disable” it just to be safe.

First, SSH in to the unit, and run “sudo su” to get a root shell.

Run the following commands to change directory to the startup script, and open a text editor to create a startup script.

cd /usr/local/etc/rc.d/
vi speedup.sh

While in the vi file editor, press “i” to enter insert mode. Copy and paste the code below:

case "$1" in
    start)
                echo "Turning off memory garbage"
                        synoservice --disable nmbd
                        synoservice --disable samba
                        synoservice --disable pkgctl-SynoFinder
                        ;;
    stop)
                        echo "Pertend we care and are turning something on"
                        ;;
        *)
        echo "Usage: $1 {start|stop}"
                exit 1
esac
exit 0

Now press escape, then type “:wq” and hit enter to save and close the vi text editor. Run the following command to make the script executable.

chmod 755 speedup.sh

That’s it!

Conclusion

After making the above changes, you should see a substantial performance increase and reduction in system resources!

In the future I plan on digging deeper in to optimization as I still see other services I may be able to trim down, after confirming they aren’t essential to the function of the NAS.

Feel like you can add anything? Leave a comment!

Stephen Wagner

Stephen Wagner is President of Digitally Accurate Inc., an IT Consulting, IT Services and IT Solutions company. Stephen Wagner is also a VMware vExpert, NVIDIA NGCA Advisor, and HPE Influencer, and also specializes in a number of technologies including Virtualization and VDI.

View Comments

  • Hi Stephen,

    Was wondering if when your synology locked up there were any logs prior to the crash. We have 4 x RS3617xs+ all suffering from intermitent lock ups and only soulution is power cycle. Synology want to RMA devices after doing memory checks which all pass. Looking at logs on Linux they is nothing in any log file prior to the crash and new logs entries only appear on reboot.

    We like you are only using as an ISCSI host.

    Kind Regards

    Steve

    • Hi Steve,

      Since then I've moved to NFS and the issue is occurring with NFS as well.

      Post reboot, there are no logs on both the Synology interface side as well as the Linux side (Linux log files).

      In an effort to find out what's going on, one day I actively monitored the box (SSH'ed in, and tailed the kernel Linux messages). I found that what happens is all memory is used up and then the kernel goes in to a panic trying to clear RAM.

      I believe this is completely software related and related to an update around the time I did this post.

      Let me know what Synology says.

      Cheers
      Stephen

  • Hi Stephen,

    We actually purchased brand new device just before christmas to allow us to migrate data to it and RMA one of the original devices with the issue. Was racked and given an IP address and raid10 volume created but then left during change freeze. With no connections/utilisation we found the device unresponsive this week when we went back to use it with same symptoms. This has ruled out many of our possible theories for the cause as was base factory config with no load on whatsoever.

    Waiting on response from Synology currently. Will let you know the outcome. I am not holding my breath for a solution. Very dissapointed especially as devices perform very well apart from this issue.

    Cheers

    Steve

    • Hey Steve,

      Out of curiosity, are you using more than one network interface on the unit? The only thing I noticed on my side that around the time the issue started was: 1) new firmware upgrade 2) started using 4 NICs instead of 1.

      In all honesty, it was because of issues like this I switched from the Synology unit as my main storage device. I still use the Synology as a backup device, but I don't put any critical data on it anymore.

      Stephen

  • Hi Stephen,

    All other devices had multiple NICs in use. New device only had management nic connected. We were wondering if the additional 10gb cards we installed in other units may have been cause but the hang on this new devices rules that out.

    Steve

  • Hi,
    I just found this thread because I am having the same "freezing" issues on my DS218J.
    It has been working fine for 3 months and just after the update to 6.2.2-24922-3 this started to happen, every 1-2 days the system froze. I do not know which version was before the update (I imagine it would be 6.1)
    Considering this is a remote station, it makes it completely useless.
    I have done the memory test but I think you are right, this is an software issue.
    I am opening a support ticket today and most probably return the device as it is still on warranty.
    Thanks for the posts.

  • I just wanted to chime in that I'm experiencing the same problem with a RS3614xs+ that's only being used for iSCSI, all other services are disabled - SMB, etc. Everything is on the compatibility list and I'm running the latest DSM - 6.2.2-24922 update 6. I'm experiencing intermittent lockups where the only solution is to power cycle. Synology support just asked me to run RAM tests which I am planning to do soon but I really don't suspect RAM to be the issue.

  • Hi Stephen,

    I saw that post, did you end up resolving the issue? I read it as the latest update was "I’m officially going to start planning on retiring this device as this is unacceptable, especially in addition to all the issues over the years.", are you still planning on that or did you find disabling and uninstalling SynoFinder to be the root cause?

Share
Published by

Recent Posts

How to properly decommission a VMware ESXi Host

While most of us frequently deploy new ESXi hosts, a question and task not oftenly discussed is how to properly decommission a VMware ESXi host. Some might be surprised to… Read More

4 months ago

Disable the VMware Horizon Session Bar

This guide will outline the instructions to Disable the VMware Horizon Session Bar. These instructions can be used to disable the Horizon Session Bar (also known as the Horizon Client… Read More

4 months ago

vGPU Enabled VM DRS Evacuation during Maintenance Mode

Normally, any VMs that are NVIDIA vGPU enabled have to be manually migrated with manual vMotion if a host is placed in to maintenance mode, to evacuate the host. While… Read More

4 months ago

GPU issues with the VMware Horizon Indirect Display Driver

You may experience GPU issues with the VMware Horizon Indirect Display Driver in your environment when using 3rd party applications which incorrectly utilize the incorrect display adapter. This results with… Read More

4 months ago

Synology DS923+ VMware vSphere Use case and Configuration

Today we're going to cover a powerful little NAS being used with VMware; the Synology DS923+ VMware vSphere Use case and Configuration. This little (but powerful) NAS is perfect for… Read More

4 months ago

How to Install the vSphere vCenter Root Certificate

Today we'll go over how to install the vSphere vCenter Root Certificate on your client system. Certificates are designed to verify the identity of the systems, software, and/or resources we… Read More

5 months ago
Powered and Hosted by Digitally Accurate Inc. - Calgary IT Services, Solutions, and Managed Services