More Efficient Mover Logic


Recommended Posts

When cache has a file on it larger than available space on most of your drives, it will try and fail to write the file to several of the array drives in order until it finds one that will fit the file.  This causes Mover to take much longer than is needed.

I feel it would be more efficient if Mover first got file properties of the file it was trying to move and then queried the different array drives to check free space before attempting to move the file.

Example:

Cache has a 100GB file on it and my 3 data drive array has 3 disks.  Disk1 has 50GB free, 2 30GB free, 3 500GB free.  Unraid will write 50GB to Disk1 and then write 30GB to 2 before finally writing the complete file to 3.  It does delete the partial file when it is done on Disk1 and Disk2, but this is just a very slow process for large files that wastes a lot of time.

Preferred behavior: Write the file to 3 since the OS is already aware of free space and it's not very expensive to check file size before a move.

  • Upvote 1
Link to comment
On 11/23/2022 at 8:42 PM, Kilrah said:

Sounds like you have your Min Free Space setting wrong on your shares because it's how it's supposed to work...

Min Free Space does work around this issue, but smarter logic shouldn't be dismissed as unnecessary, and if this has a performance cost, make it a toggle in share settings, I expect it to have a very minimal impact on media shares (less files, but bigger ones), and when it would normally run into the issue described in the original post, it would be significantly faster.

Link to comment

Things is that there are different layers involved. AFAIK the mover does one thing, "move to the array". Then it's up to the array logic, which min free space is part of, to decide where to put things.

 

If the mover bypassed array logic to use its own I could imagine it causing a whole host of unwanted side effects.

Edited by Kilrah
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.