Johan Åhlén

Johan Åhlén's blog about life, universe and everything.

July 2010 - Posts

SQLIO performance tests on my SSD drive

SQLIO is a great tool to do performance tests on SANs or local hard disks. It helps you identify the optimal configurations for getting maximum data rates and latencies from your storage. Brent Ozar has created a helpful ten-minute video on how to get started with SQLIO.

I now have tested my SSD drive. To get something to relate to, I also tested my old drive in the same machine. You can see the results below.

DiskType ReadOrWrite IOpattern MBs_Sec LatencyMS_Avg
SSD R random 237 22
NonSSD R random 4 1266
SSD R sequential 250 22
NonSSD R sequential 38 155
SSD W random 65 96
NonSSD W random 8 712
SSD W sequential 95 60
NonSSD W sequential 38 161

The results are similar to what others report about SSD drives. The real killer is random reads, where the SSD is more than 50 times faster than the traditional drive. Also note that for SSD reading is much faster than writing, whereas for the traditional drive there is no difference in speed between reading and writing sequentially.

For more details you can see my raw output files from SQLIO here. You can also read this earlier blog post.

Autodetecting Instance Names in StreamInsight

Since the RTM version you have to specify the instance name when connecting to or creating an in-process StreamInsight server. There is no such thing as a "Default Instance" like there is in the SQL Server database engine. Since users are very creative when picking the name of their StreamInsight installation you need to either have your application ask for the instance name or autodetect it.

The instance name can be autodetected from the registry. The only problem is that you need sufficient permissions to read the appropriate registry key, which you won't have in Windows 7 or Vista if you just start the application as usual from Visual Studio. Instead you have to start Visual Studio with Run as administrator.

Here's an example class to enumerate the installed instances (yes there can be more than one instance). It also provides you the info you need to deploy and run your applications on the StreamInsightHost.

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;

namespace JAhlenExample
    public class StreamInsightSetupInfo
        public const string RegKeyPrefix = "MSSI.";

        public static string[] EnumerateInstances()
            RegistryKey masterKey;

                masterKey = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\Microsoft StreamInsight");
            catch (UnauthorizedAccessException ex)
                throw new Exception("Access denied to StreamInsight registry key. Make sure you run with high enough permissions. If executing from Visual Studio you may have to run Visual Studio as administrator.");

            var lst = new List<string>();

            foreach (var key in masterKey.GetSubKeyNames())
                if (key.StartsWith(RegKeyPrefix))

            return lst.ToArray();

        public static string GetHostPath(string instanceName)
            var masterKey = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\Microsoft StreamInsight\" + RegKeyPrefix + instanceName);
            var dumperPath = masterKey.GetValue("StreamInsightDumperPath").ToString();

            var streamInsightRootPath = dumperPath.Substring(0, dumperPath.LastIndexOf('\\'));
            streamInsightRootPath = dumperPath.Substring(0, streamInsightRootPath.LastIndexOf('\\') + 1);

            return streamInsightRootPath + @"Host\";

        public static string GetServiceName(string instanceName)
            return "MSSI$" + instanceName;

        public static string GetEndpointName(string instanceName)
            return "http://localhost/StreamInsight/" + instanceName;

Posted: Jul 19 2010, 08:23 AM by jahlen
Filed under: