<?xml version="1.0" encoding="UTF-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="nl-NL"><title type="html">Robi-Wan's Collosumus.NET Blog</title><subtitle type="html">My (blogging) experiences</subtitle><id>http://www.collosumus.net/cs/blogs/robertvv/atom.aspx</id><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/default.aspx" /><link rel="self" type="application/atom+xml" href="http://www.collosumus.net/cs/blogs/robertvv/atom.aspx" /><generator uri="http://communityserver.org" version="2.0.60217.2664">Community Server</generator><updated>2005-07-07T08:26:00Z</updated><entry><title>Upgraded the site</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2006/03/13/221.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2006/03/13/221.aspx</id><published>2006-03-13T06:41:00Z</published><updated>2006-03-13T06:41:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;For those who didn't notice it yet, but I've upgraded my site to a new version of &lt;A href="http://communityserver.org/"&gt;Telligent's Community Server&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will be tweaking the configuration for the coming days, so stay tuned.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;R.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=221" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>Calculating single disk performance for random I/O</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/12/20/206.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/12/20/206.aspx</id><published>2005-12-20T05:36:00Z</published><updated>2005-12-20T05:36:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I have been doing a lot of performance analysis lately. Nine out of ten times the bad performance is caused by a not optimized storage solution. Why? When data doesn't fit into the memory of a server, it has to come from disk sooner or later. In my experience it's usually later (due to non optimized solutions), whereas sooner was to be expected. So, it's time to write down some disk performance basics. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I used a &lt;A href="http://www.seagate.com/support/disc/specs/fc/st373307fc.html"&gt;Seagate ST-373307FC&lt;/A&gt; 10.000 Rotations Per Minute (RPM) disk with a Fibre Channel (FC) interface for my calculations. You can find its specification sheet &lt;A href="http://www.seagate.com/support/disc/specs/fc/st373307fc.html"&gt;here.&lt;/A&gt; All information that&amp;nbsp;is used for calculating RAW disk performance are obtained from this spec sheet.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Random I/O (R/W)&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;BR&gt;&lt;/STRONG&gt;Average Seek (mSec)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.7/5.3&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;Average latency (mSec)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.99/2.99&amp;nbsp;&amp;nbsp; &lt;BR&gt;Command and data transfer (mSec)&amp;nbsp; 0.2/0.2&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;------------------------------------------- +&lt;BR&gt;Total access time (mSec)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7.9/8.5&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;/I&gt;&lt;FONT size=1&gt;&lt;FONT face=Verdana&gt;&lt;EM&gt;These numbers were obtained from the spec sheet&lt;/I&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;So the total number of I/O Operations Per Second, better known as IOP's can be calculated by dividing "&lt;FONT face="Courier New"&gt;1 second / total access time&lt;/FONT&gt;". Using the numbers from the table above: &lt;FONT color=#006400&gt;&lt;STRONG&gt;&lt;FONT color=#000000&gt;1/0.0079 = ~&lt;/FONT&gt; 126 IOP's &lt;FONT color=#000000&gt;for read operations&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt; and &lt;FONT color=#006400&gt;&lt;STRONG&gt;&lt;FONT color=#000000&gt;1/0.0085 = ~&lt;/FONT&gt; 117 IOP's &lt;FONT color=#000000&gt;for write operations&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Now we know how to calculate maximum random I/O performance for a single disk. Why is it so important to be able to calculate random I/O performance and not sequential I/O performance? The answer is quite simple. The more clients/processes that are to be served by a server, the bigger the chance its data access pattern will be random. Do you really think that when 4000 concurrent users connected to a file server generate sequential I/O and that the server will be able to predict the next piece of data to be requested by a client? No, it won't. And the fact it won't be able to predict it, limits the positive performance impact of caching algorithms in the process.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;To make things even more complicated, it doesn't matter when a disk has to read one sector of 512 bytes or 32 sectors (16 KB block). Its platters rotate with 10.000 RPM per minute (in case of our Seagate disk), remember. So it reads 32 sectors almost as fast as one sector. Only when track boundary is reached, the performance drops a bit,&amp;nbsp;due to the time it needs to seek to the&amp;nbsp;adjacent track.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Knowing this, let's calculate the maximum random I/O performance&amp;nbsp;for reading 8 KB blocks (16 sectors) and 16 KB blocks (32 sectors).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;The formula is quite simple:&amp;nbsp;&lt;STRONG&gt;&lt;FONT color=#006400&gt;Total numbers of IOP's &lt;FONT color=#000000&gt;x&lt;/FONT&gt; block size&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;Max random I/O&amp;nbsp;(8 KB): 126 x&amp;nbsp;8 KB = &lt;STRONG&gt;&lt;FONT color=#ff0000&gt;1008 KB per second&lt;/FONT&gt;&lt;/STRONG&gt;!!!&lt;/FONT&gt;&lt;BR&gt;&lt;FONT size=2&gt;Max random I/O (16 KB): 126 x 16 KB = &lt;FONT color=#ff0000&gt;&lt;STRONG&gt;2016 KB per second&lt;/STRONG&gt;&lt;/FONT&gt;!!!&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;Max random I/O (32 KB): 126 x&amp;nbsp;32 KB = &lt;FONT color=#000000&gt;4032 KB per second&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT size=2&gt;Max random I/O (64 KB): 126 x&amp;nbsp;64 KB = &lt;FONT color=#000000&gt;8064 KB per second&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;You might want to increase block sizes, segment sizes, stripe size etc. in order to increase the performance... Please, consider the impact of RAID-levels on this and choose the right one. For more information on the impact of RAID-levels, read this &lt;a href="http://www.collosumus.net/CS/blogs/robertvv/archive/2005/07/03/168.aspx"&gt;blog&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face=Verdana size=2&gt;As a baseline, use the following numbers for your calculations:&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;for a 10.000 RPM disk: 125 IOP's.&lt;/FONT&gt;&lt;BR&gt;&lt;FONT size=2&gt;for a 15.000 RPM disk: 175 IOP's.&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;What about latency then? The killing factor for disk performance is the actual time needed to perform an I/O operation. Most disks run optimally with 2-3 outstanding I/O's in their queue. Using 7.9 mSec random latency for read operations, this gives us &lt;STRONG&gt;7.9 mSec x 3 = 23.7 mSec&lt;/STRONG&gt; maximum latency. For write operations this is &lt;STRONG&gt;8.5 mSec x 3 = 25.5 mSec&lt;/STRONG&gt; maximum latency (still using our Seagate disk as reference). As a rule of thumb, &lt;STRONG&gt;21 mSec&lt;/STRONG&gt; is considered the maximum, any average latency above that is considered a bottleneck. Any reoccurring spike far above that value is also considered a bottleneck.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Next time, I will talk about sequential disk performance.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=206" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>To be or not to be... Anti Virus solutions on a server</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/12/19/199.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/12/19/199.aspx</id><published>2005-12-19T20:32:00Z</published><updated>2005-12-19T20:32:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Not to be... (at least not always)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana&gt;Why? Simple, try to image, you are a real time mail server, doing 5000 I/O's per second and you're interrupted everytime by Anti Virus (AV) software when you try to write, or even worse try to read to and from a storage system. The attempt made by the AV solution fails after a number of retries, since you have a non shared lock on the file you are accessing. In&amp;nbsp;one of my previous&amp;nbsp;&lt;/FONT&gt;&lt;FONT face=Verdana&gt;&lt;a href="http://www.collosumus.net/CS/blogs/robertvv/archive/2005/08/05/194.aspx"&gt;post&lt;/A&gt;&lt;/FONT&gt;&lt;FONT face=Verdana&gt;&lt;a href="http://www.collosumus.net/CS/blogs/robertvv/archive/2005/08/05/194.aspx"&gt;s&lt;/A&gt;, I talked a bit about drivers and DPC's and how Windows schedule system threads/drivers using the dispatcher (effectively doing cooperative multi-tasking on kernel level). Imagine the serialization this is causing, not to mention the fact &lt;FONT color=#ff0000&gt;&lt;STRONG&gt;virusses only infect files when performing a write operation&lt;/STRONG&gt;&lt;/FONT&gt;, not when doing a read operation.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;To all people out there in the world, please look closely at your standard AV configs deploying on servers. Make sure scan policies are set to scan write operations only, when this is not enough, schedule as many manual scan tasks as you&amp;nbsp;see fit&amp;nbsp;and please exclude any files that&amp;nbsp;are exclusive in use by an application or operating system (database files, cluster configuration&amp;nbsp;files immediately pop-up in my mind).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Don't say I didn't warn you...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;P.S.: &lt;EM&gt;Yes I understand the necessity of having an AV solution, I don't say never to install one, just be careful with its configuration, because AV solutions can be as dangerous for systems stability as virusses can be for security.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=199" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>The sense and nonsense of scalability by adding CPU's</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/12/19/198.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/12/19/198.aspx</id><published>2005-12-19T19:43:00Z</published><updated>2005-12-19T19:43:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I'm often faced with the following customer situation: "&lt;EM&gt;I added additional CPU's to the system because the average CPU utilization exceeded 80%, but the application doesn't run any smoother. Why is that?&lt;/EM&gt;". Well, let me try to explain.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;To determine a CPU is busy in terms of the amount of work (threads) that is waiting to be executed, take a closer look at the following Performance Monitor counter: "&lt;FONT face="Courier New" color=#ff0000&gt;System\Processor queue length&lt;/FONT&gt;". If this one exceeds &lt;STRONG&gt;10 per CPU installed&lt;/STRONG&gt;, you definitely need more CPU's. But... take a close look at the following two Task Manager screenshots. I used the Task Manager, because it's easier to visualize my point.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;IMG src="/pics/blogs/robertvv/2cpu.jpg"&gt;&lt;BR&gt;&lt;STRONG&gt;A two CPU system at approx 80%.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;IMG src="/pics/blogs/robertvv/4cpu.jpg"&gt;&lt;BR&gt;&lt;STRONG&gt;A quad CPU (the same) system at approx. 40% (&lt;EM&gt;with&amp;nbsp;extra memory added&lt;/EM&gt;).&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;What do you see there? You'll expect to see what percentage of the total 100% of CPU time the CPU is spending on executing threads... Wrong. You see the amount of time the Windows "idle thread" runs subtracted from 100 (it counts the amount the times the "Idle Thread" is called). Why is this important, because it shows you one important thing. Two CPU's at approx 80% is roughly the same as four CPU's at 40%. 80 x 2 = 40 x 4. Simple mathematics, right?. Right. So, this tells you one thing. The application doesn't run any smoother or "faster" then a system equipped with two CPU's. This tells you a lot about the application, not about the system. It tells you the application doesn't scale from two CPU's to four CPU's. So, one should have looked at the "&lt;FONT face="Courier New" color=#ff0000&gt;System\Processor queue length&lt;/FONT&gt;" counter. If that one indicates more then 20 threads (more then 10 per processor), the application generates enough work to take advantage of extra CPU's. If the "&lt;FONT face="Courier New" color=#ff0000&gt;System\Processor queue length&lt;/FONT&gt;" counter is far away from 20, don't bother to add additional CPU's, the chances are that the application won't take advantage of them anyway.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;So, the moral of the story... Looking at CPU utilization and one doubles the amount of CPU's and the utilization droppes by 50%, run away as fast as you can... &lt;EM&gt;You just encountered one of many bad scaling applications and they blame Windows&amp;nbsp;or the system for not scaling&lt;/EM&gt;.&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/A&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=198" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>Microsoft Cluster Service configuration backup/restore utility</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/12/15/197.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/12/15/197.aspx</id><published>2005-12-15T07:09:00Z</published><updated>2005-12-15T07:09:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Several weeks ago I wrote a small utility, based on MSDN sample code, to backup and restore Microsoft Cluster Service configuration database information. I experienced some problems with restoring information, so I wanted to be sure a backup existed that could be restored without causing problems afterwards.&lt;BR&gt;Anyway I wrote this small tool, using Visual Studio 2005, to only find out several days later, a similar tool from Microsoft existed already. I looked for a similar tool before I wrote one, but obviously I overlooked it...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;You can download clusbck32.zip from my FTP site.&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=197" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>Windows Server Performance considerations - introduction</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/12/15/196.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/12/15/196.aspx</id><published>2005-12-15T05:31:00Z</published><updated>2005-12-15T05:31:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The last months I am more and more engaged in accounts who often experience serious performance issues. By the time I am called on to the scene, they status of the account is usually at a critical level. After I have done my research, I often write a report on what is causing the performance issues and what to do in order to solve it and hot to prevent it from happening again. I do this, what I call, "one man's squad team" kind of job for several years now. The environments I am engaged in, are getting bigger and bigger. I am talking here about Storage Area Networks (SAN's), ususally with Tera Bytes (TB) connected to tens and even hunderds of systems with tens of thousands of users. Analyzing these kinds of environments is more than just specialize on e.g. Windows, or storage, or network. It's the area that connects these technologies where problems arise. This is 999 out of a 1000 times, caused by lack of experience or to be more precise, understanding of the involved technologies when designing and implementing these environments. To give an example, consider the following:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;You drive a truck, loaded with 2000 crates of pineapples and you need to transport them from point A to point B over a distance of 400 km with an average speed of 80 kph. You need to make a decision. A) you drive the truck via the beach (on the sand) or B) via the highway. Which one would you choose? It's obvious, right? option "B". Now image the following environment. You have a fully loaded file server with 1000 concurrent users and you need to choose between a file server connected to a storage solution with A) 3x 300 GB SCSI disks or b) 12x 75 GB SCSI disks. Which one would you choose? The answer depends who makes the decision. The person who owns the budget or the specialist who happens to know a bit about performance. In the field option "A" is chosen most of the time, because of the costing factor involved. Why is that important you think? The answer is as simple as it is obvious. You don't expect a truck to do 80 kph driving of the beach, but you do expect the truck to make 80 kph on a highway. Why do you expect 3x 300 GB SCSI disks to perform as well as 12x 75 GB SCSI disks? The point I am trying to make, is that most performance problems are caused by lack of proper insight on the technologies used (truck on the beach vs. a truck on the highway) results in degraded performance. Using our truck as example, the truck on the beach doesn't make 80 kph, so people want to buy a bigger one, or one with a bigger engine capacity, but most of people forget to consider, a beach is simply not the right environment for the truck to operate in. A truck loaded with 2000 crates of pineapples has other requirements than a buggy loaded with just one crate of pineapples. A buggy happens to thrive well on a beach, the truck needs a proper infrastructure in order to complete its task. A decent highway, preferably without traffic jams. The same applies to servers who need to serve a lot of clients at the same time. A truck is made to transport many things at the same time instead of just one thing very fast. if you want that, buy a Ferrari instead. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;A server is designed to serve many clients at the same time instead of completing one task very fast. Then why don't you give it the means to do so?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In my next post on this topic, I will discuss some Windows performance considerations on a technical level.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=196" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>Reading SQL Server logs using stored procedures</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/12/14/195.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/12/14/195.aspx</id><published>2005-12-14T21:36:00Z</published><updated>2005-12-14T21:36:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;While I was&amp;nbsp;searching for a way to determine the backup status of SQL databases, I came across the following Stored Procedure: "sp_readerrorlog". However, it's not documented in the SQL Servers books online. After some googling, I decided to use a trial and error method to find out how it can be used. It was obvious the stored procedure accepts up to 4 parameters and after some 15 minutes trial and error&amp;nbsp;for the&amp;nbsp;different combinations, I came to the following conclusion for the stored procedure's syntax:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;exec sp_readerrorlog @1, @2, @3, @4&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;FONT face="Courier New" size=2&gt;where:&lt;BR&gt;@1 = Log file number&amp;nbsp;(0=current). &lt;BR&gt;@2 &amp;gt; 1 = Info.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 = Warning/Error &lt;BR&gt;@3 = Search param #1&lt;BR&gt;@4 = Search param #2&lt;/FONT&gt;&amp;nbsp; &lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Of course since it's not documented, at least I couldn't find it, it's an assumed syntax.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=195" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>System hang on a cluster</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/08/05/194.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/08/05/194.aspx</id><published>2005-08-05T06:15:00Z</published><updated>2005-08-05T06:15:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Last couple of days I have been setting up and tuning Windows Server 2003 clusters. When performing the various fail-over tests as part of a test plan, one of the cluster nodes suddenly experienced a complete system hang. This happened when I tried to start the cluster server service on the node I was testing on. My terminal session, appeared to be dead, but the TCP/IP session remained open and the RDP client did not time-out as result. I could ping the system, but everything else appeared to be dead. So opening a MMC snap-in to see whether the cluster server service did actually start, didn't do much either, except giving me a empty right pane. Since the servers where physically located at the other side of the country (The Netherlands), and the remote supervisor adapter was not yet built in, due to back-order of the part, I was facing the possibility to need to drive to the server myself. Not something one wants to do in the evening after a long day. So I decided to wait and decide to do with it in the morning. A 15 minutes later or so, I wanted to check the logs on the remaining cluster nodes to see if there's anything out of the ordinary in there, when I noticed the terminal session of the failing node, was back again. I started checking logs and noticed the system had a time gap of 10 minutes in every log I could think of (event log, cluster log etc. etc.). I wanted to see whether I could reproduce the behavior on the other node as well. So I repeated the same tasks, stopping the cluster server service and start it again. Exactly the same happened on the other node as well. I decided to wait and see what happens. After 10 minutes, the system came back again, and responded like nothing happened. This system also had a gap of 10 minutes in its log files. My suspicion rose, that the Anti-virus program (Sophos) was interfering with cluster operations. When strange problems on server occurs, it's usually: lack of disk space, security right issue, driver issue&amp;nbsp;or anti virus software. In my case, anti virus software. I confirmed this, by stopping the Sophos services and do the testing again. This time everything went as it supposed to go. Within minutes, I found a workaround. Simply exclude the %SystemRoot%\cluster folder from on-access scanning. This is a best practise anyway, but this didn't satisfy my need to know...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Why did Sophos hang the system for 10 minutes?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Before I explain what happened,&amp;nbsp; you need to understand what kind of drivers a common on Windows platforms. Basically you can&amp;nbsp;categorize drivers into two groups. One groups of drivers is called device drivers, which communicate with hardware and the second group of drivers called filter drivers, which usually acts as a layer/interface between the OS components and other drivers. All drivers have one thing in common. They're called via an interrupt. There're two types of interrupts.&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Hardware initiated interrupts, which are handled by device drivers.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Software initiated interrupts.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Interrupts have assigned interrupt levels with it. In the Intel world, the higher the interrupt level, the higher the priority. Below an overview from MSDN with interrupt priority levels:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;IRQL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IRQL value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x86&amp;nbsp; IA64 AMD64 &lt;BR&gt;&lt;STRONG&gt;PASSIVE_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; User threads and most kernel-mode operations&lt;/STRONG&gt; &lt;BR&gt;APC_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Asynchronous procedure calls and page faults &lt;BR&gt;&lt;STRONG&gt;DISPATCH_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread scheduler and deferred procedure calls (DPCs)&lt;/STRONG&gt; &lt;BR&gt;CMC_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A&amp;nbsp;&amp;nbsp; Correctable machine-check level (IA64 platforms only) &lt;BR&gt;&lt;STRONG&gt;Device interrupt levels (DIRQL) 3-26 4-11 3-11&amp;nbsp; Device interrupts &lt;/STRONG&gt;&lt;BR&gt;PC_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A&amp;nbsp; 12&amp;nbsp;&amp;nbsp; N/A&amp;nbsp;&amp;nbsp; Performance counter (IA64 platforms only) &lt;BR&gt;PROFILE_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 27&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; Profiling timer for releases earlier than Windows 2000 &lt;BR&gt;SYNCH_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 27&amp;nbsp;&amp;nbsp; 13&amp;nbsp;&amp;nbsp; 13&amp;nbsp;&amp;nbsp;&amp;nbsp; Synchronization of code and instruction streams across processors &lt;BR&gt;CLOCK_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A&amp;nbsp; 13&amp;nbsp;&amp;nbsp; 13&amp;nbsp;&amp;nbsp;&amp;nbsp; Clock timer &lt;BR&gt;CLOCK2_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28&amp;nbsp;&amp;nbsp; N/A&amp;nbsp; N/A&amp;nbsp;&amp;nbsp; Clock timer for x86 hardware &lt;BR&gt;IPI_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 29&amp;nbsp;&amp;nbsp; 14&amp;nbsp;&amp;nbsp; 14&amp;nbsp;&amp;nbsp;&amp;nbsp; Interprocessor interrupt for enforcing cache consistency &lt;BR&gt;POWER_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp; 14&amp;nbsp;&amp;nbsp;&amp;nbsp; Power failure &lt;BR&gt;HIGH_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 31&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; Machine checks and catastrophic errors; profiling timer for Windows XP and later&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I highlighted, the three most important ones. Most threads run at IRQL (Interrupt Request Level) = PASSIVE_LEVEL, the lowest available interrupt level. The Windows thread scheduler aka.&amp;nbsp;dispatcher runs are IRQL = DISPATCH_LEVEL. Device interrupts run at IRQL &amp;gt;= 3. IRQL = DISPATCH_LEVEL, is the higest software interrupt available.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Whenever a ISR (Interrupt Service Routine) is entered due to an external interrupt pending.&amp;nbsp;For example,&amp;nbsp;a network packet is received by the NIC (Network Interface Card), the payload is received through its driver&amp;nbsp;TCP/IP receive buffers, a Deferred Procedure Call (DPC) is made and is queued for execution. This is done, to minimize driver code execution time and to speed up things. The DPC thread is later executed by the dispatcher as soon as the ISR exits and no other high priority threads are scheduled.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The dispatcher is the core thread scheduler of the Windows NT family. It's responsible for scheduling threads to run on a processor. This can be driver threads,&amp;nbsp;systems threads (DPC's for instance), user threads.&amp;nbsp;It runs threads in order by priority. This is important to know, since it will point us into the right direction.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;So the following order of executing is maintained by the dispatcher and the system:&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Hardware interrupts (IRQL &amp;gt;= 3).&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Software interrupts at DISPATCH_LEVEL (IRQL = 2).&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Software interrupts at APC_LEVEL (IRQL = 1).&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Software interrupts at PASSIVE_LEVEL (IRQL = 0).&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Actually, there is an "IRQL = 0.5" level, better known as critical region. This one is available so a portion of the code within a thread can not be interrupted by code that runs at a higher IRQL. Except of course,&amp;nbsp;for hardware interrupts. The &lt;SPAN&gt;Associated &lt;/SPAN&gt;API (Application Programmer Interface) with critical regions is: KeEnterCriticalRegion().&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Now that I explained the basics, it's time to analyze what happened.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;When the Cluster Server service tries to start, it needs to establish communication with the cluster its about to join and it needs to determine whether the cluster is in a valid state. To do that, it needs to execute the following steps:&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Open its local copy of the cluster configuration database to read the cluster configuration parameters like: cluster name, cluster IP address, etc. etc.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Join the cluster using the informatin obtained from the cluster configuration database.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;However, when the Cluster Server service was trying to op its configuration database, Sophos intervened. It did by using its filter driver to intercept the I/O API calls made by the system. Probably API calls like: CreateFile() with exclusive access (dwShareMode=0). To know this for sure, a debugger would have been required, but time and resources prohibited me from investigating. So this is the guessing part.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The following sequence of events probably happened:&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;IRQL = 0 : Request by the Cluster Server service account to open its configuration database.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;IRQL = 0 : System thread that opens the file exclusively.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;IRQL = 2 : Sophos filter driver interrupts and open the file itself to scan its content on virusses.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;IRQL = 2 : Sophos probably tries to aquire a spin lock, but can't since the Cluster Server service owns one on the file. Which is fair, since the Cluster Server service probably doesn't want any other program being able to manipulate the configuration database while its being used.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;IRQL &amp;gt; 2 : Network packet is received by NIC and put into the DPC queue by the driver. My RDP session to the system.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;IRQL =&amp;nbsp;2 : System resumes normal operation, the dispatcher runs and determines the DPC needs to be processed and probably some other system threads too.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;IRQL = 0 : User threads are executed if no other higher priority threads waiting.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;At "4" the Sophos filder driver thread loops, until a) the lock is aquired, b) a timer on thread level expires. Since the network packets for RDP session to the system initiates hardware interrupts at "5", the ISR for the NIC is entered and the payload put into the DPC queue. The system then returns to "4" and since the DPC queue runs at IRQL = DISPATCH_LEVEL, the same level as the Sophos filter driver runs, which happens to loop for appromimately 10 minutes, no DPC's are executed and the system appears to be hanging. After these 10 minutes, the Sophos filter driver thread lowers its priority to IRQL = PASSIVE_LEVEL. The dispatches then determines it's time to process the DPC queue at "6" and schedules its thread. After that, any other thread user/system that needs to be run are executed and the system comes back to normal operation at "7" as if nothing happened.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Of course more is involved, since it was a multi processor system, but that would make this explanation unnecessary complicated.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;My two cents...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;/FONT&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=194" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>Windows Vista beta 1 available for download</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/27/193.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/27/193.aspx</id><published>2005-07-27T20:00:00Z</published><updated>2005-07-27T20:00:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Microsoft has posted Windows Vista beta 1 on &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/subscriptions/"&gt;&lt;FONT face=Verdana size=2&gt;MSDN&amp;nbsp;subscriptions&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=193" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>Longhorn Client becomes Windows Vista</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/22/192.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/22/192.aspx</id><published>2005-07-22T15:50:00Z</published><updated>2005-07-22T15:50:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Microsoft has annouced the official name of Windows with the codename "longhorn"...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;From the Microsoft site.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face=Verdana size=4&gt;Bringing clarity to your world.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN class=copyblock&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Today we live in a world of more information, more ways to communicate, more things to do. There is more you can do and even more you can discover. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Every day, millions of people around the globe rely on their Windows PC to manage their increasingly digital lives. While familiar tools for managing digital information are powerful, today's world requires more.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In today's digital world, you want the PC to adapt to you, so you can cut through the clutter and focus on what's important to you.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;For more,&amp;nbsp;visit the &lt;A href="http://www.microsoft.com/windowsvista/default.mspx"&gt;Microsoft Windows Vista&lt;/A&gt; homepage.&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=192" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>Demystifying IRQL_NOT_LESS_OR_EQUAL</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/20/191.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/20/191.aspx</id><published>2005-07-20T04:34:00Z</published><updated>2005-07-20T04:34:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;When working with Windows NT/2000/XP/2003&amp;nbsp;one has&amp;nbsp;probably run into BSOD's (Blue Screen Of Death) on more than one occasion. Some BSOD's (or Bug Checks or Stop Screens), appear more often than others. One of the most appearing bug checks is the &lt;STRONG&gt;0x0000000A&lt;/STRONG&gt; aka &lt;STRONG&gt;&lt;FONT color=#ff0000&gt;IRQL_NOT_LESS_OR_EQUAL&lt;/FONT&gt;&lt;/STRONG&gt;. In this blog I'll try to explain a bit of the myth surrounding this bug check. But before I'll explain what this bug check is all about, I'll talk a bit about&amp;nbsp;drivers, interrupts, driver threads&amp;nbsp;and dispatchers.&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana&gt;&lt;STRONG&gt;Drivers:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana&gt;The main responsibility of drivers is to communicate with I/O devices on behalf of a process (or thread). These devices are either&amp;nbsp;hardware devices or "virtual" devices. In the first case we speak of function driver, in the latter case we speak of filter drivers. Actually it's a bit more complicated, since there are upper-filter drivers and lower-filter drivers, bus drivers, class drivers, port drivers, but for the sake of clarity I'll stick with&amp;nbsp;function driver and filter driver. An example of a&amp;nbsp;function driver is: atapi.sys (which is responsible for accessing ATA based devices) and an example of a filter driver is: ndis.sys, which is NT's&amp;nbsp;Network Driver Interface Specification (NDIS) library driver.&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;Every process/thread runs at one time or an other time on the CPU. A CPU communicates to the outside world and this is true for all commonly known CPU architectures today,&amp;nbsp;using interrupts. An interrupt tells to CPU to stop doing what it was doing and start doing something else. When that task is finished, the CPU will return to the point where it was before it got interrupted. There are mainly two types of interrupts:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Hardware initiated interrupts, also known als exceptions, usually externally raised.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Software initiated interrupts, internally raised by the kernel.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;Interrupts:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face=Verdana size=2&gt;In either case, the CPU enters an ISR (Interrupt Service Routine) and starts doing what it should do. For physical devices the interrupt will be acknowledged and a Deferred Procedure Call (DPC) will be queued to complete its I/O operation. When an interrupt is raised (either external or internal) the CPU must determine whether is should grant the interrupt or ignore the interrupt (for the time being). This is done by setting a value in its interrupt mask and set a system spinlock (in case of an external interrupt) on multi processor systems, so the same interrupt is not being serviced at the same time by another CPU. All interrupts equal or higher than the number set by the interrupt mask, are granted. All others are ignored, but will stay raised until either the CPU allows it or the initiator cancels its request.&amp;nbsp;When the CPU enters an ISR and another interrupt with a higher Interrupt Request Level (IRQL)&amp;nbsp; is pending, that interrupt will be granted and its ISR will be executed. This is normal behaviour for all processor architectures. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;For software interrupts the kernel uses several IRQL's to prioritize any thread&amp;nbsp;running on the system. There are three levels used by the Windows kernel. These levels are highlighted using "green" in the table below.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;IRQL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IRQL value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Description&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x86&amp;nbsp;IA64 AMD64 &lt;BR&gt;&lt;/STRONG&gt;&lt;FONT color=#9acd32&gt;&lt;STRONG&gt;PASSIVE_LEVEL&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;User threads and most kernel-mode operations&lt;/FONT&gt; &lt;BR&gt;&lt;FONT color=#008000&gt;&lt;STRONG&gt;APC_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;FONT color=#000000&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 &amp;nbsp;&amp;nbsp; 1 &amp;nbsp;&amp;nbsp;&amp;nbsp; Asynchronous procedure calls and page faults&lt;/FONT&gt;&lt;/FONT&gt; &lt;BR&gt;&lt;FONT color=#006400&gt;&lt;STRONG&gt;DISPATCH_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 &amp;nbsp;&amp;nbsp;&amp;nbsp; Thread scheduler and deferred procedure calls (DPCs)&lt;/FONT&gt; &lt;BR&gt;CMC_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;N/A&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A &amp;nbsp;&amp;nbsp;Correctable machine-check level (IA64 platforms only) &lt;BR&gt;&lt;FONT color=#000080&gt;&lt;STRONG&gt;Device interrupt levels (DIRQL)&lt;/STRONG&gt; &lt;FONT color=#000000&gt;3-26 4-11 3-11&amp;nbsp;&amp;nbsp;Device interrupts&lt;/FONT&gt;&lt;/FONT&gt; &lt;BR&gt;PC_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;N/A&amp;nbsp; 12&amp;nbsp;&amp;nbsp; N/A &amp;nbsp;&amp;nbsp;Performance counter (IA64 platforms only) &lt;BR&gt;PROFILE_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;27&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp; 15 &amp;nbsp;&amp;nbsp; Profiling timer for releases earlier than Windows 2000 &lt;BR&gt;SYNCH_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;27&amp;nbsp;&amp;nbsp; 13&amp;nbsp;&amp;nbsp; 13 &amp;nbsp;&amp;nbsp; Synchronization of code and instruction streams across processors &lt;BR&gt;CLOCK_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;N/A&amp;nbsp; 13&amp;nbsp;&amp;nbsp; 13 &amp;nbsp;&amp;nbsp; Clock timer &lt;BR&gt;CLOCK2_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;28&amp;nbsp;&amp;nbsp; N/A&amp;nbsp; N/A &amp;nbsp;&amp;nbsp;Clock timer for x86 hardware &lt;BR&gt;IPI_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;29&amp;nbsp;&amp;nbsp; 14&amp;nbsp;&amp;nbsp; 14 &amp;nbsp;&amp;nbsp; Interprocessor interrupt for enforcing cache consistency &lt;BR&gt;POWER_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;30&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp; 14 &amp;nbsp;&amp;nbsp; Power failure &lt;BR&gt;HIGH_LEVEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;31&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp; 15 &amp;nbsp;&amp;nbsp; Machine checks and catastrophic errors; profiling timer for&amp;nbsp;Windows XP and later&lt;/FONT&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;It's the responsibility of an ISR to run at IRQL = DIRQL as little as possible. Preferrable ISR code runs at IRQL = PASSIVE_LEVEL. The Dispatcher itself runs at IRQL = DISPATCH_LEVEL, so any ISR running at IRQL &amp;gt;= DISPATCH_LEVEL prevents the dispatcher from running and effectively block all other threads in the system. Whenever a ISR runs at IRQL &amp;gt;= DISPATCH_LEVEL its code cannot ever be pageable, since the system thread handling page faults runs at IRQL = APC_LEVEL.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;Driver threads:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face=Verdana size=2&gt;Although a driver can create a new thread by calling &lt;STRONG&gt;PsCreateSystemThread()&lt;/STRONG&gt;, drivers rarely do so, because switching thread context is a relatively time-consuming operation that can degrade driver performance. For dedicated threads only to perform continually repeated or long-term activities a driver might create a thread. For temporay short term tasks, a driver can use a system supplied thread by queuing a work item using &lt;STRONG&gt;IoQueueWorkItem()&lt;/STRONG&gt;. &lt;/FONT&gt;&lt;BR&gt;&lt;FONT face=Verdana size=2&gt;Whenever a driver thread needs to raise its IRQL (usually) to DIRQL it calls the &lt;STRONG&gt;KeSynchronizeExecution()&lt;/STRONG&gt; function. &lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;But, this also means, that a buggy driver can "hang" the system, since its runs at IRQL= DISPATCH_LEVEL. &lt;EM&gt;It's also another way of saying the preemptive NT kernel now runs in cooperative mode...&lt;/EM&gt; &lt;EM&gt;But, Microsoft doesn't like to call it cooperative multi tasking...&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;Dispatcher:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face=Verdana size=2&gt;The NT dispatcher is NT's main scheduler for processes and threads. That is a thread that handles all preemptive multi tasking&amp;nbsp;functions supplied by the kernel, not the &lt;EM&gt;Task Manager&lt;/EM&gt;. ;-) Its IRQL = DISPATCH_LEVEL, it preempts all IRQL &amp;lt; DISPATCH_LEVEL threads, effectively&amp;nbsp;all user threads and&amp;nbsp;most kernel threads. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;An &lt;STRONG&gt;&lt;FONT color=#ff0000&gt;IRQL_NOT_LESS_OR_EQUAL&lt;/FONT&gt;&lt;/STRONG&gt; occurs when one of the following conditions is true:&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;IRQL &amp;gt;= DISPATCH_LEVEL when calling &lt;STRONG&gt;KeWaitForSingleObject()&lt;/STRONG&gt; or &lt;STRONG&gt;KeWaitForMultipleObjects()&lt;/STRONG&gt; with a waiting value.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;IRQL&amp;nbsp;&amp;gt; DISPATCH_LEVEL when acquiring a spinlock. Spinlocks (except the system spinlock for entering an ISR) run at IRQL = DISPATCH_LEVEL.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;IRQL &amp;gt;= DISPATCH_LEVEL when a page fault occurs. Page faults are handled at IRQL = APC_LEVEL.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;There are other circumstances when an &lt;STRONG&gt;&lt;FONT color=#ff0000&gt;IRQL_NOT_LESS_OR_EQUAL&lt;/FONT&gt;&lt;/STRONG&gt; occurs, but the most ocurring ones are listed above. The most famous one, is w&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;hen kernel threads, usually driver code, tries to allocate memory from the paged pool or access memory from the paged pool, but the page needs to be paged in (either hard page or soft page), but the threads IRQL&amp;nbsp;&amp;gt;= DISPATCH_LEVEL. Page faults are handled by the page fault thread, which runs at IRQL = APC_LEVEL. Now we have a problem. On kernel level, the systems runs in cooperative mode, which means that a system/driver thread (still running at IRQL &amp;gt;= DISPATCH_LEVEL) has to wait for an event handled by the page fault thread (running at IRQL = APC_LEVEL) which will never happen, since the page fault thread IRQL &amp;lt; driver thread IRQL. As a result, the system bug checks with a &lt;STRONG&gt;&lt;FONT color=#ff0000&gt;IRQL_NOT_LESS_OR_EQUAL&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will write something on how to debug a bugcheck in a future blog.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=191" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>SQL 2005 DBO</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/18/190.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/18/190.aspx</id><published>2005-07-18T17:49:00Z</published><updated>2005-07-18T17:49:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;While experimenting with SQL 2005 I found out the following:&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;SQL 2005 does &lt;STRONG&gt;&lt;FONT color=#ff0000&gt;not&lt;/FONT&gt;&lt;/STRONG&gt; grant the user SA,&amp;nbsp;DB Owner (DBO) role when a new database is created.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;When creating a SQL 2005 user account, the option "User must change password at next logon" is checked by default.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Save yourself some headaches and keep this in mind when using SQL 2005. Obviously the above points are good things, but&amp;nbsp;I rather find these kind of "features/things" out the hard way. ;-)&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=190" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>Metaframe Presentation Server 4.0 for x64 rocks... first impression</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/11/184.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/11/184.aspx</id><published>2005-07-11T04:39:00Z</published><updated>2005-07-11T04:39:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Yesterday I installed MPS 4.0 x64 Edition. In my previous &lt;a href="http://www.collosumus.net/CS/blogs/robertvv/archive/2005/07/08/180.aspx"&gt;post&lt;/A&gt; I quoted part of the readme from the CD stating the following: "&lt;FONT color=#ff0000&gt;&lt;EM&gt;(Windows Server 2003 R2 Enterprise x64 Edition supports up to eight CPUs on one server)&lt;/EM&gt;&lt;/FONT&gt;". Since the R2 beta code requires a trial version of Windows Server 2003, I installed a trial version just in case MPS 4.0 x64 does require a R2 installation, but it doesn't.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;MPS 4.0 x64 obviously needs a license server. This license server, needs to be installed on a 32-bit version of Windows. So, after having installed the license server and after creating a published application or two, I installed the Citrix client on a desktop and launched it.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I made some screenshots, you can view them in the &lt;/FONT&gt;&lt;a href="http://www.collosumus.net/CS/photos/computer_stuff/category1001.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Photo Gallery&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The next weeks I will be participating in a PoC for Metaframe Presentation Server 4.0 for x64 and I will be in the position to do some real testing on some real x64 hardware, so stay tuned...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;P.S.: I have seen some Citrix confidential numbers on scalability of MPS 4.0 x64 edition vs. MPS 4.0 ia32 edition. I cannot disclose them, let's just say don't miss this &lt;STRONG&gt;TCO saving train (technology)&lt;/STRONG&gt;...&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=184" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>Citrix Presentation Server 4.0 for Microsoft Windows Server 2003 x64 Edition</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/08/180.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/08/180.aspx</id><published>2005-07-08T10:22:00Z</published><updated>2005-07-08T10:22:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Yes, I have it! Probably one of the first here in The Netherlands. As part of a PoC (Proof of Concept) I'll be doing some testing and preparing demo's on x64 based Windows environment. According to the readme, Microsoft&amp;nbsp;suggests one needs or prefers??? Windows Server 2003 R2 in order to run MPS 4.0 for x64 (see below). I'll do some testing whether it's just a suggestion or also a requirement, since I happen to have latest beta of Windows Server 2003 R2. I'll post my experiences later.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=5&gt;&lt;STRONG&gt;Readme for Citrix Presentation Server 4.0 for Microsoft Windows Server 2003 x64 Edition&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H1&gt;&lt;FONT face=Verdana size=5&gt;Early Release&lt;/FONT&gt;&lt;/H1&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;June 2005 &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=section&gt;&lt;A name=Top&gt;&lt;/A&gt;&lt;FONT face=Verdana&gt;Introduction&lt;/FONT&gt;&lt;/P&gt;
&lt;H1 class=section&gt;&lt;A name=Installingthesoftware&gt;&lt;/A&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=5&gt;Installing the Early Release Software&lt;/FONT&gt; &lt;/FONT&gt;&lt;/H1&gt;
&lt;H2&gt;&lt;A name=systemrequirements&gt;&lt;/A&gt;&lt;FONT face=Verdana&gt;System Requirements &lt;/FONT&gt;&lt;/H2&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Microsoft recommends the following: &lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana&gt;Minimum CPU: x64 architecture-based computer with Intel Pentium or Xeon family with Intel Extended Memory 64 Technology, or AMD Opteron family, AMD Athlon 64 family, or compatible processor (&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Windows Server 2003 R2 Enterprise x64 Edition&lt;/FONT&gt;&lt;/STRONG&gt; supports up to eight CPUs on one server) &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana&gt;Minimum RAM: 512MB &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana&gt;Multiprocessor Support: Up to eight &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana&gt;Minimum Disk Space for Setup: 4GB &lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=180" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry><entry><title>CS 1.1 not sending mail</title><link rel="alternate" type="text/html" href="http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/07/177.aspx" /><id>http://www.collosumus.net/cs/blogs/robertvv/archive/2005/07/07/177.aspx</id><published>2005-07-07T06:26:00Z</published><updated>2005-07-07T06:26:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;I had problems with the e-mail function of &lt;/FONT&gt;&lt;A href="http://communityserver.org/"&gt;&lt;FONT size=2&gt;CS 1.1&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=2&gt;. The &lt;FONT face="Courier New"&gt;&lt;STRONG&gt;cs_Exceptions&lt;/STRONG&gt;&lt;/FONT&gt; table in the CS database had the following exception entry logged:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;System.Runtime.InteropServices.COMException (0x80040211): The message could not be sent to the SMTP server. The transport error code was &lt;STRONG&gt;0x800ccc15&lt;/STRONG&gt;. The server response was not available.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana&gt;According to &lt;/FONT&gt;&lt;A href="http://support.microsoft.com/default.aspx?scid=kb;en-us;208814"&gt;&lt;FONT face=Verdana&gt;Microsoft Support&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana&gt;, &lt;STRONG&gt;0x800ccc15&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face=Verdana&gt;&lt;STRONG&gt; &lt;/STRONG&gt;means:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;0x800CCC15&amp;nbsp;&amp;nbsp; SOCKET_CONNECT_ERROR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unable to open Windows Socket.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;So,&amp;nbsp;the system couldn't set up a TCP socket&amp;nbsp;to my SMTP relay box, which was confirmed by the output of a &lt;FONT face="Courier New"&gt;&lt;STRONG&gt;netstat -an | findstr&amp;nbsp;":25"&lt;/STRONG&gt;&lt;/FONT&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;Then it hit me... I have Mcafee Virusscan 8 running on my server&amp;nbsp;including the&amp;nbsp;Access protection rules and guess what.&amp;nbsp;Virusscan thought a mass worm/virus mailer was spamming my SMTP relay box and refused the socket connect attempt, made by the &lt;FONT face="Courier New"&gt;&lt;STRONG&gt;aspnet_wp.exe &lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face=Verdana&gt;(IIS 6.0 worker process). See log entry:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;lt;timestamp removed&amp;gt;&amp;nbsp;Blocked by port blocking rule &amp;nbsp;aspnet_wp.exe&amp;nbsp;Prevent mass mailing worms from sending mail&amp;nbsp;a.b.c.d&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Adjusting this rule proved to be the solution and this is confirmed by the log of my SMTP relay box.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://www.collosumus.net/cs/aggbug.aspx?PostID=177" width="1" height="1"&gt;</content><author><name>robertvv</name><uri>http://www.collosumus.net/cs/members/robertvv.aspx</uri></author></entry></feed>