Announcement

Collapse
No announcement yet.

Run disk defrag on a disk which has exchange databases

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Run disk defrag on a disk which has exchange databases

    The disk on which the exchange databases are sitting is fragmented. I am thinking of running a windows or a diskeeper deframentation. I want to know is it safe to run a deframentation on disk which has exchange databases.

  • #2
    Re: Run disk defrag on a disk which has exchange databases

    There is no problems running any kind of file structure defrag (diskeeper or other):
    http://www.diskeeper.com/defrag/dk-email-servers.asp

    * But just to be on the safe side - verify you have a valid backups
    CNE 5, CCA, MCSE NT4.0-2003, MCSE 2003 messaging, Exchange Server MVP.
    Tzahi Kolber - IT Supervisor
    Polycom Israel.

    Comment


    • #3
      Re: Run disk defrag on a disk which has exchange databases

      The general consensus is that you only run diskeeper or other defrag tool on a drive with an Exchange database if you have lots of time on your hands and don't mind running the risk of knocking email over.

      IE - don't do it.

      While the database appears fragmented to a tool like diskeeper is not impacting the performance of Exchange.

      If you insist on doing it, then stop Exchange first. There is still a small risk of Exchange not starting afterwards due to the changes to the files.

      I don't defrag the drives with Exchange databases on it on any server that I administrate. I also have the Exchange databases on a dedicated drive, that contains nothing else but the databases, so I don't care about the fragmentation state.

      Simon.
      --
      Simon Butler
      Exchange MVP

      Blog: http://blog.sembee.co.uk/
      More Exchange Content: http://exchange.sembee.info/
      Exchange Resources List: http://exbpa.com/
      In the UK? Hire me: http://www.sembee.co.uk/

      Sembee is a registered trademark, used here with permission.

      Comment


      • #4
        Re: Run disk defrag on a disk which has exchange databases

        Thanks Simon

        The performance of exchange is crap. We don't have anything else on the disk except for exchange databases. When I anaylsed the disk it is badly fragmented.
        So we thinking that a defrag would improve the performance.
        The below article says that we can improve exchange performance by defraging the disk on which the exchange database exist.

        http://www.windowsitpro.com/Microsof...194/26194.html

        Comment


        • #5
          Re: Run disk defrag on a disk which has exchange databases

          Thanks tbolker. Thats a really great link.

          Comment


          • #6
            Re: Run disk defrag on a disk which has exchange databases

            The only problem with the link supplied above is that it was written by Diskeeper. They aren't exactly independent authorities on defragging of hard disks considering they make the best selling third party defragger and created Microsoft's defragger for them.

            The second link I cannot read as it is subscriber only and I don't subscribe.

            I have Exchange servers that diskeeper shows the entire drive being all red - ie the entire drive is fragmented - but Exchange is working fine. If the drive contains JUST the Exchange databases then you will not gain anything from defragging the drive.

            If performance of Exchange is poor, have you actually investigated where the performance issues are?
            The Microsoft Performance troubleshooting tool can help with that, or you can do it manually using the troubleshooting guide and perfmon.

            The problem could be disk IO, but that may not be down to the defragmented hard disk. Exchange is very storage heavy, and is a high transactional database. Disk fragmentation doesn't affect the Database in the same way as it does other files because of the way that Exchange reads and writes to the file. I would be surprised if the database files were not fragmented.

            Ultimately it is your decision. However consider the points I made above about not doing it while Exchange is running as that can break your database.

            Simon.
            --
            Simon Butler
            Exchange MVP

            Blog: http://blog.sembee.co.uk/
            More Exchange Content: http://exchange.sembee.info/
            Exchange Resources List: http://exbpa.com/
            In the UK? Hire me: http://www.sembee.co.uk/

            Sembee is a registered trademark, used here with permission.

            Comment


            • #7
              Re: Run disk defrag on a disk which has exchange databases

              Simon, this is what the second link says. http://www.windowsitpro.com/Microsof...194/26194.html

              Disk defragmenters move file fragments around until the pieces of each file (or of as many files as possible) on the disk are contiguous and in order. Defragmented files speed access to the data in the files. Most defragmenters also work on the NTFS Master File Table (MFT), thus improving access times for directory data.

              Exchange has an internal defragmentation process (i.e., the online defragmentation that occurs as part of the daily Information Store—IS—maintenance process), but that process doesn't touch the MFT or physically defragment disk data—it simply defragments the database pages inside each file. In his excellent book "Scaling Microsoft Exchange 2000" (Digital Press, 2001), Pierre Bijaoui points out two reasons to defragment Exchange servers physically. First, fragmentation decreases backup throughput. Because the backup process must provide pages in the correct order, backups of fragmented disks run slowly. Second, when an application asks NTFS to extend a file's size, NTFS does so by adding an extent to the file. The more extents per file, the longer the Chkdsk utility takes to run after an unexpected reboot. For large database files, fragmented disks can dramatically increase the time required to complete a Chkdsk pass. . . .

              Thanks to WIndowsITPro for the above article.
              1 1 was a racehorse.
              2 2 was 1 2.
              1 1 1 1 race 1 day,
              2 2 1 1 2

              Comment


              • #8
                Re: Run disk defrag on a disk which has exchange databases

                That is just the public "teaser" bit. I could see that. What I couldn't see was the rest of the article - which you need to be a subscriber to see.

                Simon.
                --
                Simon Butler
                Exchange MVP

                Blog: http://blog.sembee.co.uk/
                More Exchange Content: http://exchange.sembee.info/
                Exchange Resources List: http://exbpa.com/
                In the UK? Hire me: http://www.sembee.co.uk/

                Sembee is a registered trademark, used here with permission.

                Comment


                • #9
                  Re: Run disk defrag on a disk which has exchange databases

                  Simon

                  I have databases and logs on the same disks with different partitions could that be a reason for the exchange perforamnce.I did a perfmon on our exchange server and compared what the optimal values are. All the counters seem to be fine but the counters reads/sec and the other read counters are far more then the optimal values.

                  Comment


                  • #10
                    Re: Run disk defrag on a disk which has exchange databases

                    Logs and database on the same physical drive will be a big performance hit.
                    Defragging the hard drive in that scenario would have zero effect on the performance of the of the server.

                    You need to get either the databases or the transaction logs off the drive on to another drive. You should then see a significant performance gain.

                    Simon.
                    --
                    Simon Butler
                    Exchange MVP

                    Blog: http://blog.sembee.co.uk/
                    More Exchange Content: http://exchange.sembee.info/
                    Exchange Resources List: http://exbpa.com/
                    In the UK? Hire me: http://www.sembee.co.uk/

                    Sembee is a registered trademark, used here with permission.

                    Comment


                    • #11
                      Re: Run disk defrag on a disk which has exchange databases

                      Simon

                      Can you explain me how moving the logs to a another disk would improve the performance.My understanding is that both logs and database are disk write operations.But I am having the problem with the read performance of the disk.

                      Comment


                      • #12
                        Re: Run disk defrag on a disk which has exchange databases

                        Exchange is high transactional.
                        When something happens to the database it writes sequentially to both the transaction logs and the database.
                        Even with the fastest drives you still have two reads and writes going on at the same time. That will thrash the drive.

                        Read any of the best practises guides or the EXBPA tool - both will tell you to separate the transaction logs and the database files for optimum performance.

                        Simon
                        --
                        Simon Butler
                        Exchange MVP

                        Blog: http://blog.sembee.co.uk/
                        More Exchange Content: http://exchange.sembee.info/
                        Exchange Resources List: http://exbpa.com/
                        In the UK? Hire me: http://www.sembee.co.uk/

                        Sembee is a registered trademark, used here with permission.

                        Comment


                        • #13
                          Re: Run disk defrag on a disk which has exchange databases

                          Thanks Simon

                          Is there a way to close the question.

                          Comment


                          • #14
                            Re: Run disk defrag on a disk which has exchange databases

                            No, however you could grant some reputation points to the ones that helped you.
                            Cheers,

                            Daniel Petri
                            Microsoft Most Valuable Professional - Active Directory Directory Services
                            MCSA/E, MCTS, MCITP, MCT

                            Comment


                            • #15
                              Re: Run disk defrag on a disk which has exchange databases

                              I have been doing Tech Support for defragmenters since 1990. I have never seen a case of a defragmenter corrupting Exchange, unless there was an existing disk error, such as “cluster incorrectly marked free”. In the presence of disk errors, ANY writing to the database could cause corruption.

                              The Exchange Database and log files will be locked during any times when it could be dangerous to modify them. Usually they are locked all the time the Exchange Service is running. Any GOOD defragmenter will respect the lock and not try to move locked files, and thus will not be dangerous, as long as you have no existing disk errors.

                              As Sembee points out, the best setup is to have a partition with only Exchange databases on it. If you can manage it, one database per partition is ideal.

                              So, yes, defragment. But first run chkdsk, and as always, have current backups.

                              Comment

                              Working...
                              X