[SOLVED] Copying Large amounts of media to Unraid = Leave cache on or off?


Recommended Posts

I'm copying over a large amount of media (movies, tv shows and music) to my new Unraid server. I have a 18TB array with a 250GB cache drive.

 

Should I be turning off cache drive while this initial migration of data is happening?  Or do I leave it on to improve copying speeds, and unraid handles the moving of data from cache->array automatically?

 

My confusion lies in some of the documentation I'm reading about how cache->array happens.  From what I've read, it happens periodically once a night, so I'm wondering what happens when it fills up.

Link to comment

I'm copying over a large amount of media (movies, tv shows and music) to my new Unraid server. I have a 18TB array with a 250GB cache drive.

 

Should I be turning off cache drive while this initial migration of data is happening?  Or do I leave it on to improve copying speeds, and unraid handles the moving of data from cache->array automatically?

 

My confusion lies in some of the documentation I'm reading about how cache->array happens.  From what I've read, it happens periodically once a night, so I'm wondering what happens when it fills up.

It is really up to you.  When the cache reaches the Min Free Space setting then any further writes bypass the cache and go direct to the array. 

 

If you are likely to fill the cache it is important that the Settings->Global Share Settings->Cache Disk->Min Free Space setting is at least as large as the largest file you are going to copy to avoid unRAID trying to create a file on the cache when there will not be enough room to hold it.

Link to comment

I'm copying over a large amount of media (movies, tv shows and music) to my new Unraid server. I have a 18TB array with a 250GB cache drive.

 

I hope you are using a tool that is helping you "Manage" this AND not just using Windows Copy.

 

Should I be turning off cache drive while this initial migration of data is happening?  Or do I leave it on to improve copying speeds, and unraid handles the moving of data from cache->array automatically?

 

Personally I think YES! Copying over Gigabit / Local will FILL that 250GB Cache VERY quickly and I am assuming you are talking about TB's of data and not GB's? See below answer to your question about Cache for more information why.

 

A way of increasing the speed would be to turn OFF Parity*. Write speeds with Parity enabled are typically ~40MB/s. Write Speeds with Parity disabled will be limited to the speed of the disk you are writing too (assuming there is no other bottleneck in the chain).  I don't see this as an issue as you have a Backup (e.g. the source you are copying from).

 

*I am assuming that, as you state in your OP, that the destination server is NEW and doesn't have any /any critical data on it. IF you do then you could still do this BUT ensure that the data (which one would assume is not much anyway given the new state of the server) is backed up as it will NOT be Protected if you turn off Parity and could result in data loss.

 

My confusion lies in some of the documentation I'm reading about how cache->array happens.  From what I've read, it happens periodically once a night, so I'm wondering what happens when it fills up.

 

You can think of the Cache drive as an intermediate "landing" for files that you transfer to the Array. As I note above transfers to a Parity Protected Array are typically ~40MB's (due to the overhead of calculating real time Parity on the fly). Copying to this intermediate landing (which is typically unprotected unless you are using a BTRFS RAID-1 Array for Cache) is as fast as copying straight to a disk.

 

unRAID has a utility called "mover". The mover is a utility that runs periodically to move files off the cache disk and onto parity-protected data disk(s). This runs in the background and is, for the most part, transparent to the user. The issue comes when you try and transfer files too quick and you fill your Cache drive. E.g.:

 

Mover scheduled to run @ daily default interval of ~3am. 2TB data transfer started at 8am. This essentially copies your data to the Cache drive at a speed as fast as Gigabit + disk will allow. By ~9:30am your Cache Disk is Full. unRAID throws an error indicating it is FULL and rather than Fail the write it switches to writing to the Parity Protected Array at ~40MB/s. This will continue UNTIL the mover runs at 3am.

 

As I mention, by default the mover is scheduled to run daily. You CAN change this to run more frequently in Settings>Scheduler. Perhaps you COULD set it to run every hour while this transfer happens BUT I still think you will hit a bottleneck as ultimately writes to the Parity Protected Array will always be ~40MB/s. You are NOT going to get files on there quicker than it can physically go.

 

