SQL

SQL Server on Linux – External Memory Pressure with 2019 CTP2

In this blog post we’re going to revisit how SQL Server on Linux responds to external memory pressure. This is a very long post, and it ends with me not knowing exactly what’s going on…but the journey is pretty fun…let’s go!

On Windows-based SQL Server systems we’ve become accustomed to the OS signaling to SQL Server that there’s a memory shortage. When signaled, SQL Server will kindly start shrinking it’s memory caches, including the buffer pool, to maintain overall system stability and usability. Well that story is a little different in SQL Server on Linux…last year I wrote a similar post for SQL Server 2017 RTM and how it reacted to external memory pressure, check that out here! That was quite a dramatic story, you can literally cause SQL Serve to swap nearly its entire process address space out to disk! Now, let’s look and see how SQL Server on Linux responds to external memory pressure in SQL Server 2019 CTP2.

My Experiences Tech Editing Pro SQL Server on Linux

The Opportunity

Earlier this year I received an email from Jonathan Gennick, an editor at Apress books. The subject of the email was “Tech edit a book” and he asked if I was familiar with SQL Server on Linux. I excitedly replied “yes…I think I’m your guy for this”. In 2017, I had the opportunity to tech edit another book on SQL Server on Linux and had to back out of that project and this was a fantastic second chance to still be able to work on a topic I really want to participate in and help move forward. I replied to Jonathan and asked who the author is…he replied…the author is Bob Ward.

I’m Speaking at SQLSaturday Cambridge!

Speaking at SQLSaturday Cambridge!

  I’m proud to announce that I will be speaking at <a href="http://www.sqlsaturday.com/748/EventHome.aspx">SQL Saturday Cambridge</a> on September 8th 2018! And wow, 748 SQL Saturdays! This one won’t let you down. <a href="http://www.sqlsaturday.com/748/Sessions/Schedule.aspx">Check out the amazing schedule</a> of International Experts and Microsoft MVPs!

  If you don’t know what SQLSaturday is, it’s a whole day of free SQL Server training available to you at no cost!

  If you haven’t been to a SQLSaturday, what are you waiting for! <a href="https://www.sqlsaturday.com/748/registernow.aspx">Sign up now</a>!

  <a href="http://www.sqlsaturday.com/748/EventHome.aspx"><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.sqlsaturday.com/images/sqlsat748_header.png" alt="SQLSaturday #748 - Cambridge 2018" /></a>

  **This year I have TWO sessions!**

  **1. **<a href="http://www.sqlsaturday.com/748/Sessions/Details.aspx?sid=78607">**Monitoring Linux Performance for the SQL Server Admin**</a>

<blockquote>

    So you’re a SQL Server administrator and you just installed SQL Server on Linux. It’s a whole new world. Don’t fear, it’s just an operating system. It has all the same components Windows has and in this session we’ll show you that. We will look at the Linux operating system architecture and show you where to look for the performance data you’re used to! Further we'll dive into SQLPAL and how it architecture and internals enables high performance for your SQL Server. By the end of this session you’ll be ready to go back to the office and have a solid understanding of performance monitoring Linux systems and SQL on Linux. We’ll look at the core system components of CPU, Disk, and Memory and monitoring techniques for each.

</blockquote>

  **2. **<a href="http://www.sqlsaturday.com/757/Sessions/Details.aspx?sid=78317">**Containers – You Better Get on Board**</a>

<blockquote>

    Containers are taking over, changing the way systems are developed and deployed…and that’s NOT hyperbole. Just imagine if you could deploy SQL Server or even your whole application stack in just minutes. You can do that, leveraging containers! In this session, we’ll get your started on your container journey learning container fundamentals in Docker, then look at some common container scenarios and introduce deployment automation with Kubernetes. In this session we’ll look at Container Fundamentals with Docker Common Container Scenarios Automation with Kubernetes.

</blockquote>

Questions from PASS Marathon Containers

Thanks to everyone who attended the PASS Marathon Containers edition and to PASS for the opportunity to present. I received the Questions from the session and wanted to provide answers to the attendees and the community.

If you want to see the session again, check it out on YouTube. The decks are available online at http://www.centinosystems.com/blog/talks/

Here’s the list of questions from the session and my answers.

  • What do you mean it is not for production environment in Windows?

Speaking at SQLSaturday Sacramento – 757!

Speaking at SQLSaturday Sacramento!

  I’m proud to announce that I will be speaking at <a href="http://www.sqlsaturday.com/757/eventhome.aspx">SQL Saturday Sacramento</a> on July 28th 2018! And wow, 757 SQL Saturdays! This one won’t let you down. <a href="http://www.sqlsaturday.com/757/Sessions/Schedule.aspx">Check out the amazing schedule</a>!

  If you don’t know what SQLSaturday is, it’s a whole day of free SQL Server training available to you at no cost!

  If you haven’t been to a SQLSaturday, what are you waiting for! <a href="https://www.sqlsaturday.com/757/registernow.aspx">Sign up now</a>!

  <a href="https://www.sqlsaturday.com/757/registernow.aspx"><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.sqlsaturday.com/images/sqlsat757_header.png" alt="SQLSaturday #757 - Sacramento 2018" /></a>

  **This year I have TWO sessions!**

  **1. **<a href="http://www.sqlsaturday.com/757/Sessions/Details.aspx?sid=78312">**Monitoring Linux Performance for the SQL Server Admin**</a>

