SPC_Kevin

updated

20 years ago

S

SPC_Kevin

3 Posts

0

702

March 12th, 2007 11:00

SQL Server 2000 Database Disk Defragmnetation on a Cx600? Do I ??

I am working on a SQL Server 2000 Database running on a cluster hooked to a Cx600. Currently the DB is different file groups across several "Drives" on the SAN. I have begun looking at tunning and tweaking the DB as is it rather fat and lethargic.

I have been looking into de-fragging the disk at the OS Level but, I have not found any info positive or negative for doing so. I read the EMC "Best Practices" White paper for SQL Server 2000 and disk de-fragmentation wasn't even mentioned.

I am new to the Cx600 and SANs in generall and just getting my feet wet.
What the preference? Defrag the disk or No for performance? If so, anyone have a utility they'd like to recommend?

Thanks,
  • Allen Ward

    6 Operator

    •

    2124 Posts

    338

    0

    Posted March 12th, 2007 12:00

    Well, I'm no expert in SQL, but what I can tell you is that while you might get good advice here, the type of defrag you are talking about is completely independent of the storage you are attached to.

    Your CX600 doesn't know (or care) about the file level and the only defrag it cares about is how LUNs are positioned on it's RAID Groups.

    You will probably be better off looking for White Papers from Microsoft on their recommended best practices.

    Now, that being said, I would be surprised if there wasn't at least one person on here who can offer you some advice along those lines anyway :-)

    Oh, and welcome to the Forums!
  • kelleg

    6 Operator

    •

    4537 Posts

    338

    1

    Posted March 12th, 2007 15:00

    In general, defragging will improve performace - defrag at the file system or the application level - try it and see if it helps. I remember from a while back that there use to be something called "reorg" that did something like defrag for databases.

    There is also a "defrag" at the array Raid Group level - I would recommend that you do NOT do that unless you are trying to get a larger contiguous free space - see the build-in help in Navisphere for more information.

    glenk
  • Kiran3

    410 Posts

    338

    1

    Posted March 13th, 2007 01:00

    defrag will not help much for SQL...it will help SQL daemon to access the files quiet fast...but the database internally may be fragmented, causing jumps in i/o access for SQL.

    this is a good pointer by microsoft for tuning db indices, worth having a look.
    http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx

    its worth having a look at the db configuration for any performance bottlenecks...e.g. tables without indices

    here is one link (not the only though)
    http://www.devarticles.com/c/a/SQL-Server/How-to-Perform-a-SQL-Server-Performance-Audit/3/

    as said above, checking with emc best practices for sql setup will help too...from san view point, make sure that the i/os for data and log file go to different raid groups on clariion. do not try to use rais group on first 5 disks of the array and do not put too many i/o intensive LUNs on same RG etc.

    most often its found that database design and layout plays a major role in performance so try to see things from database to array rather than the other way round..

    oh btw, have you been experiencing the perf-blame-game? developer blaming dbas, dbas blaming san and the saga continues...welcome to the world of performance tuning!
  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    338

    0

    Posted March 13th, 2007 03:00

    oh yeah ... i tell my dba's after checking everything on the SAN side. "listen guys, disk can only spin that fast, if you stop doing full table scan with every query you run ..maybe it will perform better :) "
  • SPC_Kevin

    3 Posts

    338

    0

    Posted March 13th, 2007 09:00

    Thanks for all the Input, At this point the logs and database are on different LUNs but, I have not been give the lowdown of how the LUNs, disks, etc, are broken up.

    In the mean time I do defrag the indexes weekely but, the DB grows and shrinks often, mostly shrinking, as I am finding millions of rows of old orphaned data that needs to go. I am guessing I need to defrag because of that. I need to download something like Diskeeper and run an analyze to know for sure.

    once I know what the current SAN setup is, I may go back and rearrange them into smaller drives across more controllers and have more file groups in SQL Server withtables and indexes spread out separately across them.

    At this point there are not often cries about poor performance but, I see high disk queue lengths allot and the data managed to grow by 15GB over last year with no explanation.

    My goal is to get it all tuned and running smooth really before anyone notices.
  • 338

    0

    Posted April 17th, 2007 05:00

    Maybe it could help you some tips.

    Watch the LUN if they are in the same Raid Group or not. If so they are sharing spindles so it will impact in performance.
    Take the LUNs on Raid 1/0 better than in Raid5 although i guess the are already in Raid1/0 if you read the best practices white paper.

    Through analyzer (once the advanced statistics are enabled) see if cache hits or reads from reads cache or writes cache hits take a high value. If not, SQL sentences are always asking the whole of the disk instead of CX memory.

    Tune this SP memory increasing the write cache or read cache as you usually best use the sql database.

    - Talk to developers to make less expensive sql sentences (avoid select *).
    - Increase if you can the number of LUNs acrooss Raid Groups to add more disk spindles, make tests.
    - Analyze periods to locate the problem...
    - See the system or application event viewer in order to find something wrong.
    - Define the performance monitor metrics (disk queues, memeory) of the OS to know where and why this performance problem occurs.

    And pray... ;-)

    Hope it helps you.

    Regards.