{"id":3342,"date":"2011-06-28T07:30:00","date_gmt":"2011-06-28T07:30:00","guid":{"rendered":"https:\/\/test.simple-talk.com\/uncategorized\/sqlio-writes\/"},"modified":"2016-07-28T10:50:28","modified_gmt":"2016-07-28T10:50:28","slug":"sqlio-writes","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/other\/sqlio-writes\/","title":{"rendered":"SQLIO Writes"},"content":{"rendered":"<p><a href=\"http:\/\/www.microsoft.com\/downloads\/en\/details.aspx?familyid=9a8b005b-84e4-4f24-8d65-cb53442d9e19&amp;displaylang=en\">SQLIO<\/a> is a fantastic utility for testing the abilities of the disks in your system. It has a very unfortunate name though, since it&#8217;s not really a SQL Server testing utility at all. It really is a disk utility. They ought to call it DiskIO because they&#8217;d get more people using I think. Anyway, branding is not the point of this blog post. Writes are the point of this blog post.<\/p>\n<p>SQLIO works by slamming your disk. It performs as many reads as it can or it performs as many writes as it can depending on how you&#8217;ve configured your tests. There are much smarter people than me who will get into all the various types of tests you should run. I&#8217;d suggest reading a bit of what Jonathan Kehayias (<a href=\"http:\/\/sqlblog.com\/blogs\/jonathan_kehayias\/\">blog<\/a>|<a href=\"http:\/\/www.twitter.com\/sqlpoolboy\">twitter<\/a>) has to say or wade into Denny Cherry&#8217;s (<a href=\"http:\/\/mrdenny.com\/\">blog<\/a>|<a href=\"http:\/\/www.twitter.com\/mrdenny\">twitter<\/a>) work. They&#8217;re going to do a better job than I can describing all the benefits and mechanisms around using this excellent piece of software. My concerns are very focused.<\/p>\n<p>I needed to set up a series of tests to see how well our product <a href=\"http:\/\/www.red-gate.com\/products\/dba\/sql-storage-compress\/?utm_source=simpletalk&amp;utm_medium=weblink&amp;utm_content=sqliowrites&amp;utm_campaign=sqlstoragecompress\">SQL Storage Compress<\/a> worked. I wanted to know the effects it would have on a system, the disk for sure, but also memory and CPU. How to stress the system? SQLIO of course. But when I set it up and ran it, following the documentation that comes with it, I was seeing better than 99% compression on the files. Don&#8217;t get me wrong. Our product is magnificent, wonderful, all things great and beautiful, gets you coffee in the morning and is made mostly from bacon. But 99% compression. No, it&#8217;s not that good. So what&#8217;s up?<\/p>\n<p>Well, it&#8217;s the configuration. The default mechanism is to load up a file, something large that will overwhelm your disk cache. You&#8217;re instructed to load the file with a character 0x0. I never got a computer science degree. I went to film school. Because of this, I didn&#8217;t memorize ASCII tables so when I saw this, I thought it was zero&#8217;s or something. Nope. It&#8217;s NULL. That&#8217;s right, you&#8217;re making a very large file, but you&#8217;re filling it with NULL values. That&#8217;s actually ok when all you&#8217;re testing is the disk sub-system. But, when you want to test a compression and decompression, that can be an issue. <\/p>\n<p>I got around this fairly quickly. Instead of generating a file filled with NULL values, I just copied a database file for my tests. And to test it with SQL Storage Compress, I used a database file that had already been run through compression (about 40% compression on that file if you&#8217;re interested). Now the reads were taken care of. I am seeing very realistic performance from decompressing the information for reads through SQLIO. But what about writes?<\/p>\n<p>Well, the issue is, what does SQLIO write? I don&#8217;t have access to the code. But I do have access to the results. I did two different tests, just to be sure of what I was seeing. First test, use the .DAT file as described in the documentation. I opened the .DAT file after I was done with SQLIO, using WordPad. Guess what? It&#8217;s a giant file full of air. SQLIO writes NULL values. What does that do to compression? I did the test again on a copy of an uncompressed database file. Then I ran the original and the SQLIO modified copy through ZIP to see what happened. I got better than 99% compression out of the SQLIO modified file (original file of 624,896kb went to 275,871kb compressed, after SQLIO it went to 608kb compressed). <\/p>\n<p>So, what does SQLIO write? It writes air. If you&#8217;re trying to test it with compression or maybe some other type of file storage mechanism like dedupe, you need to know this because your tests really won&#8217;t be valid. <\/p>\n<p>Should I find some other mechanism for testing? Yeah, if all I&#8217;m interested in is establishing performance to my own satisfaction, yes. But, I want to be able to compare my results with other people&#8217;s results and we all need to be using the same tool in order for that to happen. SQLIO is the common mechanism that most people I know use to establish disk performance behavior. It&#8217;d be better if we could get SQLIO to do writes in some other fashion. <\/p>\n<p>Oh, and before I go, I get to brag a bit. Measuring IOPS, SQL Storage Compress outperforms my disk alone by about 30%.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQLIO is a fantastic utility for testing the abilities of the disks in your system. It has a very unfortunate name though, since it&#8217;s not really a SQL Server testing utility at all. It really is a disk utility. They ought to call it DiskIO because they&#8217;d get more people using I think. Anyway, branding&#8230;&hellip;<\/p>\n","protected":false},"author":221792,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[],"coauthors":[],"class_list":["post-3342","post","type-post","status-publish","format-standard","hentry","category-other"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/3342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/221792"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=3342"}],"version-history":[{"count":1,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/3342\/revisions"}],"predecessor-version":[{"id":25307,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/3342\/revisions\/25307"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=3342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=3342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=3342"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=3342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}