Category Archives: microsoft

Vista vs XP performance: some informal tests

After posting about the inadequacy of a recent test report I thought it would be interesting to conduct my own informal tests of Vista vs XP performance. I do not run a computer laboratory, but I guess my tests have the benefit of being real-world.

I tested several conditions on three computers. On two of them I was able to test XP 32-bit vs Vista 32-bit. I tried various combinations of Aero on or off, visual effects on or off, and UAC (User Account Control) on or off. I also tried setting Vista to run only basic services, using Msconfig.

The test suite I used was PassMark Performance Test 6.1. You can use this free for 30 days, so anyone can repeat the tests.

Caveat: perfect tests are hard to achieve. A big problem with Vista is that it has all sorts of background services that are meant to maintain your system, perform backups, check for updates, and so on. Further, if you have third-party software installed (and who doesn’t?) then it may also be running background tasks. The only compensation I applied was to wait a few minutes after start-up for disk activity to pretty much cease. I also switched off anti-virus software, and closed the Vista sidebar.

Here’s a few highlights. First, XP was fastest on the two dual-boot machines, and that was without any effort optimizing XP for performance. In both cases, the best Vista performance was about 15.5% slower than XP, based on the PassMark performance index. On one machine the worst Vista performance was 28% slower, and on the other 23% slower.

Graphics 2D – Ouch!

The most interesting result was the poor performance of the Graphics 2D tests on Vista. A series of PassMark tests cover drawing lines, rectangles, shapes, font rendering, and common GUI operations like scrolling listboxes, moving windows or filling progress bars. On both dual-boot machines, the best Vista performance was an amazing 70% slower than XP. Put another way, XP was 3 times faster. Since these are common operations, that is worrying.

That said, there are some specific reasons for this poor performance. See here for example:

The Windows Vista graphics system is designed to support a broad range of hardware and usage scenarios to enable new technology while continuing to support existing systems. Existing graphics interfaces, such as GDI, GDI+, and older versions of Direct3D, continue to work on Windows Vista, but are internally remapped where possible. This means that the majority of existing Windows applications will continue to work.

Hmm, re-mapping sounds slow. And here:

GDI primitives like LineTo and Rectangle are now rendered in software rather than video hardware, which greatly simplifies the display drivers.  We don’t think this will impact many real-world applications (usually when a GDI application is render bound its because it’s doing something like gradients that was never hardware accelerated), but if you do see problems please let us know.

See also Greg Schechter’s notes here on GDI-rendered windows.

In a nutshell, Vista is optimized for DirectX rendering at the expense of GDI; yet, as Schecter notes:

Today and for the near future, most applications use and will continue to use GDI to render their content.

This I suspect is a large part of the reason why some tests report that XP is twice as fast as Vista. Automating Office could well hit this slow GDI issue. Note that it is not all 2D graphics that are slow – CustomPC got less alarming results for its 2D graphics tests, which by the looks of it are not GDI-based.

Schechter does not cover the scenario where the DWM (Desktop Window Manager) is turned off, but it looks as if some of the factors which make GDI slow still apply.

What’s most effective at speeding up Vista?

I did some experiments where I compared Vista Basic with Vista Aero, or looked at what happened when UAC is switched off. I got inconsistent results. On an older machine, I found that disabling Aero made a significant difference, maybe an 8% speed-up. On another, more recent machine, Aero was actually faster. So much changes when you use DWM that I guess this is to be expected.

UAC? Not a huge difference in these tests – around 2%.

The biggest influence, on the basis of my imperfect testing, came when using Msconfig to switch off all but basic services and start-up programs. This speeds performance by around 10% overall.

In most other tests there were modest differences between Vista and XP. This includes 3D graphics, where Vista actually scored higher than XP on one machine, and CPU, where on one machine there was less than 2.5% difference between best and worst. Vista does come out significantly slower on the PassMark memory test suite, from just over 8% worse to over 20% worse.