<blockquote>

    So you’re a SQL Server administrator and you just installed SQL Server on Linux. It’s a whole new world. Don’t fear, it’s just an operating system. It has all the same components Windows has and in this session we’ll show you that. We will look at the Linux operating system architecture and show you where to look for the performance data you’re used to! Further we'll dive into SQLPAL and how it architecture and internals enables high performance for your SQL Server. By the end of this session you’ll be ready to go back to the office and have a solid understanding of performance monitoring Linux systems and SQL on Linux. We’ll look at the core system components of CPU, Disk, Memory and Networking monitoring techniques for each and look some of the new tools available.

</blockquote>

  **2. **<a href="http://www.sqlsaturday.com/757/Sessions/Details.aspx?sid=78317">**Containers – You Better Get on Board**</a>

<blockquote>

    Containers are taking over, changing the way systems are developed and deployed…and that’s NOT hyperbole. Just imagine if you could deploy SQL Server or even your whole application stack in just minutes. You can do that, leveraging containers! In this session, we’ll get your started on your container journey learning container fundamentals in Docker, then look at some common container scenarios and introduce deployment automation with Kubernetes. In this session we’ll look at Container Fundamentals with Docker Common, Container Scenarios and Orchestration with Kubernetes

</blockquote>

Speaking at SQLSaturday Atlanta – 733

Speaking at SQLSaturday Atlanta!

  I’m proud to announce that I will be speaking at <a href="https://www.sqlsaturday.com/733">SQL Saturday Atlanta</a> on May 17th 2018! This one won’t let you down! <a href="https://www.sqlsaturday.com/733/Sessions/Schedule.aspx">Check out the amazing schedule</a>!

  If you don’t know what SQLSaturday is, it’s a whole day of free SQL Server training available to you at no cost!

  If you haven’t been to a SQLSaturday, what are you waiting for! <a href="https://www.sqlsaturday.com/733/registernow.aspx">Sign up now</a>!

  My presentation is **“<a href="http://www.sqlsaturday.com/733/Sessions/Details.aspx?sid=71960">Monitoring Linux Performance for the SQL Server Admin</a>” **

  <img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.sqlsaturday.com/images/sqlsat733_header.png" alt="SQLSaturday #733 - Atlanta 2018" />

  Here’s the abstract for the talk

<blockquote>

    So you’re a SQL Server administrator and you just installed SQL Server on Linux. It’s a whole new world. Don’t fear, it’s just an operating system. It has all the same components Windows has and in this session we’ll show you that. We will look at the Linux operating system architecture and show you where to look for the performance data you’re used to! Further we'll dive into SQLPAL and how it architecture and internals enables high performance for your SQL Server. By the end of this session you’ll be ready to go back to the office and have a solid understanding of performance monitoring Linux systems and SQL on Linux. We’ll look at the core system components of CPU, Disk, Memory and Networking monitoring techniques for each and look some of the new tools available including new DMVs and DBFS.Prerequisites: Operating system fundamentals, process, memory and disk concepts.

</blockquote>

Attempting to Run SQL on Linux Inside Windows Subsystem for Linux

Update - head on over to Andrew Pruski’s blog to find out how to get this to work!

Shawn Melton MVP and dbatools contributor last week had an issue running SQL Server on Linux inside of Windows Subsystem for Linux.

I didn’t want to leave a brother hanging so I spent this morning digging into this a little bit.

A Novel Idea for High Availability in SQL Server on Linux

Over the past year we’ve learned about how SQL Server on Linux is implemented, leveraging SQLPAL and the team is pretty confident in their architectural decisions as indicated in this post here.

Now that there is this wrapper around SQL Server, this really opens up some interesting opportunities…perhaps we can leverage SQLPAL to facilitate some new high availability techniques.

When I was in graduate school, I worked on a research project, that became my master’s thesis. In this work, I developed a technique that synchronized the process address space of a virtual machine on two separate physical hypervisors.The technique involved an initial copy of all pages between the two systems and then selectively copying the virtual machine’s pages as they became dirty. Using this technique, the process address space of the virtual machine is synchronized between the two hypervisors. This allows for a significant reduction in the amount of information that had to be replicated between the hypervisors but more importantly…the virtual machines memory in sync which meant if hypervisor hosting the virtual machine crashed we could theoretically start the virtual machine on the second hypervisor.

I’m Presenting Two Linux Sessions on One Day!

On 12/13 I’m presenting two, back to back, sessions on SQL Server on Linux online. So you can attend from anywhere!

Let’s go through both!

First, on 12/13 at 1PM Central, I’m presenting for the PASS Database Administration Virtual Group here’s my session details:

Topic: Linux OS Fundamentals for the SQL Admin

Registration: You must register if you want to attend. You can register at http://dba.pass.org/. When you register, you will receive a link to the meeting. All attendees will be entered into a raffle for a $25 gift card.