Which brings me back to my suggestion. Disable Parity and Copy straight to Array. When Copy has finished, enable and recalculate Parity. I don't see this as much different than using a Cache drive anyway (as given what you describe your Cache doesn't have redundancy) and you COULD argue that by doing this you are getting your data into a Protected state much quicker.

 

For your consideration.

 

Link to comment

Why not turning on turbo write for the initial transfer, in a new server should give you close to gigabit,  don't need cache.

 

The OP Sig indicates he is using 6.1.9. Isn't Turbo Write limited to 6.2-betax?

You have to use the command line to enable it but it works.

 

How do you do this, do you have a post for reference for the OP?

Link to comment

Thanks all. The quick replies and detail provided are again another example why I love this unraid community.

 

Questions:

 

1. How do i turn off cache and parity? (Do I just click the arrow next to both Parity and Cache drives to "spin down"?)

 

2. What is the advantage of turbo write and is there any risk on enabling in command line on 6.1.x?  Where are the best instructions on how to enable?

Link to comment

2. What is the advantage of turbo write and is there any risk on enabling in command line on 6.1.x?  Where are the best instructions on how to enable?

 

No risk, disadvantage is that all disks spin up during writes, not a big deal during the initial transfer.

 

To turn on type:

mdcmd set md_write_method 1

 

To turn off reboot or type:

mdcmd set md_write_method 0

  • Upvote 1
Link to comment

I initially setup my server with cache and parity drives.  I've read advice that I should turn these off for initial data transfer since i'm transferring over TBs of files and I'm maxing out at ~40MB/s, when I have 4 drives in the array and gigabit lan.

 

Not clear to me how to do this.

 

1. Click the "spin down" option next to each parity and cache on the "Main" tab in the web UI?

2. Choose to remove the drives completely?

3. or...?

Link to comment

1. How do i turn off cache and parity? (Do I just click the arrow next to both Parity and Cache drives to "spin down"?)

 

For Parity:

 

You can't simply disable parity. What you can do is a New Config and simply not assign a parity drive.

 

Make sure you note which drive is the parity drive. Once that is done just assign your data drives to the new array and leave the Parity unassigned. Then you can copy data to the array and it will copy much faster as I describe in my above posts.

 

When you're ready to protect everything, just Stop the Array, assign the parity disk, and let it do a parity sync.

 

Then you're all done and ready to do a parity check to confirm all went well.

 

Remember, for any existing data on the Array (if any) you will be running unprotected while you're copying all your data to the array so make sure you have good backups of any of that data!

 

For Cache:

 

Simply go into the settings of the share you are copying to and remove the "Use Cache" option from the share.

 

Hope this helps.

Link to comment

I initially setup my server with cache and parity drives.  I've read advice that I should turn these off for initial data transfer since i'm transferring over TBs of files and I'm maxing out at ~40MB/s, when I have 4 drives in the array and gigabit lan.

 

Not clear to me how to do this.

 

1. Click the "spin down" option next to each parity and cache on the "Main" tab in the web UI?

2. Choose to remove the drives completely?

3. or...?

 

I answered your question in the other thread:

 

http://lime-technology.com/forum/index.php?topic=47711.msg457342#msg457342

 

Turning off the parity is not a good idea, never a good idea actually. Once you have a parity drive you cannot 'turn it off' as far as I know.

 

You are right, but there is context to this request which he has not included here BUT is in the original post of that thread. See above link.

Link to comment

For Parity:

 

You can't simply disable parity. What you can do is a New Config and simply not assign a parity drive.

 

Make sure you note which drive is the parity drive. Once that is done just assign your data drives to the new array and leave the Parity unassigned. Then you can copy data to the array and it will copy much faster as I describe in my above posts.

 

When you're ready to protect everything, just Stop the Array, assign the parity disk, and let it do a parity sync.

 

Then you're all done and ready to do a parity check to confirm all went well.

 

When you say "New config", do you mean I need to kill the existing array completely (stop array then delete), then recreate array? Or something else?

Link to comment

For Parity:

 

You can't simply disable parity. What you can do is a New Config and simply not assign a parity drive.

 