Conclusion? First, my informal tests suggest that XP is faster than Vista, but not normally twice as fast. Second, an application written to use DirectX rather than GDI should perform better, other things being equal. WPF (Windows Presentation Foundation) uses DirectX, but unfortunately has its own performance overhead.

If this analysis is right, then Vista is at its worst when rendering the GUI in traditional Windows applications. That will make them feel less snappy, but would not impact the non-visual aspect, like say recalculating a spreadsheet.

Then again, I only tried one test suite, so please don’t take the above too seriously.

I’d be interested in further informed comments.

Technorati tags: , , ,

ParallelFX: concurrency library for .NET

A few links:

Announcement of CTP on Somasegar’s blog

MSDN article on PLINQ

MSDN article on Task Parallel Library

Joe Duffy – concurrent programming blog

Interesting note in Duffy’s blog about PDC 07 (the one that never was):

Note: some might wonder why we released the articles before the CTP was actually online.  When we originally put the articles in the magazine’s pipeline, our intent was that they would in fact line up.  And both were meant to align with PDC’07.  But when PDC was canceled, we also delayed our CTP so that we had more time to make progress on things that would have otherwise been cut.

Concurrency is a big deal; it’s good to see more library support.

Technorati tags: , , ,

Performance testing Vista: misleading reporting of inadequate tests.

Is Vista really half the speed of XP? That is what CNET reports here, in an article which does not bother to link to the source of the tests, as far as I can see.

The tests seem to be based mainly on scripting Office through OLE automation. This is certainly interesting, but it would be more helpful to have a performance breakdown, looking at various aspects of OS performance. Otherwise, how do we know whether this is more to do with, say, OLE performance than Vista performance?

Second, Vista has richer graphics than XP. Think of it like a game which offers difference graphics options to suit your hardware. Typically, you can set varying levels of background detail, shadow effects, etc, in order to find the right compromise between appearance and performance. Vista sets this higher than XP by default, so you would expect screen operations to be slower.

Third, Vista’s UAC security imposes a significant performance overhead. Again you would expect that, since it applies additional checks to numerous operations.

You could conduct a more useful test by configuring Vista to work as much as possible like XP. Turn off UAC, turn off Aero, turn off the indexer, turn off visual effects. I would also suggest checking what is running in the background and matching it as closely as possible on the two machines. I would be surprised if the performance difference is so striking after doing these things.

Perhaps you will argue that this is not the real-world experience. In practice, users take the machine as supplied and start using it; they do not open Control Panel and look at Performance Information and Tools, or get rid of all that third-party foistware. It’s a fair point, though on a corporate network admins can set these things on the user’s behalf.

When it comes to real-world performance, I also have gripes about Vista. However, I have little problem with Vista’s overall performance, say when working in Office, aside from Outlook 2007 which is a disgrace. What bugs me is unexpected delays. For example, I click the Start button, then All Programs, then scroll down to a program group and click. Vista just stops. I tried it just now, and it took 12 seconds to open the group I chose. I’ve had to train myself not to keep clicking. What’s going on there?

There are real issues here, but not helped by misleading reporting of inadequate tests.

.NET Framework for Symbian

Red Five Labs has announced its implementation of the .NET Compact Framework for Symbian, the operating system used (most of the time) by Nokia.

It is currently in beta, and implements only version 1.0 of the Compact Framework, but nevertheless it is an intriguing development.

With this, Mono, Moonlight, and Microsoft’s own implementation of Silverlight 1.1 for Mac OS, .NET is getting more interesting for cross-platform development.

.NET history: Smack as well as Cool

Microsoft’s Jason Zander comments on my piece on the early history of ASP.NET:

  • The CLR was actually built out of the COM+ team as an incubation starting in late 1996.  At first we called it the “Component Object Runtime” or COR.  That’s why several of the unmanaged DLL methods and environment variables in the CLR start with the Cor prefix.
  • There were several language projects underway at the start.  The C++ and languages teams both had ideas (Cool was one of them), and in the CLR we wrote Simple Managed C or SMC (pronounced ‘smack’).  We actually wrote the original BCL in SMC.

