Category Archives: SQLServerPedia Syndication

Understanding Benchmarks

That Means What?

Vizzini: HE DIDN’T FALL? INCONCEIVABLE.
Inigo Montoya: You keep using that word. I do not think it means what you think it means.
– Princess Bride

If you are like me, you are constantly reading up on the latest hardware. Each site has it’s own spin on what makes up its review. All of them use some kind of synthetic benchmarking software. Some don’t rely to heavily on them because they can show the real world performance using playback tools. This method is used heavily on gaming hardware sites like [H]ard|OCP where they decided long ago that using purely synthetic benchmarks were at best inaccurate and at worst flat misleading. In the graphics card and processor space this is especially so. Fortunately, on the storage side of the house things are a little simpler.

 

 

What’s In A Workload

In the processor space measuring performance is a complicated beast. Even though every processor may be able to run the same software they can vary wildly in how they do it. On the processor side of things I favor Geekbench right now since it uses known mathematical algorithms. John Poole is very open on how Geekbench works Are the benchmarks relevant to database workloads? I’ll be exploring that in a future post.

In the storage space we have a pretty standard benchmarking tool in Iometer. This tool was initially developed by Intel and spread like wildfire throughout the industry. Intel quit working on it but did something very rare, turned it over to the Open Source Development Lab for continued development. You may ask why I favor Iometer over SQLIO? The answer is simple, complexity. Iometer allows me to simulate diffrent read/write patterns in a very predictable manor. SQLIO doesn’t simulate complex patterns. It does reads or writes, random or sequential for a fixed duration. This is fine for finding the peak performance of a specific IO size but doesn’t really tell you how your storage system might respond under varying workloads. You my notice that they only sites that use SQLIO are SQL Server sites. While the rest of the world generally uses Iometer. The problem is none of the sites that I regularly visit publish the exact Iometer settings they used to get the results they publish. Tom’s Hardware, Anandtech, Ars Technica and Storage Review all use Iometer in some fashion. Doing some digging and testing like hard drives I think most of the sites are using a mix 67% reads 33% writes 100% random at an 2KB block which was defined by Intel and represents an OLTP workload. Storage Review did a nice writeup a decade ago on what they use for I/O patterns and Iometer. This isn’t the best fit for a purely SQL Server workload but isn’t the worst ether. By moving from a 2KB block to an 8KB block we are now squarely in SQL Server I/O land.

SQL Server Specific

Now we are starting to get to the root of the problem. All the main hardware review sites don’t focus on us at all. If we are lucky there will be a single column marked “Database workload”. So what do we do? You read, research and put together your own test suite. SQL Server I/O access patterns are pretty well documented.  So, I put those general patterns in a Iometer configuration file and keep it in my back pocket. I have posted a revised file in the My Tools section here on the site.

For the storage stuff that is fine but what about CPU and memory throughput? Things get a little murky here. Like Glenn Berry(blog|twitter) and I you can use Geekbench to get a baseline on those two things but again, this isn’t a SQL Server specific tool. In most cases sampling a workload via trace getting a baseline on performance then replaying that same workload on different servers will help but only tells you about your application. If you are looking for general benchmarks I personally wouldn’t put much stock in the old TPC-C tests anymore. They aren’t a realistic assessment of database hardware at this point. It is pretty easy to stack a ton of memory and throw a bunch of CPU’s at the test to get some ridiculous numbers. I personally look at TPC-E for OLTP tests since there is a decent sampling of SQL Server based systems and TPC-H for data warehouse style benchmarks. As always don’t expect the exact same numbers on your system that you see on the TPC benchmark scores. Even TPC tells you to take the numbers with a grain of salt.

My Personal Reader List

I personally follow Joe Chang (blog) for hard core processor and storage stuff. He has a keen mind for detail. I also read Glenn Berry(blog|twitter) he has some deep experience with large SQL Server deployments. Also, Paul Randal (blog|twitter) because he has more hardware at his house than I do and puts it to good use. I would advise you to always try and find out how the benchmark was performed before assuming that the numbers will fit your own environment.

What’s On My Todo List

I wrote a TPC-C style benchmark quite a while back in C#. I’m currently building up instructions for TPC-E and TPC-H using the supplied code and writing the rest myself in hopes of building up a benchmark database. This will be in no way an official TPC database or be without bias. I’m also always updating my Iometer and SQLIO tools as well with full instructions on how I run my tests so you can validate them yourself.

As always if you have any suggestions or questions just post them up and I’ll do my best to answer.

SQLDIY: Database Space Detail

Continuing to build up our data gathering library we shift our focus to tracking database file growth. This particular procedure compiles both data and log file usage. This is a fundamental aspect of tracking growth over time and being proactive about growing your databases yourself instead of letting the auto grow making  a mess of your databases. There is no clean and easy way to do this without temp tables so I just have to suck it up and use them. I considered going with a CLR routine and gather more data but we are assuming that you, the user, don’t have the CLR or OLE automation enabled. Personally, I wouldn’t have OLE automation enabled if at all possible. It is another surface area to secure and another source of odd memory issues. There are similar issues with the CLR. Other than the security concerns when there is memory pressure the CLR is ejected and may not be able to load again until the SQL Server process is recycled. With all that in mind I present to you Database Space Detail schema and script!

Series to Date SQLDIY: Manage and Monitor SQL Server Yourself

