Sql-server – LDF files vs. TRN files vs. Tempdb.MDF+LDF files.:

arraydatafilesql-server-2008tempdbvirtualisation

We have a dilemma…
We have all of our MDF and LDF files in the same…\192.168.6.22\d$\Program Files\Microsoft SQL Server\DATA\Production…folder.
We have all of our TRN and BAK files on the…\192.168.6.22\r$…drive.
We have read several articles stating that our Tempdb.MDF+LDF files need to be relocated to a different drive.
We have read several articles stating that our Userdb.LDF files also need to be relocated to a different drive.

http://www.brentozar.com/archive/2009/02/when-should-you-put-data-and-logs-on-the-same-drive/
http://www.tech-recipes.com/rx/19178/sql-server-20082008-r2-move-tempdb-to-improve-performance/

  1. This system is in a virtual environment, so it’s more than likely all of these drives are all on the same array anyway, and if that’s the case would relocation make any difference?

  2. If they are on separate arrays, or if it will make a difference, then should there be four separate locations or five, and do each of these need their own array?.:
    a. One for the MDF files; (1)
    b. One for the LDF files; (2)
    c. One for the BAK and TRN files; (3)
    d. One for the Tempdb.MDF+LDF files; (4) or…
    …One for the Tempdb.MDF file, and another for the Tempdb.LDF file; (5)

Best Answer

A few notes here:

  1. You definetely have to separate the files logically using different partitions (I recommend separate partitions for: system, data files (mdf/ndf), transaction log files (ldf) and tempdb files (mdf/ndf). Where you put the tempdb transaction log file is up to you (tempdb drive or log drive), I'd go with log drive.
  2. Backup files should not be on the located same device and especially the same VM (I recommend a different SAN/NAS).
  3. Placing your data, log and tempdb files on different drives is mostly a way of improving performance. Transaction log is heavily written and is probably the slowest component of SQL Server. The second bottleneck is by design the tempdb database. If these 2 components are placed on different drives (especially if they reside on SSD/RAID10 disks), the performance will be definitely better.
  4. You can keep the transaction log and tempdb on the same array as the user database files if you aren’t experiencing performance problems (at least not yet). I would look at the sys.dm_io_virtual_file_stats DMV to verify if there really is a problem with IO performance.
  5. If you want to move these files to a different disk in a virtual environment you can create a separate virtual disk for every partition you want to move and assign these disks to different LUNs in the array.