Garbage Collection Thread Suspension Delay (250ms Multiples)

July 31, 2009

About a week ago, Dima and I were consulting for two different teams at the same customer site, without even knowing about each other’s presence. Around the middle of the day he gave me a call, and we discovered that we’re only a couple of stories apart. What Dima’s customer was experiencing is a non-deterministic delay in a managed application performing processing of buffers received from a physical device before they were being sent to another physical device. While it would typically take less than 0.5ms to handle a single buffer, some buffers would take as long as...
4 comments

Windows 7 is NOT a “Vista Service Pack”

July 27, 2009

It’s hard to argue with the 127K subscribers to Jeff Atwood’s blog, so when I first read his post titled “Windows 7: The Best Vista Service Pack Ever” I wasn’t immediately sure how to respond. Nonetheless, I would like to try and offer my opinion on some of Jeff’s points, in the hope of giving a different perspective on what Windows 7 really is. Jeff writes: Now that Windows 7 has reached its "release to manufacturing" milestone, I had the opportunity to install it for myself and see. Jeff, I’m sorry, but...
tags:
9 comments

.NET Support for More Than 64 Processors

July 25, 2009

Daniel Moth recently blogged about the sad fact that there are no managed APIs for working with more than 64 logical processors, even though as you probably know, Windows 7 (and of course Windows Server 2008 R2) features support for up to 256 logical processors. Frankly, these APIs aren’t designed to be very friendly, but sure enough they give you the ability to create threads (within a single process) that will run on different processor groups. As each processor group is limited to 64 processors, by creating 4 threads you can utilize up to 256 processors, which is...
one comment

Improving Cold Startup Performance (Rebasing, Compression)

July 24, 2009

In the previous installment we’ve seen how tinkering with the prefetch settings on Windows XP improved the cold startup performance of a client application. Unfortunately, the improvement wasn’t significant enough and we were called in for another round of thinking. After looking at the virtual memory address space of the process we found out that there were many relocated DLLs. We could easily determine this with Process Explorer, which shows you the image base address and actual base address for each DLL loaded into the process. Lots of relocations cost you some startup time, and seeing that there...
no comments

Improving Cold Startup Performance (Prefetch)

July 22, 2009

A few months ago, Alon, Dima and I have visited a customer with a client application experiencing very slow cold startup times. In this post (and possibly another) I will look into some of the things we found out in the process. Some of the details have been slightly changed to protect the innocent, but the general findings might be useful nonetheless. Elsewhere there is some good reading on cold startup performance in general. First there’s Vance Morrison’s theoretical model. Claudio Caldato’s MSDN Magazine article is more relevant for managed apps, but still quite useful....
3 comments

Launch a Process as Standard User from an Elevated Process

July 9, 2009

There are many well-documented ways for launching an elevated (administrative) process from within a process that is running using standard user credentials. The cleanest way is by giving that process a manifest; if this can’t be done, the ShellExecute “runas” verb is the way to go. This is all yesterday’s news, really. However, there’s a more interesting question: how do you launch a process as the standard user, if the current process is already elevated? As you probably know, a process can’t change its elevation status – an elevated process can’t downgrade itself to a standard user, and...
one comment

Features Aren’t Magically Born

July 6, 2009

Every time I see Pavel working on his laptop, a question pops into my head: Why don’t you use the Aero theme of Windows Vista and Windows 7, and instead use something that closely resembles Windows Server 2003 – especially considering that your laptop is such a beast of a machine? Today I got my answer, well, kind of. Pavel writes: But if I don’t use Aero I don’t get thumbnail previews and other goodies. Why is that? I asked around and didn’t get a satisfying answer. I’m going to call a...
no comments