VMware vSphere

 View Only
  • 1.  Slow copy performance with 'cp' between datastores

    Posted Mar 18, 2011 09:49 AM

    I noticed that the copy of a vmdk file is very slow between 2 datastores with the command 'cp' on an ESXi. The datastore browser does it much faster.

    So I've tested the following:

    For my test i used a 5 GB vmdk-file (thick).

    Copy from Datastore1 to Datastore2:

         with 'cp': time ~ 4:04 minutes

         with FastSCP: time ~ 2:55 minutes

         with Datastore Browser: ~ 36 seconds

         with vmkfstools -i: ~ 35 seconds

    Did anyone know why this is so or have observed the same?

    Regards

    OVE



  • 2.  RE: Slow copy performance with 'cp' between datastores

    Posted Mar 18, 2011 10:05 AM

    Yup, cp has always been slower than vmkfstools, and I think that it's frowned upon as a method for copying vmdks.



  • 3.  RE: Slow copy performance with 'cp' between datastores

    Posted Mar 18, 2011 11:00 AM

    Hi

    I think the Datastore Browser used vmkfstools. That would explain the same copy time.



  • 4.  RE: Slow copy performance with 'cp' between datastores

    Posted Mar 18, 2011 01:32 PM

    I made the following discovery:

    I tested with on vmdk-file with following parameters:

         vmdk-file (thin): size 3,36 GB of 20 GB,

         Guest OS shows 2,6 GB

    Copy time from Datastore1 to Datastore2 with Datastore Browser: ~ 24 secounds

    I maked an 1 GB testfile in the guest-vm. After this step the vmdk-file has this parameters

         vmdk-file (thin): size 5,35 GB of 20 GB,

         Guest OS shows 3,6 GB

    Copy time from Datastore1 to Datastore2 with Datastore Browser: ~ 35 secounds

    After i deleted the testfile:

         vmdk-file (thin): size 5,35 GB of 20 GB,

         Guest OS shows 2,7 GB

    Copy time from Datastore1 to Datastore2 with Datastore Browser: ~ 35 secounds

    I converted the vmdk-file in thick:

         vmdk-file (thin): size 20 GB of 20 GB,

         Guest OS shows 2,7 GB

    Copy time from Datastore1 to Datastore2 with Datastore Browser: ~ 1:56 minutes

    Another test with an other vmdk-file:

         vmdk-file (thick): size 5 GB,

         Guest OS shows: 1,6 GB

    Copy time from Datastore1 to Datastore2 with Datastore Browser: ~ 34 secounds

    I converted the vmdk in to thin format:

         vmdk-file (thick): size 2 of 5 GB,

         Guest OS shows: 1,6 GB

    Copy time from Datastore1 to Datastore2 with Datastore Browser: ~ 54 secounds

    I converted the vmdk back to thick format:

         vmdk-file (thick): size 5 GB,

         Guest OS shows: 1,6 GB

    Copy time from Datastore1 to Datastore2 with Datastore Browser: ~ 34 secounds

    This is strange. But i think it means, that the Browser only copy the real data and 'cp/mv' the hole file.

    Why a converted file (thin -> thick) increase the copy time is serious.



  • 5.  RE: Slow copy performance with 'cp' between datastores

    Posted Mar 18, 2011 01:39 PM

    Correct the datastore browser will copy only used data, same for vmkfstools.