He says these are corrections though they seem more like supplementary information to me. I don’t have any inside knowledge of this history other than what people who should know say to me (though I do also have my own recollections of what was said publicly). He may be reacting to the idea that the CLR came out of the VB team, which Mark Anders kind-of implied.

One of the reasons I love blogging is that multiple authors can have a crack at getting the facts right. A great personal example is when I asked the question Who invented the wizard; and a good candidate came forward over a year later. If you see something inaccurate or misleadingly incomplete on this site, please do comment or let me know by email.

Technorati tags: , , ,

Microsoft vs Mozilla Javascript wars

My comment is here.

Note this debate is not only about the merits of different versions of Javascript/ECMAScript. It is also about power and responsibility. However you spin it, and however far Adobe and/or Microsoft succeed with Flash/Silverlight/AIR, I think we can agree that the browser has an important role for the foreseeable future. It is also likely (though less certain, I guess) that Internet Explorer will continue to have a large market share. The company does have a responsibility not to hold back the Web, and that surely includes not obstructing the evolution of a high-performance Javascript runtime.

It is disappointing that Microsoft says so little about IE8, presuming it exists. If the company sticks by its undertaking to leave no more than two years between IE releases, we should expect it no later than October 2008, less than one year away. It would help web developers to know more about what will be in it.

How Akamai Download Manager hides your downloads (VS 2008 downloaders take note)

Yesterday I downloaded the hot new release in the Microsoft development community: Visual Studio 2008.

At least I thought I did. I used the MSDN “Top Downloads” feature, which promises:

… a more direct way to initiate a download of a limited set of selected products

The service uses a plug-in called the Akamai Download Manager. This guy is annoying, especially if you use Windows Vista. First, it doesn’t seem to work at all. Then you realize that you have to disable the IE pop-up blocker. Next, you try to select a download location but it will not let you. It respects some setting in IE that restricts downloads to “safe” locations. You had better have lots of space in your user directory, otherwise this is not going to work.

Fortunately, I do have lots of space, so even the 6GB or so I was downloading should have been OK. I gave in and let it choose the location it wanted. The next thing you see is curious – see here for a screenshot. A message appears telling you the file has been saved (note past tense, though the download is just starting) to the Temporary Internet Files folder, and invites you to open it. I knew the file could not be downloaded yet, but opened it anyway. You get an Explorer window onto a weird location that claims to be in the Windows folder (it isn’t) and shows a single folder labeled C. If you are like me, you shrug, and close it. Don’t do that.

Why not? Well, after several hours or perhaps overnight, the download completes and you look for your files. Where are they?

I looked in Documents, the supposed location. Not there.

I looked in IE’s Temporary Internet Files folder. Not there.

I looked in my Virtual Store, a feature of Vista that supports legacy software which tries to write to locations like the Windows folder. Not there.

I performed a search of my entire User folder, set to show hidden files and folders. Not there.

Before giving up, I opened an administrative command prompt, navigated to the root folder, and typed:

dir *.iso /s

Ah! There they are, in (wait for it):

C:\Users\Username\AppData\Local\Microsoft\Windows\Temporary Internet Files\Virtualized\C\Users\Username\Documents

where “Username” is the current user.

Why didn’t the Explorer search find it? The problem is, you have to have the option:

Hide protected operating system files (Recommended)

set to unchecked in folder options, passing the dire warning that tells you not to do it.

Why do I normally have this checked? The dire warning doesn’t bother me, but I do mind that having this unchecked shows files like desktop.ini on the Vista desktop. Ugly. So I normally have this checked.

Hey, wouldn’t it be good if Microsoft had a single checkbox in its “Advanced” search: to just search everywhere?

What is this nonsense?

So I found the downloads. But honestly, what is this nonsense? The truth is, Akamai Download Manager is not really Vista-compatible; why is Microsoft using it on its premier developer site, for its premier developer product? Ironically, this is the community most likely to be running Microsoft’s latest and [possibly] greatest.

