× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: Scrub, Defrag, Balance Schedule Rule of thumb

PatrickH
Aspirant

Scrub, Defrag, Balance Schedule Rule of thumb

Hello,

       I am just finishing expanding my NAS. I have had a 314 for for several years and have about 2tb of corporate data. I have not done a Scrub, Defrag or Balance ever. I know it is over due for at least a defrag. I was looking for a recomendation for what kind of schedule I should use for each of these processes. The server is used daily for moslty small word and excel files by 20 users.

 

-Patrick

Model: RN31400|ReadyNAS 300 Series 4- Bay (Diskless)
Message 1 of 4

Accepted Solutions
StephenB
Guru

Re: Scrub, Defrag, Balance Schedule Rule of thumb


@Sandshark wrote:

I balance monthly and scrub quarterly.  If you use CoW and snapshots, and especially in combination with lots of file "churn", then defrag at all is a bad idea.  Your snapshots will grow huge.  I never defrag.

Personally I run all the maintenance functions quarterly.  I do defrag, but I also limit snapshot retention in order to manage the space.  Most of my shares have 3 month retention, and my snapshot space is generally about 3%.  I do have one share with high churn, and snapshots aren't used on that share.

 

There isn't a hard-and-fast rule on this, but IMO it is a good idea to run regular balances.  If they take a long time, then that's an indication that you aren't running them often enough.  Scrubs do a lot of disk i/o over the volume, so one reason to run them is that they can give you some early warnings on disk (and array) health. 

 

Defrag is a mixed bag - as @Sandshark says it can significantly increase on-disk space if you use snapshots and CoW, and if the volume is nearly full to start with that can create a lot of problems.  I suspect the performance benefits are modest at best, though I haven't tried to measure them. I run it mainly because it appears to do no harm in my NAS, and perhaps might do some good.

 

Note there is an auto-defrag share setting that you could also use.  You don't get any feedback on when it kicks in, but it does let you exclude shares that have high "churn". 

 

BTW, "churn" happens when you have an application that updates files in place.  Applications that rewrite the full file when it is updated don't create churn.  Examples of applications that create "churn" are live databases and torrents.  If a share has snapshots, then updating a file in place will always fragment it (assuming it is in one or more snapshots).  That minimizes the space needed for the original version in the snapshots, because the blocks that weren't changed aren't duplicated in the snapshots.  But when you defrag, they are duplicated - which sharply increases the space used by the snapshots. 

View solution in original post

Message 3 of 4

All Replies
Sandshark
Sensei

Re: Scrub, Defrag, Balance Schedule Rule of thumb

I balance monthly and scrub quarterly.  If you use CoW and snapshots, and especially in combination with lots of file "churn", then defrag at all is a bad idea.  Your snapshots will grow huge.  I never defrag.

 

Balance tends to be prettty quick (at least if you do it often enough) and doen't use excessive CPU power or drive throughput.  Scrub is done in conjunction with a MDADM resync (see my entry in idea exchange to stop doing that) and can se a lot of CPU and drive throughput, making file access very slow, especially on the lower-end units.  And it can take significantly longer.  The 314 is a middle-of-the-raod unit, and you may see some noticeable slow-down during the scrub.

Message 2 of 4
StephenB
Guru

Re: Scrub, Defrag, Balance Schedule Rule of thumb


@Sandshark wrote:

I balance monthly and scrub quarterly.  If you use CoW and snapshots, and especially in combination with lots of file "churn", then defrag at all is a bad idea.  Your snapshots will grow huge.  I never defrag.

Personally I run all the maintenance functions quarterly.  I do defrag, but I also limit snapshot retention in order to manage the space.  Most of my shares have 3 month retention, and my snapshot space is generally about 3%.  I do have one share with high churn, and snapshots aren't used on that share.

 

There isn't a hard-and-fast rule on this, but IMO it is a good idea to run regular balances.  If they take a long time, then that's an indication that you aren't running them often enough.  Scrubs do a lot of disk i/o over the volume, so one reason to run them is that they can give you some early warnings on disk (and array) health. 

 

Defrag is a mixed bag - as @Sandshark says it can significantly increase on-disk space if you use snapshots and CoW, and if the volume is nearly full to start with that can create a lot of problems.  I suspect the performance benefits are modest at best, though I haven't tried to measure them. I run it mainly because it appears to do no harm in my NAS, and perhaps might do some good.

 

Note there is an auto-defrag share setting that you could also use.  You don't get any feedback on when it kicks in, but it does let you exclude shares that have high "churn". 

 

BTW, "churn" happens when you have an application that updates files in place.  Applications that rewrite the full file when it is updated don't create churn.  Examples of applications that create "churn" are live databases and torrents.  If a share has snapshots, then updating a file in place will always fragment it (assuming it is in one or more snapshots).  That minimizes the space needed for the original version in the snapshots, because the blocks that weren't changed aren't duplicated in the snapshots.  But when you defrag, they are duplicated - which sharply increases the space used by the snapshots. 

Message 3 of 4
PatrickH
Aspirant

Re: Scrub, Defrag, Balance Schedule Rule of thumb

Well written thank you for the response.

 

-Patrick

Message 4 of 4
Top Contributors
Discussion stats
  • 3 replies
  • 1779 views
  • 2 kudos
  • 3 in conversation
Announcements