DBA Days: Chaos Sloth

I love a bad idea

I mean, just look at me. I’m covered in them! So when Brent wanted to randomly make his server act crappy, I wrote a script for it.

Usual caveats here. Don’t run this in production. I’m not responsible for anything you do after you hit copy and paste. In fact, I’m not responsible for anything before or in between, either.

You are your own fault.

What does this thing do?

It randomly generates values and changes some important configuration settings.

  • Max Degree of Parallelism
  • Cost Threshold
  • Max Memory
  • Database compatibility level

This was written for SQL Server 2016, on a box that had 384 GB of RAM. If your specs don’t line up, you may have to change the seed values here. I’m not putting any more development into this thing to automatically detect SQL version or memory in the server, because this was a one-off joke script to see how bad things could get.

How bad did they get? The server crashed multiple times.

Umpire sits

Here’s the script. I highly don’t recommend setting it up as an agent job that runs every 10 minutes.

Thanks for reading!

Brent says: the name comes from Netflix’s Chaos Monkey, part of their open source Simian Army set of tools that will randomly break things in their AWS environment. They figure if they randomly take things down, it’ll force developers and admins to build a more reliable, tolerant infrastructure.

, , ,
Previous Post
DBA Days: Scripts from Downtime Train
Next Post
DBA Days: Killing TempDB softly

7 Comments. Leave new

  • Yikes! You could put an eye out with that thing.

    Reply
  • Someone WILL inevitably poke their eye out with this in production. Be ready for the consult calls. Heh.

    Reply
  • randal mitchell
    September 7, 2016 1:54 pm

    Oh! This brings back memories of similar practical jokes from my early days as a coder.

    Reply
  • I like the clean new look of the website by the way.

    Nice work guys.

    Reply
  • Will SQL 4 Food
    September 9, 2016 11:12 am

    Simian Army reminds me of the opening scene of Toy Story 3 where Hamm punches the “Death by Monkeys” button and drops a literal barrel of them. The nuclear cloud of them is an awesome extra touch.

    Reply
  • “the name comes from Netflix’s Chaos Monkey, part of their open source Simian Army set of tools that will randomly break things in their AWS environment. They figure if they randomly take things down, it’ll force developers and admins to build a more reliable, tolerant infrastructure.”

    Me likey that method that method of ensuring reliability VERY much 😀

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

Menu
{"cart_token":"","hash":"","cart_data":""}