Link to the script Gather Database Space Detail

I’m hosting all my scripts from this series on GitHub as I do with all my open source projects.

As always, if you find any bugs please let me know and I will correct them!

SQLDIY: Tracking Wait Stats

One of the most important methodologies to date for troubleshooting problems with the SQL Server engine is examining the wait statistics. As with most of the DMV’s provided in SQL Server 2005/2008 sys.dm_os_wait_stats is a cumulative view. To add to my series SQLDIY: Manage and Monitor SQL Server Yourself  here is my stored procedure for capturing deltas on an ongoing basis. It is modeled the same way I capture sys.dm_io_virtual_file_stats. This procedure captures the delta and the raw data at a point in time. This allows you to do your own roll ups to look at the numbers in different ways. Another reason I do this is to capture what happened before the problem and right at the beginning as the customer started reporting the problems. Starting with the slide deck from Joe Sack (blog|twitter) on Performance Tuning With Wait Statistics as a foundation and working through the links provided, you will be able to get up to speed quickly.

Link to the script Gather Server Wait Stats

I’m hosting all my scripts from this series on GitHub as I do with all my open source projects.

As always, if you find any bugs please let me know and I will correct them!

Your Homework:
SQL Server 2005 Waits and Queues Tom Davidson
SQL Server Waits and Queues Robert Pearl (blog|twitter)
SQL Server 2008 DR, Testing, Waits and Queues Jose Barreto (blog|twitter)
Drum Roll, Please…The Debut of The SQL DMV All-Stars Dream Team! Jimmy May(blog|twitter)

Specific examples on using wait stats:
Diagnosing Transaction Log Performance Issues and Limits of the Log Manager Mike Ruthruff (blog|twitter)
How do you measure CPU pressure? Tom Davidson

SQLRally, SQL Saturday and The Summit

“Gotta say it was a good day…”

-Ice Cube
 

On The SQL Saturday Circuit

I’ve been speaking at all the regional SQLSaturday events I can go to. I kicked off the year with SQLSaturday #57 in Houston. Then did a turn around to SQLSaturday #63 in Dallas, my second one there. I have submitted to Baton Rouge figuring I could drive it but after that I’d be tapped out on vacation time and money. Lucky for me, Idera started the A.C.E. program and chose me as part of the very first group to sponsor for this year. I’m now gearing up to submit to more SQLSaturday’s. Hopefully I’ll get picked!

Is this Thing On?

From Thomas Wanhoff via Flickr

I did my first live webinar on Idera’s Secrets of SQL Server  webcast series. It was a three part series over SQL Server and storage technologies. My first part pulled in around 900 people. Part 2 around 500 and part 3 around 350. All in all, I would call it a success. I had a great time doing them. I was terrified to do them. I have done a ton of public speaking and a short stint in radio broadcasting, but this felt completely different. It was in a way. I couldn’t just ham it up like I would on the radio and not having the feed back from a live audience made it difficult to tell if I was going off the rails.

On The National Stage

I was notified by SQLRally that I would be presenting my storage talk at the very first event in Orlando. I was stunned. First, that I made the initial cut. Secondly, that I was chosen by all of you over so many other great abstracts and speakers. I resolved to make this the best presentation I could. Later, I got the call that I had been chosen for a 90 minute deep dive session. I knew I could carry 90 minutes with the amount of material I’ve got handy so that wasn’t an issue. Not wanting to disappoint those who attended was though. Just to keep things interesting, I helped perform eScan’s first move into a real data center, got the flu oh and resigned to go to work for Dell. All of this right before SQLRally. My last day at work was on a Tuesday, I left at lunch got on the plane to Florida an gave it my all. The reaction was just overwhelming. The amount of people that kept coming up to me through the rest of the conforince to let me know how much they liked the session was just staggering. People that I’ve known for years kept telling me just how solid it was. I didn’t disagree with them but when I got the evaluations back I knew I’d knocked it out of the park.  They also just announced the top rated speakers and I came in number second, Adam Jorgensen (twitter|blog) just squeaking past me. I would have been jazzed just to be in the top 10. Again, I am humbled to be in such excellent company.

The Big Show

If all of that wasn’t enough I got the nod. For years I’ve dreamed of speaking at The Summit. I’ve been to almost every one of them. I submitted two sessions. My talk on the fundamentals of storage got the green light and my solid state storage was selected as an alternate. What do I say? I’m humbled, honored and very excited to be a speaker at the premiere SQL Server event of the year.

Now What?

I’m not sure to be honest. It is only June. I’ve got more stuff to get done for the local and regional PASS chapters, a SQL Saturday to host in Austin by the end of the year. I got to say, this is going down as one of my best years ever serving the SQL Server community.

Speaking at SALSSA June 15th 2011:Understanding Storage Systems and SQL Server

I am very exicted to be speaking at the San Antonio PASS chapter SALSSA! It’s been way to long and I look foward to catching up with Jim Steiner the coordinator. I will be giving my favorite talk Understanding Storage Systems and SQL Server. It has been updated and improved as well.

There will be free pizza, great people and as always, I’ll answer as many questions as possible!

When: Wednesday June 15th, 6:00pm – 8:00pm
(Always the third Wednesday of the month)

Where: New Horizons, San Antonio TX
8200 IH 10 West Suite 500