Further, what it is the message here? That Vista adoption is so modest that Akamai can’t be bothered to fix its utility? Or that Microsoft’s own in-house developers can’t build a decent download manager? Or offer to fix the Akamai one?

Excuse my temper. It is no fun to complete a long download and then lose the files.

Update: I also sent a comment and query to the email address given for feedback. It was msdnreply(at)eu.subservices.com. Guess what? Bounced with “User unknown”.

REST vs WS*

The REST vs WS* wars get ever more interesting, with Dare Obasanjo from the Windows Live team announcing (or confirming) his conversion to RESTful ways, and Project Astoria demonstrating that Microsoft is now building REST services into ASP.NET and ADO.NET (see here for further comment).

Microsoft is still committed to WS*, but equally seems to recognize that much of the world wants to do REST. I’m glad that pragmatism is winning over dogged determination to stand by technology choices.

Technorati tags: , ,

Visual Studio 2008 is done

Microsoft says you can now download the release version of Visual Studio 2008 from MSDN subscriber downloads (presuming you have a subscription, of course).

I believe it, because this is what I get when I try:

vs2008

Looks like the server is a little stressed. But I thought you were not meant to expose your stack trace to the world?

Never mind, I’m sure I’ll get this thing downloaded soon.

Update: Edited link for one that is not broken

Technorati tags: , ,

Which games console this Christmas?

Which games console is the smart choice this holiday season? With four or maybe five serious contenders there is plenty of choice, and that’s good for buyers because (with one exception) it’s keeping prices down. Here’s my quick guide, in alphabetical order.

PC

I admit, it’s not a console, though you can come close if you get a media-centric computer designed for the living room. The downside, let me say at once, is that you have all the maintenance hassles which go with a real computer – patches, maybe mysterious crashes and hunting through Google in a desperate attempt to discover what “Error 9999999 could not initialize device” might possibly mean.

I include it here for one simple reason. Many of the games released for the leading consoles also come out for the PC, and they cost less. Example: FIFA 08, a reliable bestseller, on sale now at Amazon.co.uk at £39.99 for the PS3 and Xbox 360, £29.50 for the Wii, and just £24.99 for PC (or currently £18.99 if you go second user). In addition, PC games sometimes get patches and downloadable updates that their console cousins lack.

Let me just add the traditional advantages of the PC. It’s upgradable, and when you tire of playing games will do duty in the study or for setting up Linux and Slimserver like you’ve been meaning to for ages.

If you get a PC for gaming, I highly recommend not scrimping on RAM or the all-important graphics card; and don’t forget the excellent Microsoft controller, same as on the 360.

Rating: 6

PlayStation 2

Pah! Old stuff. True, but the console is small, quiet and cheap, and the games are fantastic, especially if you content yourself with trade-ins. Consider: when Microsoft and Sony were trading stats about whose next-gen console had flashiest graphics, Microsoft (fractionally on the losing end) made the point that in the end, it’s the quality of the games that counts. Nintendo then proved the point by slaughtering both in the market with the underpowered Wii. But if it’s the games that count, why not just get a PS2? Or stick with the one you have already. The bargain-hunter’s choice.

Rating: 5

PlayStation 3

Now I’ve got your interest. How does Sony’s bet-the-company console stack up against the competition? Let’s be honest: this is very much in the same camp as the Xbox 360, so that’s the thing to compare it with. It’s about superb graphics, media-center pretensions, and some neat extras like a web browser. In its favour, the PS3 seems better made than the 360, and offers a little bit more considering that it also plays Blu-Ray high-definition movies. It also comes with a larger hard drive than the 360’s parsimonious 20GB. It’s quieter too, which is a considerable advantage in your sitting room. Further, it has at least some compatibility with all those old PS2 games, though it is imperfect in most editions after Sony dropped the embedded PS2 chip for cost reasons.

