Optimizing your upgraded SQL 2012 when you only have 20 cores you can use due to licensing

By tom on September 27th, 2012

If you upgrade your existing SQL 2008 R2 to SQL 2012 using Software Assurance, you will be limited to using 20 cores. Aaron Bertrand wrote about it: http://sqlblog.com/blogs/aaron_bertrand/archive/2012/04/27/a-cautionary-tale-about-grandfathering-CAL-licenses-in-SQL-Server-2012-Enterprise.aspx and Geert Vanhove had this issue as well: http://geertvanhove.wordpress.com/2012/09/12/sql-2012-slower-than-sql-2008-on-large-boxes/

If you get hit by this, your SQL 2012 server will by default only use the first 20 cores. If for example you have a 4 CPU, 10 cores/CPU box, only the 2 first CPU’s will be used. You can verify this for yourself when looking at the sys.dm_os_schedulers DMV.

CPU wise it makes no difference which cores you use, they are all the same. But since SQL server is NUMA aware, memory access is different. You can read about how SQL server supports NUMA in BOL: http://msdn.microsoft.com/en-us/library/ms180954%28v=sql.105%29.aspx and http://msdn.microsoft.com/en-us/library/ms178144%28v=sql.105%29.aspx.

When SQL server needs memory from one of the other NUMA nodes, this is called foreign memory and is more expensive to fetch performance wise.

In order to optimize memory access a little bit, we changed the affinity mask. On the box we did our tests on we enabled CPU’s 0, 1, 2, 3, 4, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 30, 31, 32, 33, 34, having a maximum total of 20 cores used, but spread out over the different CPU’s. We noticed that with a standard TPC-C and TPC-E check the performance gain was about 3-5%.

If you don’t have the budget to fully license your SQL 2012 server, this might be a way to squeeze out a little bit of performance.

A word of caution though: do not play with affinity masks if you’re not sure what you are doing and always perform tests in a development environment with a workload similar to your production workload.


Issues with Microsoft Netherlands licensing desk

By tom on June 5th, 2009

First a little of context: my company is registered in Belgium, works with Belgium-based distributors, but does a lot of business with clients based in the Netherlands.

Recently, one of those clients received a mail from someone in the licensing department of Microsoft Netherlands. They wanted to have a phone conversation about the license management, as they had noticed some discrepancies between certain Microsoft volume licenses.

My client asked me to do this for them, as they trust me as their licensing partner. So I looked up their volume license history to prepare for this conversation.
The phone call took place, first with a little overview of what was bought, what was planned to buy, etc… All in all, this went fairly well, one or two points were brought to my attention.

Just as I thought that the conversation was coming to it’s end, a statement from that guy hit me right in the face: “Do you know that all ‘Open License Program’ licenses your client has are not valid, as they were bought via a foreign partner (my company)?”

Hmm, no I did not… But wait a minute, we are part of the European Union, where one of the basic laws is free transfer of goods and services throughout the whole EU; and furthermore for licensing issues I always work together with the license desk of the distributor and they work together with Microsoft Belgium’s licensing specialists.

It didn’t matter what I told this person, he simply said that this law of the EU was not valid for this. He was going to make a case out of this and the result probably would be that all licenses that my client had bought, would be declared not valid and they needed to buy all licenses again via a Dutch licensing partner. The total worth of this would be over € 250.000! You can say that at that moment I was a little bit shaky… The conversation ended with his promise that within a week I would receive an ultimate statement from Microsoft Netherlands about this issue.

After I recovered a little bit, I called the license desk of my distributor and explained the whole issue, their first reaction was (like mine) “this can’t be true”. They told me that they were going to talk with their contacts at Microsoft Belgium to resolve this as soon as possible, because they have a lot of customers that are in the same situation as I am.

An hour later I received an email from the Microsoft Belgium’s license specialist, who confirmed me that nor me, nor my client were in error and that everything was ok. He asked me for the details of my Microsoft Netherlands contact person, so he could settle this.

We are now almost a month later and I still haven’t had a mail or phone call of the Microsoft Netherlands license desk with their statement. Talking about professionalism…

If you happen to be in the same situation or having a phone call with MS NL about licensing issues soon, please keep this in mind. If you are having problems, contact me directly at tom [at] synergysolutions [dot] be and I’ll be glad to share the names and mail addresses of the persons that helped me.


So finally after a looooong time, I heard back of the Dutch license desk and after some more mails going back and forth, I finally received a confirmation that I could sell Microsoft Licenses to my Dutch clients without any problems…