30.06.2013 Views

Performance Tuning with SQL Server Dynamic Management Views

Performance Tuning with SQL Server Dynamic Management Views

Performance Tuning with SQL Server Dynamic Management Views

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The results are as follows:<br />

Chapter 6: Physical Disk Statistics and Utilization<br />

drive RatioOfReads RatioOfWrites TotalBytesRead TotalBytesWritten<br />

----- ----------------- --------------- -------------------- --------------------<br />

E 0.509947179620… 0.49005282037… 324253917696 311603933184<br />

F 0.953302196684… 0.04669780331… 2213262221312 108417335296<br />

H 0.376100820227… 0.62389917977… 344707538944 571822073344<br />

I 0.922886044827… 0.07711395517… 1316300808192 109986668544<br />

J 0.708701451352… 0.29129854864… 381697171456 156889522176<br />

K 0.974068440224… 0.02593155977… 1040343924736 27695939584<br />

As you can see, some of the drives are heavily skewed towards reads (92:8 for the I: drive),<br />

whereas H: is skewed towards writes. Do any of these values indicate a potential problem?<br />

As the old DBA saying goes: "It depends." In this case, the H: drive contains tempdb,<br />

so heavy writes are to be expected. The E: drive, <strong>with</strong> a ratio of 51:49, is where all the<br />

tempdb logs reside.<br />

Of considerable concern are the I:, F:, and K: drives, where we have a tremendous amount<br />

of reading taking place in each case. These drives house the data for one of our heavy<br />

use databases and I would certainly like to investigate further to see if the amount of<br />

data being read could be reduced. The next step is to obtain the read:write ratios for this<br />

database in terms of the number of read and write operations. If this method reveals a<br />

ratio much closer to 50:50 then we know that reads are reading a disproportionately high<br />

amount of data.<br />

Number of read and write operations<br />

Listing 6.19 takes exactly the same form as Listing 6.17, except that it returns the number<br />

of reads and writes as a proportion of the total number of reads and writes.<br />

253

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!