Monday, June 7, 2010

Which is faster, NDMPcopy or vol copy?

After posting my last post I got few mails asking, amongst ndpmpcopy and vol copy, which one would be faster?

Only if I have to count speed then vol copy, because it copies blocks directly from disk without going through FS, however I think it’s well suitable if you want to migrate a volume.

Pros
  • CPU usage can be throttled
  • Source volume snapshot can be copied
  • Simultaneously 4 copy operations can be started
  • Once started it goes to background and you can use console for other purpose 

Cons
  • Destination can’t be root volume
  • Destination volume should be offline
  • All data in destination volume will be over-written
  • Destination volume size should be bigger or equal to source
  • Single file or directory cannot be specified for copy operation
  • Both the volumes should be of same type; traditional or flexible
  • If data is copied between two filers both filer should have other filer’s entry in /etc/hosts.equiv file and loopback address for itself in /etc/hosts file 

However for copying data between two filers for test or any other purpose ndmpcopy is more suitable because it gives you additional control and less restrictions, which is very useful.

Pros
  • Little or no CPU overhead
  • Incremental copy is supported
  • No limitation on volume size and type
  • No need to take destination volume offline
  • Single file or directory can also be specified
  • No file fragmentation on destination volume as all data is copied sequentially from source volume so improved data layout
  • No configuration is required between two filers and username and password is used for authentication

Cons
  • Snapshots can’t be copied from source
  • Console is not available till the time copy operation is running so no multiple ndmpcopy operations
  • If lots of small files has to be copied then copy operation will be slower 

So as you have seen both are well however one can’t be replaced for other and both have their usage for different purposes.

3 comments:

Anonymous said...

I tried to copy a volume from a 32bit aggr0 to a 32bit aggr1 on a FAS2040. Both aggregates are 400 GB SATA disks.

The source volume is 125 GB, thin provisioned, but contains only 256 MB of data.

Here are some interesting comparisons:

Vol copy: After 5 mins, it was still at 45% done, estimated at 8 minutes remaining(?)

NMDP copy: Completed in 10 seconds!

Mohit Agarwal said...

Sorry for my late reply, but what you see in your testing is perfectly normal as vol copy works at block level and ndmp copy works as file level. Since you don't have any data in volume therefore ndmp copy can finish faster however for vol copy the volume is of size shown in df -h output of source. So the question I have is what is the space usage of that volume on your source system?

Unix Geek said...

Nice write up.

I wanted to add that the volcopy requires RSH (it wont work if RSH is not enabled). In my filers, I was also troubleshooting "Permission denied" error, and then came across options rsh.access & options rsh.enable = both options must be configured correctly for vol copy to work.