The case against? It’s the most expensive console; the graphics aren’t noticeably better than the 360; it’s big and unbeautiful; and the Blu-Ray capability which makes it expensive is probably something you don’t want or need in a games console. Sony included it to get an advantage in the HD wars, not for your benefit.

Admittedly Sony is subsidizing the PS3 to get the price closer to a 360, but in practice you will find Microsoft’s offering significantly cheaper – though at least PlayStation Network is currently free, whereas Xbox Live is subscription based.

The biggest problem with the PS3 this season is that the choice of games is not there yet. The 360 has more and better games; and where the same title has come out for both platforms, there is usually little to choose, or more often an advantage to the 360. A notorious example is Pro Evolution Soccer 2008, which most agree has smoother action on the 360. Is it because the 360 is easier to program? Or that the PS3 is getting 360 ports? Probably both; but you don’t care about the reasons.

Rating: 8

Nintendo Wii

So this is the gadget that is winning in the market, thanks to Nintendo’s creative approach to console design. The Wii is far smaller and quieter than the PS3 or 360, and a good bit cheaper, though in practice the price advantage can be eroded by shortages; nobody needs to offer a good deal on the Wii. Is it the best? Well, the Wii has a few things in its favour. First, it has a motion-sensitive, position-sensitive controller than enables a level of simulation that no other console can match. Swing your arm for bowling or golf, wave your racket for tennis. There is real physical involvement. Second, the culture of the Wii is about family fun. Third, Nintendo has paid attention to detail in its console software. In particular, The “Mii” concept is beautifully executed. A Mii is a character representing your profile, and you can spend ages designing a Mii to look like a convincing caricature of the person it represents. These little folk can appear in-game as well as in the management screens. In other words, the personalization is great.

The Wii is the console of choice for filling the argumentative void between lunch and evening on Christmas day itself.

Unfortunately, the Wii is not really a replacement for the PS3 or 360. For starters, the graphics really are noticeably inferior. Second, the range of available games is inferior, though it is catching up a little. The Wii Sports game that comes free in the pack is wonderful, but it is hard to find others that are as good. Third, the motion-sensitive controller can be annoying when it is applied to everything. Fourth, there is no equivalent to the online gaming found in Xbox Live or PlayStation Network. After the thrill of Sports wears off, you could be disappointed.

Rating: 7

Xbox 360

Microsoft’s console has a lot going for it. You can’t fault the graphics; it has the best games; it has the best online experience (though you have to pay for it); it has great downloadable games in Xbox Live Arcade; it has the best controller; and in conjunction with a Media Center PC it serves as a decent all-purpose living room device as well. You can also plug in a good value HD-DVD add-on to get your high definition movie fix.

Two things spoil the 360. First, it has suffered reliability problems, so much so that Microsoft has had to extend its warranty for the common “red ring of death” issue, which most agree is caused by over-heating, thanks to a design fault in the way the components are laid out internally. This could have been forgiven if the company had moved quickly to fix it, but it seems that it continued to manufacture consoles likely to fail prematurely for long after the problem was known. Are today’s consoles better? Almost certainly, though we may not be truly out of the woods until smaller, cooler processors are fitted as standard.

Second, this console is the noisiest. That’s partly because of all the fans fitted in a vain effort to fix the overheating, and partly because of the noisy DVD drive.

I still think this is a good buy. You don’t hear the noise when playing a game, and Microsoft mostly foots the bill for hardware faults. Especial kudos to Microsoft for its controller, which in my opinion is that teensy bit more responsive and comfortable than that on the PS3; it does matter when you are hammering it hard.

I have heard from multiple sources that 360 games are easier to code than those for PS3. That means less time making them work, and more time to making them good.

If and when Microsoft issue a second edition 360 (not just the disappointing Elite) which runs whisper-quiet and properly fixes the reliability issue, I would rate this an easy win over the PS3. For now though, it is a close-run thing. Still, the 360 wins on the value front so it is arguably the better buy.

Rating: 8