Retrieving information about CPUs’ relationships

In order for server side applications to run efficiently on modern hardware they have to understand hardware layout. As we are moving towards multicore and multi node NUMA systems, understanding relationships amongst cores, logical and physical CPU has become very important.  Before we jump into how applications can do it, we need to define what…

6

Be aware: To Hyper or not to Hyper

Our customers observed very interesting behavior on high end Hyperthreading (HT) enabled hardware. They noticed that in some cases when high load is applied SQL Server CPU usage increases significantly but SQL Server performance degrades. Occasionally they would also see message in errorlog indicating one of the threads can’t acquire a spinlock (Spinlock is a…

36

Be Aware: VirtualAlloc with MEM_RESERVE can fail even if you have plenty of VAS inside of the process

 Many developers assume that if you have plenty of free VAS in your process VirtualAlloc (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/virtualalloc.asp) and VirtualAllocEx (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/virtualallocex.asp) calls with MEM_RESERVE parameter can’t fail. This is not actually true.  Remember that when allocating VAS region OS creates VAD (Virtual Address Descriptor). VAD manages VAS region, for more info read http://blogs.msdn.com/slavao/archive/2005/01/27/361678.aspx. When system is low…

0

Be Aware: IA64 Stack Size

Stack subject in Windows OS is fascinating. There are so many interesting technical problems surrounding it.  The moment you think you fully understand everything about stack you suddenly discover yet another mystery.  And so it goes.   In the last couple of weeks I have been approached by our testers and support engineers asking about for…

11

Be aware: a new section in my blog

Periodically, I bump into unusual behavior, features, of compiler, operating system, strange design and coding decisions made by someone else that makes me wonder. After giving it some thought, I often come to the conclusion that behavior or observed specifics are justifiable. However if I knew it upfront, It would have helped me to avoid…

2

Look at Memory Leaks – Classify and Identify

In my previous post I talked about type of Memory Pressures. Today I would like to talk about related subject – Memory Leaks.  Before you continue reading please make sure that you are familiar with how memory is managed on Windows.   Memory leaks are bugs that happen very often. I think it is very…

1

Getting an exception call stack from the catch block (C++)

This is my first post in this category so I am really looking forward to your comments 🙂  Today I would like to cover a specific feature related to our implementation of C++ exception handling. Every day I realize that not many people are familiar with this feature. When they learn about it they really get…

13