Make sure you note which drive is the parity drive. Once that is done just assign your data drives to the new array and leave the Parity unassigned. Then you can copy data to the array and it will copy much faster as I describe in my above posts.

 

When you're ready to protect everything, just Stop the Array, assign the parity disk, and let it do a parity sync.

 

Then you're all done and ready to do a parity check to confirm all went well.

 

When you say "New config", do you mean I need to kill the existing array completely (stop array then delete), then recreate array? Or something else?

 

I haven't done it for a while but you go to Tools Tab and select New Config. Once executed, what you get presented with is the main page with no drives assigned. Then, as I note above, all you do is add disks to the data slots and don't assign a parity disk.

 

Again, as I note above the most important thing to remember is don't assign a data drive to the parity slot or visa versa. I say this as I am note sure if you have an existing data on the Array.

Link to comment

Just disabled cache and parity drives:

 

M2hVrc9.png

 

Just restarted a copy using rsync using flags -rltvuh.

 

I'm only getting similar speeds to as when caching and parity where both turned on, about 40MB/s unfortunately.

 

I then  enabled "turbo write" using the command stated earlier in the thread and no change in copy speed either.

Link to comment

Just disabled cache and parity drives:

 

M2hVrc9.png

 

Just restarted a copy using rsync using flags -rltvuh.

 

I'm only getting similar speeds to as when caching and parity where both turned on, about 40MB/s unfortunately.

 

I then  enabled "turbo write" using the command stated earlier in the thread and no change in copy speed either.

 

Right, well generally speaking this is unexpected. There are some possibilities (e.g. Source H/W, Destination H/W, Network etc) but lets not speculate, as a Starter-For-10 can you please post a diagnostics file.

 

Tools>Settings>Diagnostics>Download

 

:)

Link to comment

Right, well generally speaking this is unexpected. There are some possibilities (e.g. Source H/W, Destination H/W, Network etc) but lets not speculate, as a Starter-For-10 can you please post a diagnostics file.

 

Tools>Settings>Diagnostics>Download

 

:)

 

Attached.

 

Note: The 2 servers both have gigabit NICs and connected via a Cisco SG200 8-port gigabit switch with CAT6 cables.

tower-diagnostics-20160321-1919.zip

Link to comment

Right, well generally speaking this is unexpected. There are some possibilities (e.g. Source H/W, Destination H/W, Network etc) but lets not speculate, as a Starter-For-10 can you please post a diagnostics file.

 

Tools>Settings>Diagnostics>Download

 

:)

 

Attached.

 

Note: The 2 servers both have gigabit NICs and connected via a Cisco SG200 8-port gigabit switch with CAT6 cables.

 

A few things I notice:

 

- All shares barring one are set to use Cache. I am assuming that you are copying to a share that is the one that is set to not use Cache right?

 

* Saying that, I am not sure that would account for your slow speeds. Even if it was FULL unRAID would default to writing to the Array which (as it is unprotected now) would be faster too. So take that as a note.

 

- All your disks look fine, no obvious issues there which I would consider would impact speed.

 

- You clearly have a Gigabit NIC, so no issues there.

 

The only thing I can think of is that the bottleneck is outside of unRAID. Can you tell me a little more about the Source Server (including its Hardware / Network Hardware / Current Network Traffic?

Link to comment

A few things I notice:

 

- All shares barring one are set to use Cache. I am assuming that you are copying to a share that is the one that is set to not use Cache right?

 

* Saying that, I am not sure that would account for your slow speeds. Even if it was FULL unRAID would default to writing to the Array which (as it is unprotected now) would be faster too. So take that as a note.

 

I didn't change the shares to be no cache, since I assumed (perhaps incorrectly) that the lack of a cache drive would make that option useless.

 

The only thing I can think of is that the bottleneck is outside of unRAID. Can you tell me a little more about the Source Server (including its Hardware / Network Hardware / Current Network Traffic?

 

It's an HP Proliant N40L server running Windows Server with Stablebit DrivePool.  Barely any network traffic to it, as it acts as my Plex server and NAS and there is nothing going on in the house right now

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.