In the process of optimizing a Synology DS1815+ for iSCSI, I opted to defragment the volume containing the LUN. This Synology had 2x Samsung 850 Pro SSDs in RAID-0 serving a cache, but the cache will be skipped for sequential I/O.
In this scenario, with the sequential I/O turned off, the SSDs would be utilized only for random I/O and therefore the disks would be more available for serving data directly and sequentially.

That being said, if the disks are heavily fragmented, they will perform poorly by attempting to piece together a file block by block which is spread across physical media.


I chose to defragment my Synology at home, too.

Here’s how to do it:

It’s beneficial to defragment your Synology volume, especially if you have many clients constantly reading and writing to the device. If you host large files like movies/videos/ISOs/archives etc and you read+write to your NAS frequently, chances are some of those files are fragmented.

You should note that your NAS volume will perform poorly during the defragment. It’s best to perform a defragment during times of low volume activity, such as overnight or on the weekends (depending on your circumstances).

Log in to DSM

This is where we’ll defrag.

Open Storage Manager

Click manage on the top toolbar to bring up a set of management tasks.

Start file system defragmentation

Check the bottom-most box for defragmentation, then hit Next.

 

Confirm the Defrag

Now would be a good time to double-check that your NAS isn’t already busy with something else.

Monitor progress

Check out how many files it finds fragmented.

Defragmenting many files..

 

Monitor resource utilization

Feel free to gawk at all the resource use.

Volume

Disks

CPU

Almost done…

When finished, the system returns to normal.

The NAS was very busy during the defrag, which was moving files around and re-structuring things to improve performance. This required advanced calculations in addition to heavy load on the disks.

Volume

Disk

CPU

 


 

After your system defragmentation, your sequential read speeds should improve. If your disks have an easier time seeking data for reads and finding blocks for writes, random IOPS will also improve, albeit less significantly.


1 Comment

James · June 5, 2017 at 9:46 pm

How long did this take to complete? Just wondering how long I should expect it to take (ballpark figure) My NAS is using roughly 2TB out of 3.5TB

Leave a Reply