Sorry, but he gave you terrible advice.  I have to wonder if he's ever used
XFS.

The xfs_fsr utility will exit once it has finished defragging the
filesystem.  What you really should do is this:

1. Run xfs_fsr -v  manually, and let it run until it finishes.  Run it one
more time, unless you still notice plenty of   extents: before: xx after:
xx   messages.  Once you stop seeing these, move on to the next step.
2. Set a cronjob to run DAILY to defrag the filesystem.  Not much
fragmentation should be added daily, so this step should complete very
quickly.

If you wait a full month between defrags, it will take significantly longer
to defrag and your overall performance will potentially suffer.  Keep in
mind that you need to ensure there's always enough free space on your drive
to make a duplicate of the largest file you keep on there.  Also, rules of
thumb:

If the drive is > 95%, it will fragment quickly.
If the drive is < 90% full, it shouldn't fragment very much.

So, try to keep it below 90% full; preferably, below 85% full.




On Sun, Oct 11, 2015 at 6:23 PM, Matthias Andersson <
matthias.anders...@pp1.inet.fi> wrote:

> Hello,
>
> Very well, I might schedule the job once a month.
>
> //Matthias
>
>
> On 11.10.2015 22.23, Hin-Tak Leung wrote:
>
>> I am curious about your plan of running it on a weekly basis.
>>
>> For a lightly used system, that seems a bit too frequent; for a system
>> that's constantly being used, that may be justifiable, but
>> then running it that frequently will probably (1) affect the performance
>> of the system for regular tasks (during that hour your system's,
>>   responsiveness will probably be bad, and that's a couple of hours
>> per week, not a small proportion of time), (2) increase tear-and-wear.
>>
>> In any case, I'd probably only do a defrag every few months,
>> or keep occupancy below a certain level (say, 60-70%) to keep
>> fragmentation low though... just my 2 cents.
>>
>> --------------------------------------------
>> On Sun, 11/10/15, Matthias Andersson <matthias.anders...@pp1.inet.fi>
>> wrote:
>>
>>   Hello,
>>
>>   I own a Buffalo Linkstation Pro Quad 12 Tb which runs the
>>   busybox OS.
>>
>>   The NAS uses the XFS filesystem and provides the xfs_fsr
>>   defragmentation
>>   tool. The problem I've noticed is that the program doesn't
>>   obey the -t
>>   (seconds) parameter, I've tried xfs_fsr -t 3600 /dev/md2 and
>>   it runs
>>   over an hour. I then tried with 8 hours but it didn't stop
>>   there either.
>>   The -p 1 flag seems to work...
>>
>>   I'm trying to set up a cron-job to run xfs_fsr for a couple
>>   of hours on
>>   a weekly basis.
>>
>>   //Matthias Andersson
>>
>>
>>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to