SQL write to disk faster than copy?

  • We have had a process whereby we keep two full day's backups available on disk...for faster recovery should we need them.  Recently, i began to examine this situation and found it takes 25 minutes for a dos copy command to copy the  11 Gig database backupfile  to a second disk.  Then, it takes 7 minutes to write our 11 Gig database to disk. 

    My question... how can SQL write to disk faster than Windows/dos can copy it? 

    Both disks are the same type and are both local disks on the server.  The network is not involved.  The copy basically occurs at around 8.4 Mb/sec.  The SQL backup writes at closer to 20 Mb/sec.  I have verified that on most machines around here the file copy process goes at about 8 Mb/sec. 

    How can SQL be faster than windows/dos?

  • Maybe it has to do, that SQL Server writes to the backup file partly from memory and partly from disk and a dos copy needs to read all from disk.

    This is just my logic, it may not be the real reason.

  • Robocopy will be quicker.

    The main issue is the blocksize in which the different products write their file chunks.

    If you look at the perfmon counter: Average Disk Bytes/WRite or Read, and you will see DOS is quite a small size.

    Regards

    Douglas Chrystall

    Imceda Software

     

  • Steve, what is your disk configuration?  I guess they are both physical disks - not logical disks right?  No RAID differences - nothing like that?

    If that's the case, I think it might be a combination of reading 11 GB's from disk 1 and writing 11GB's to disk two - all with limited access to RAM.

    I would expect that your SQL server has priority on the system and a majority of the system RAM.  With your OS giving SQL priority - it may very well help your SQL backup and hinder your OS copy at the same time.

    This is really just a guess though...

    Ryan

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply