SQL Server RAID 1 , 1+0 and TempDB

  • Hi,

    I am tuning a disk sub system for our OLTP datebase server these

    days. This is DAS disks. I now came into a question.

    The server has 8 148GB SAS drives. To have fault tolerance, we want to

    have RAID mirroring, so RAID 1 or 10. That leaves us half of the

    whole capacity, which is 4 * 148GB. As this box is only used for

    database, we want to have partitions for OS, data file, log file and

    temp db. Now I there is a dilemma:

    I know for best practise, temp db should on its own physical disk. If I set up four partition(logical drives), one for OS, one for data

    files, one for logs and one for temp db, then I can only have RAID 1

    on each of the disk array. But the advantage of this is temp db is

    only its own disk.

    Or the second choice I can have is to partition the disks into three

    array (logical drives), namely OS, data files and logs. In this case I

    can have RAID 1+0 (striping and mirroring) on data file partition and

    RAID 1 on OS  and log.

    Could you give me some idea, which one is better? Any

    disscussions are welcome. Thank you very much.

  • I personally would go with option #1. Reason include that your system is an OLTP system (with considerable size), and I have seen how heavy tempDB operations can deteriorate the performance of OLTP. For OLTP, you should really be concentrating on TempDB I/O.

    I take you are looking at option 2 for resiliency reasons. If resiliency and reliability of data file drive is a concern, I suggest you get a comprehensive backup strategy in place (rather than loosing out a seggregate work space for TempDB).

    Let me know any follow up queries you might have.

    - Vikas Rajput

    _____________
    Vikas S. Rajput

  • Vikas Rajput, thank you for your reply.

    We only have one controller for all 8 disks. If we have two controller, how much improvement it could yield?

    I can see the tempDB is used at moderate level, most used for query sorting, hash match and user defined functions. Since we just upgrade this database about 100GB from SQL Server 2000 to SQL Server 2008 standard edition so we are not using version storing function like: Snapshot isolation and online index creation. Do you think we will benefit from putting tempDB on its own array?

    Moreover, I am going to use SQLIOSim to stress test this Server. Do you use its output to exam server's IO performance? How useful are they? (like Running Average IO Duration (ms), IO request blocks and Number of times IO throttled ) As for my experience before, same disk configuration on different server could get very different SQLIOSim Output.

    -- Frank

  • Option 2 seems to say "build a 4 disk RAID 1+0 array and then sub-divide into partitions"? If that is that correct then I would never recommend it!

    I'll give you an option 3 if I may:

    Disk 1 RAID 1 OS + SQL installation

    Disk 2 No RAID Temp DB

    Disk 3 RAID 1 Data

    Disk 4 RAID 1 Log

    Spare Disk - Warm Standby disk for any failed unit.

    This exposes you to marginally more risk in that the loss of the drive supporting tempdb will force a shutdown of SQL, but if any other disk fails then the array can be rebuilt automatically using the warm standby disk.

    Remember - Tempdb is recreated from new every time the SQL is re-started.

    Ultimately, you haven't really got enough spindles here to make this really effective. Another 2 spindles would mean that you could make Disk 2 RAID 1+0.

    There isn't much point making the Log disk RAID 1+0 as this is essentially written sequentially and a single spindle does this very effectively.

  • Personally i would do this...

    RAID 1 = OS

    RAID 1+0 = data and log

    RAID 1 = tempdb

    Test the above for performance. The only other option i can think of, that i would use, is below. Now a lot of people are going to throw a yellow flag here, but here me out. If you're using SAS drives then it's like having a switched network versus SCSI being more of a hub network. We have used this when we changed from a SCSI system to a SAS system. We only receieved 30% of the drives we had in the SCSI system and it performed 5 times faster. A proc went from 2 hours to 5 minutes...

    RAID 1 = OS

    RAID 1+0 = data, log and TempDB

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

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