<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Andrew Morgan &#187; Windows Server</title>
	<atom:link href="http://andrewmorgan.ie/category/windows-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewmorgan.ie</link>
	<description>Grumpy ramblings</description>
	<lastBuildDate>Fri, 30 Jun 2017 09:24:25 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0</generator>
	<item>
		<title>ThinIO facts and figures, Part 3: RDS and Ram caching.</title>
		<link>http://andrewmorgan.ie/2014/10/thinio-facts-and-figures-part-3-rds-and-ram-caching/</link>
		<comments>http://andrewmorgan.ie/2014/10/thinio-facts-and-figures-part-3-rds-and-ram-caching/#comments</comments>
		<pubDate>Wed, 22 Oct 2014 21:30:41 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[Remote Desktop Services (RDS)]]></category>
		<category><![CDATA[Server Based Computing]]></category>
		<category><![CDATA[ThinIO]]></category>
		<category><![CDATA[ThinScale]]></category>
		<category><![CDATA[VDI in a Box]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[XenApp]]></category>
		<category><![CDATA[XenDesktop]]></category>
		<category><![CDATA[Horizon View]]></category>
		<category><![CDATA[IOPS]]></category>
		<category><![CDATA[Remote Desktop services]]></category>
		<category><![CDATA[SBC]]></category>
		<category><![CDATA[VDI]]></category>
		<category><![CDATA[Vmware]]></category>
		<category><![CDATA[xenapp]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=3202</guid>
		<description><![CDATA[Welcome back to the third instalment of this blog series focusing on our new technology ThinIO! To recap, below you will find the previous articles: ThinIO facts and figures, Part 1: VDI and Ram caching. ThinIO facts and figures, Part 2: The Bootstorm chestnut. Off topic note: two years ago at an E2EVC event, the concept behind ThinIO was born with just a mad scientist idea amongst peers. If you are lucky enough to be attending E2EVC this weekend, David [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://andrewmorgan.ie/wp-content/uploads/2014/04/logo.png"><img class="alignright  wp-image-2865" src="http://andrewmorgan.ie/wp-content/uploads/2014/04/logo.png" alt="logo" width="189" height="36" /></a>Welcome back to the third instalment of this blog series focusing on our new technology ThinIO!</p>
<p>To recap, below you will find the previous articles:</p>
<ul>
<li class="entry-title"><a href="http://andrewmorgan.ie/2014/10/thinio-facts-and-figures-part-1-vdi-and-ram-caching/" target="_blank">ThinIO facts and figures, Part 1: VDI and Ram caching.</a></li>
<li class="entry-title"><a href="http://andrewmorgan.ie/2014/10/thinio-facts-and-figures-part-2-the-bootstorm-chestnut/" rel="bookmark">ThinIO facts and figures, Part 2: The Bootstorm chestnut.</a></li>
</ul>
<h3>Off topic note:</h3>
<p><img class="aligncenter" src="http://www.e2evc.com/home/Portals/0/E2EVC_header.jpg" alt="" width="408" height="51" /></p>
<p>two years ago at an E2EVC event, the concept behind ThinIO was born with just a mad scientist idea amongst peers.</p>
<p>If you are lucky enough to be attending <a href="http://www.e2evc.com/home/Agenda.aspx">E2EVC</a> this weekend, David and I will be there presenting ThinIO and maybe, just maybe there will be an announcement. Our session is on Saturday at 15:30 so pop by, you won&#8217;t be disappointed.</p>
<h3>Back on topic:</h3>
<p>So here&#8217;s a really interesting blog post. Remote Desktop Services (XenApp / XenDesktop hosted shared) or whatever you like to call it. RDS really presents a fun caching platform for us, as it allows us to deal with a much higher IO volume and achieve deeper savings.</p>
<p>We’ve really tested the heck out of this platform for how we perform on Microsoft RDS, Horizon View RDS integration and Citrix XenSplitPersonality with Machine Creation Services.</p>
<p>The figures we are sharing today are based on the following configuration and load test:</p>
<ul>
<li><img class="alignright  wp-image-3174" src="http://andrewmorgan.ie/wp-content/uploads/2014/10/Logo_Login_VSI_Transparent.png" alt="Logo_Login_VSI_Transparent" width="250" height="42" />Citrix XenDesktop 7.6</li>
<li>Windows Server 2012 r2</li>
<li>Citrix User Profile Manager.</li>
<li>16gb of Ram.</li>
<li>4 vCpu.</li>
<li>LoginVSI 4.1 medium workload 1 hour test.</li>
<li>10 users.</li>
<li>VMFS 5 volume.</li>
</ul>
<h3>Fun figures!</h3>
<p>Diving straight in, lets start by looking at the volume of savings across three cache types.</p>
<p><a href="http://andrewmorgan.ie/wp-content/uploads/2014/10/image001.png"><img class="aligncenter size-large wp-image-3203" src="http://andrewmorgan.ie/wp-content/uploads/2014/10/image001-1024x468.png" alt="image001" width="625" height="285" /></a></p>
<p>&nbsp;</p>
<p><span id="more-3202"></span></p>
<h4>Reviewing the details for a moment:</h4>
<p>Running repetitive tests of at least 3 per cache type, we found even at the lowest entry point we would support (50mb per user) we saw phenomenal savings of over 70% on write IO.</p>
<h5>No pressure no diamonds!</h5>
<p>To put that into perspective, at a 512 MB cache for 10 users, our cache reached maximum capacity at the second user login. With 8 users still left to login, cache full and still an hours worth of load testing left, our ThinIO technology was under serious pressure.</p>
<p>This is key to why ThinIO is such a great solution. We won’t just perform great until we fill our cache, we don’t require architecture changes or care about your storage type, we have no lead times or install days, we will carry on to work with what is available to use, to take a large ammount of pressure off storage IOPS and data throughput.</p>
<p>With the figures above, you can see just how well the intelligence behind our cache can scale even when it faces such a steep workload.</p>
<p>Below you will find a breakdown of each test:</p>
<h3>512 MB cache:</h3>
<p>Breaking down into the figures, on the 512mb cache test, it’s clear to see just how well ThinIO deals with the tiniest of caches:</p>
<p><a href="http://andrewmorgan.ie/wp-content/uploads/2014/10/image0032.png"><img class="aligncenter size-large wp-image-3204" src="http://andrewmorgan.ie/wp-content/uploads/2014/10/image0032-1024x590.png" alt="image003" width="625" height="360" /></a></p>
<p>When we side by side this with our baseline averages, you can see we take a huge chunk out of that Spiky login pattern and continue to  reduce the steady state IO as the test continues:</p>
<p><a href="http://andrewmorgan.ie/wp-content/uploads/2014/10/image0052.png"><img class="aligncenter size-large wp-image-3205" src="http://andrewmorgan.ie/wp-content/uploads/2014/10/image0052-1024x580.png" alt="image005" width="625" height="354" /></a></p>
<p>So lets move up and see how we get on!</p>
<h3>1024 mb cache:</h3>
<p>Doubling up our cache size we see a great increase in both read and write savings as you&#8217;d expect.</p>
<p>With 100mb of cache per user, and the average user profile in the test 3 times that size. We are still under pressure. As we will natively favour optimisations to write IO over read, you&#8217;ll see the bulk of improvements happen in write when we&#8217;re under pressure as illustrated in this test:</p>
<p><a href="http://andrewmorgan.ie/wp-content/uploads/2014/10/image0071.png"><img class="aligncenter size-large wp-image-3207" src="http://andrewmorgan.ie/wp-content/uploads/2014/10/image0071-1024x599.png" alt="image007" width="625" height="365" /></a></p>
<p>&nbsp;</p>
<p>With more cache available during the peak IO point, we make further savings on write:</p>
<p><a href="http://andrewmorgan.ie/wp-content/uploads/2014/10/image0091.png"><img class="aligncenter size-large wp-image-3208" src="http://andrewmorgan.ie/wp-content/uploads/2014/10/image0091-1024x586.png" alt="image009" width="625" height="357" /></a></p>
<h3>2048 mb cache:</h3>
<p>and at our recommended value of 200mb per user in Remote Desktop Services, the results are phenomenal! With this size, even still below the 300mb mark per user profile, the read IO gets a really good boost and the write IO saving well over the 95% mark!</p>
<p><a href="http://andrewmorgan.ie/wp-content/uploads/2014/10/image0111.png"><img class="aligncenter size-large wp-image-3209" src="http://andrewmorgan.ie/wp-content/uploads/2014/10/image0111-1024x537.png" alt="image011" width="625" height="327" /></a></p>
<p>And the side by side comparison is every bit as good as the savings illustrated above, reducing that peak bursty IO to just 41 IOPS:<a href="http://andrewmorgan.ie/wp-content/uploads/2014/10/2048.png"><img class="aligncenter size-large wp-image-3211" src="http://andrewmorgan.ie/wp-content/uploads/2014/10/2048-1024x626.png" alt="2048" width="625" height="382" /></a></p>
<h2><span style="line-height: 1.714285714; font-size: 1rem;">But there&#8217;s more! </span></h2>
<p>As i pointed out in the previous blog, IOPS are just one side of the story. A reduction of data throughput to the disk is also a big benefit when it comes to storage optimisation, and as you can see we make a big difference:</p>
<p><a href="http://andrewmorgan.ie/wp-content/uploads/2014/10/mbsec.png"><img class="aligncenter size-full wp-image-3212" src="http://andrewmorgan.ie/wp-content/uploads/2014/10/mbsec.png" alt="mbsec" width="788" height="487" /></a></p>
<p>&nbsp;</p>
<h2>Wrap up:</h2>
<p>So there you have it, with ThinIO, a simple, in VM solution, you can you seriously reduce your IO footprint, boost user performance and achieve greater storage density per virtual machine or on Remote Desktop Services technology.</p>
<h4>In the mean time:</h4>
<p>If you would like a chance to test ThinIO pre-release, find access to the public beta below. Thank you for your time and happy testing!</p>
<p><a href="http://thinscaletechnology.com/download-thinio/" target="_blank"><img class="aligncenter wp-image-3171 size-medium" src="http://andrewmorgan.ie/wp-content/uploads/2014/10/Download-ThinIO-Beta-300x101.jpg" alt="Download-ThinIO-Beta" width="300" height="101" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2014/10/thinio-facts-and-figures-part-3-rds-and-ram-caching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The curious case of the major XenApp outage.</title>
		<link>http://andrewmorgan.ie/2012/12/the-curious-case-of-the-major-xenapp-outage/</link>
		<comments>http://andrewmorgan.ie/2012/12/the-curious-case-of-the-major-xenapp-outage/#comments</comments>
		<pubDate>Fri, 21 Dec 2012 13:42:17 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Printing]]></category>
		<category><![CDATA[Server Based Computing]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[XenApp]]></category>
		<category><![CDATA[Print Drivers]]></category>
		<category><![CDATA[Windows Server 2003]]></category>
		<category><![CDATA[xenapp]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=2518</guid>
		<description><![CDATA[Here&#8217;s a really strange and interesting issue I faced late last week that resulted in a few head scratching moments and late nights. An Issue began two weeks ago intermittently in a XenApp 4.5 farm used for hosted desktops, intermittently NonPagedPool bytes would shoot through the roof, the event logs would become inundated with event 333 errors and the servers would lock up completely. The running sessions could no longer open new applications, performance was extremely poor and RDP&#8217;ing to the XenApp server [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://andrewmorgan.ie/wp-content/uploads/2011/08/000_ica_h32bit_256-e1314697167561.png"><img class="alignright size-full wp-image-600" src="http://andrewmorgan.ie/wp-content/uploads/2011/08/000_ica_h32bit_256-e1314697167561.png" alt="000_Ica_h32bit_256" width="90" height="90" /></a></p>
<p>Here&#8217;s a really strange and interesting issue I faced late last week that resulted in a few head scratching moments and late nights.</p>
<p>An Issue began two weeks ago intermittently in a XenApp 4.5 farm used for hosted desktops, intermittently NonPagedPool bytes would shoot through the roof, the event logs would become inundated with event 333 errors and the servers would lock up completely.</p>
<p>The running sessions could no longer open new applications, performance was extremely poor and RDP&#8217;ing to the XenApp server would result in an RPC error. Disconnecting the sessions remotely would also result in an RPC error or TSAdmin was completely incapable of connecting to the server. We had no choice but to dump the servers using NMI and pray for a crash dump.</p>
<p>No changes had been made to the environment in a number of weeks and the last change to the environment was a &#8220;Citrix Ready&#8221; printer driver from Lexmark. As the days progressed the issue got worse and worse with more servers going offline day by day. Although we did initially catch a number of crash dumps, we hit a bad run of luck with most of them being corrupt on restart.</p>
<p>By day six, 9 servers went offline throughout the day, I was pulled in to assist resolve this massive issue.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>I fired up the windows debugging tools and managed to get a look at a crash dump fresh from a locked up server.</p>
<p>Using <strong>!vm</strong> i pulled the virtual memory statistics at the point of the crash:<br />
<code><br />
</code><br />
<img class="aligncenter size-full wp-image-2523" src="/wp-content/uploads/2012/12/vm.png" alt="!vm" width="561" height="513" /><br />
<code><br />
</code><br />
So we had a serious non paged pool leak as we suspected, but what exactly was chewing up all that nonpaged?</p>
<p>Running <strong>!poolused 2</strong>, i was able to drill down into the drivers using nonpagedpool and view which driver tag was using the largest amount of the pool as below:<br />
<code><br />
</code><br />
<img class="aligncenter size-full wp-image-2524" src="/wp-content/uploads/2012/12/poolused.png" alt="poolused" width="595" height="181" /><br />
<code><br />
</code><br />
reviewing the list, i was immediately alarmed by the amount of ram in use by the &#8220;Ica&#8221; pool tag. Having reviewed 100&#8217;s of memory dumps I had never seen the Ica pool tag listed in the top 20, never mind using 99721328 bytes (~95mb).</p>
<p>The Ica pool tag is fairly obvious as to who owns it, but just to be on the safe side and to drill down to the owning driver, I ran the following command on the drivers folder to find references to the &#8220;Ica&#8221; pool tag.<br />
<code><br />
</code></p>
<pre>findstr /m /l Ica *.sys</pre>
<p><img class="aligncenter size-full wp-image-2525" src="/wp-content/uploads/2012/12/findstr.png" alt="findstr" width="527" height="135" /><br />
<code><br />
</code><br />
So we got quite a few hits off the Ica pool tag. Quite a number of the above drivers are Microsoft&#8217;s, which is not suprising in the grand scheme of things as we all know the origination of the RDP protocol.</p>
<p>So with a little more information to hand, I set about googling this chain of events to see if it&#8217;s either documented, or hotfixed. A search yielded quite alot of articles including a <a href="http://support.citrix.com/article/CTX129171" target="_blank">private hotfix</a> and a <a href="http://support.citrix.com/article/CTX127926" target="_blank">Rollup pack</a>.</p>
<p>Drilling down into the technotes to see if I could find a potential cause for this issue, I was left a little wanting with the lack of information available:</p>
<p style="padding-left: 30px;"><em>Servers with Hotfix Rollup Pack 6 installed can run out of non-paged pool memory in the ICA Pool tag. The issue occurs when users log on to the server and its frequency increases with the amount of time since the most recent restart and the number of logons since the restart.</em></p>
<p>What irked me here, was the lack of information and the fact that these servers had been running HFRP 6 for roughly 18 months with no issues similar to this.<br />
<code><br />
</code></p>
<h3 style="text-align: center;"><em>Why all of a sudden are we losing servers all over the place to such an issue?</em></h3>
<p><code><br />
</code><br />
I dug further into the hotfix notes with help from my good friend and all round cool Citrite<a href="https://twitter.com/jimmyleroux" target="_blank"> James Denne</a>, the hotfix specifically noted:</p>
<p style="padding-left: 30px;"><em>When a server is in low memory condition the &lt;Redacted&gt;() spins in an infinite loop by constantly allocating an OUTBUF and trying to write it on the stack. This problem happen when system is going in and out in low memory condition.</em></p>
<p>So there&#8217;s a great explanation of the issue from the horses mouth, but again there was a niggling problem in the back of my head&#8230;<br />
<code><br />
</code></p>
<h3 style="text-align: center;"><em>These servers weren&#8217;t spinning in and out of low memory, our pool usage reporting would have caught this?</em></h3>
<p><code><br />
</code><br />
I was satisfied to see a hotfix was available, but in the back of my head I was concerned about the change that may have caused this issue, it&#8217;s still unclear what is causing this low memory condition to spin the infinite loop and why we couldn&#8217;t see the low memory scenario before it happens. Being an massive issue, we had to make a quick turn around here. We had a choice of going to HFRP 7 or using the private hotfix available. I chose the private hotfix, for two reasons:</p>
<ul>
<li>Mass Deploying a roll up pack to fix one problem is like tapping a nail in with a sledge hammer.</li>
<li>My experience with HotFix Rollup Packs is they fix your issues, but introduce at least one new one.</li>
</ul>
<p>We took all the servers offline for emergency maintenance that night and cautiously waited for the morning to come and see if our issue was resolved.<br />
<code><br />
</code></p>
<h3 style="text-align: center;"><em>and so we patiently waited&#8230;</em></h3>
<p><code><br />
</code><br />
Once hotfixed and rebooted, we arrived at the office early to watch as the user sessions began to filter in to the Farm. All was quiet for the first hour or so, but then the phones started.</p>
<p>once the user load hit 15-16 users per XenApp session, a number of servers began to again log a number of eventlog 333&#8217;s as below:<br />
<code><br />
</code><br />
<img class="aligncenter size-full wp-image-2526" src="/wp-content/uploads/2012/12/333.png" alt="333." width="407" height="450" /><br />
<code><br />
</code></p>
<h3 style="text-align: center;"><em>Dammit.</em></h3>
<p><code><br />
</code><br />
Frantically we connected to the console of a server, to check the paged pool states but again no alerts on pagepool size? as below the ICA pool tag was nowhere to be seen:<br />
<code><br />
</code><br />
<img class="aligncenter size-full wp-image-2527" src="/wp-content/uploads/2012/12/healthypoolmon.png" alt="healthypoolmon" width="595" height="294" /><br />
<code><br />
</code><br />
And the ica tag was at a much more respectable / expected value as below:<br />
<code><br />
</code><br />
<img class="aligncenter size-full wp-image-2530" src="/wp-content/uploads/2012/12/icatag2.png" alt="icatag" width="595" height="300" /><br />
<code><br />
</code><br />
Our next clue came in the form of the following, when users were logging in they were getting the following error:<br />
<code><br />
</code><br />
<img class="aligncenter size-full wp-image-2531" src="/wp-content/uploads/2012/12/proferror.png" alt="proferror" width="429" height="226" /><br />
<code><br />
</code></p>
<h3 style="text-align: center;"><em>So we&#8217;ve fixed our Ica memory leak, now what the hell is happening?</em></h3>
<p><code><br />
</code><br />
If memory usage for the pools are ok but we&#8217;re still getting errors about flushing to the registry, and now new user profiles can&#8217;t load their profiles, my hunch was there had to be something wrong with the registry hives&#8230;</p>
<p>I used command prompt to open the &#8220;Documents and Settings&#8221; folder and ran the following command:</p>
<pre>dir /s /a ntuser.dat</pre>
<p>With a quick glance, i found the following:<br />
<code><br />
</code><br />
<img class="aligncenter size-full wp-image-2532" src="/wp-content/uploads/2012/12/ntuser.png" alt="ntuser" width="446" height="110" /><br />
<code><br />
</code><br />
The &#8220;Citrix Print Manager Service&#8221; user account had a registry hive of over 50mb? What in the name of superman is hiding in that registry hive?</p>
<p>To rectify the issue immediately, we stopped the above print manager service and forced the hive to be unloaded with <a href="http://www.microsoft.com/en-us/download/details.aspx?id=5405" target="_blank">delprof</a>. Once we had done this, the user profiles began to load again on each affected server. But we&#8217;re now unable to use client redirected printing.<br />
<code><br />
</code></p>
<h3 style="text-align: center;"><em>To regedit!</em></h3>
<p><code><br />
</code><br />
I mounted the registry of a profile that had failed to delete and drilled down to see what all the fuss was about. As this was  now firmly in the printing land, I went looking for keys to match the Lexmark driver change from a number of weeks ago.</p>
<p>What I found was extremely interesting, for each client redirected printer ever mapped with the Lexmark driver, we had an entry under both the PCLPlugin and PSPlugIn keys:<br />
<code><br />
</code><br />
<img class="aligncenter size-full wp-image-2536" src="/wp-content/uploads/2012/12/pclplugin.png" alt="pclplugin" width="595" height="647" /><br />
<code><br />
</code><br />
Although this was a really questionable practice from lexmark, I examined the keys under each entry for the PclPlugin key and they consisted of just a few small binary files of which were no more than a KB or two.</p>
<p>Upon looking at the same keys under PSPlugin, I found a new key, called GDL. This GDL key was absolutely massive and there was one for each and every time a client printer had been redirected using the Lexmark V2 driver.<br />
<code><br />
</code><br />
<img class="aligncenter size-full wp-image-2537" src="/wp-content/uploads/2012/12/gdl.png" alt="gdl" width="543" height="440" /><br />
<code><br />
</code><br />
I exported both both the users hive, and the psplugin key to text and the comparison is below:<br />
<code><br />
</code><br />
<img class="aligncenter size-full wp-image-2538" src="/wp-content/uploads/2012/12/comparison.png" alt="comparison" width="595" height="405" /><br />
<code><br />
</code><br />
The GDL key itself was over 3mb per redirected printer!?!?:<br />
<code><br />
</code><br />
<img class="aligncenter size-full wp-image-2540" src="/wp-content/uploads/2012/12/gdl1.png" alt="gdl" width="363" height="503" /></p>
<h3 style="text-align: center;">So there we have it.</h3>
<p><code><br />
</code><br />
<strong>The route cause was as follows:</strong></p>
<p>This Lexmark driver has a weird tendency to store an unbelievable amount of crap in the registry for users.</p>
<p>The Citrix print manager service also suffers this faith when it maps a redirected printer.</p>
<p>As more and more users were testing in production (GRRRR!) / beginning to use a new printing solution on a customer site, this registry file began to grow and grow ultimately flooding the maximum registry size of 30% of the paged pool ram.</p>
<p>As the registry hive size was growing out of control, the Ica driver ran into a low memory situation and ultimately caused the infinite loop.</p>
<p>The Ica loop and nonpaged saturation was masking the printer driver bloat in the registry.</p>
<p>As the days went on, more and more servers began to saturate the Maximum registry size and go offline.</p>
<p><strong>Corrective actions:</strong></p>
<ul>
<li>Enforce a policy to not allow native drivers, in any way, shape or form when redirecting printers where possible.</li>
<li>Obtain the latest driver from Lexmark is you have lexmark printers.</li>
<li>Give lexmark an earful for not testing their drivers.</li>
</ul>
<p><strong>Lessons Learned:</strong></p>
<ul>
<li>Don&#8217;t test things in production.</li>
<li>Don&#8217;t trust a vendor with &#8220;Citrix Ready&#8221;, it&#8217;s up to them to test these things and they regularly don&#8217;t.</li>
<li>Create a monitor for registry size (perfmon &gt; system &gt; % Registry quota in use)</li>
<li>install the debugging tools on the XenApp 4.5 servers as this issue is going to become more prevalent. <strong>*</strong></li>
</ul>
<p><strong>* This isn&#8217;t going to get any better.</strong></p>
<p>As Vendors move further and further towards 64 bit architectures they can and will forget about the extremely restrictive memory sizes available in 32 bit versions of windows, 64bit windows has so much memory available for the pools they can be as sloppy as they want without much concern.</p>
<p>Server 2003, Windows XP and XenApp 4.5&#8217;s death bells are knelling and have been for some time.</p>
<p>You are going to see pagepool&#8217;s floods and other such nasties more and more in the coming months before you finally decommission your old server 2003 environment. My advice to you is to:</p>
<ul>
<li>get very comfortable with the following tools:
<ul>
<li>PoolMon.</li>
<li>Process explorer.</li>
<li>Windows debugging tools.</li>
</ul>
</li>
<li>Have a good read of the following article: <a href="http://www.windowsitpro.com/article/registry2/troubleshooting-the-infamous-event-id-333-errors-101059" target="_blank">333</a>, read it, read it again.</li>
<li>Never be afraid to have a look at a dump file yourself.</li>
<li>Throw an issue at every vendor possible during troubleshooting, it&#8217;s in their interest to prove it&#8217;s not their software at fault.</li>
<li>Understand your pagepool sizes and limitations.</li>
<li>Never trust a printer driver.</li>
<li>Never, ever, ever trust a Vendor to behave accordingly or follow the Citrix Ready standards.</li>
<li>If you absolutely, positively need to run something in server 2003 or XP, consider using XenDesktop hosted apps to isolate the problem to a singular kernel away from the bulk of your task workers.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2012/12/the-curious-case-of-the-major-xenapp-outage/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Viewing open files on a file server from powershell.</title>
		<link>http://andrewmorgan.ie/2012/12/viewing-open-files-on-a-file-server-from-powershell/</link>
		<comments>http://andrewmorgan.ie/2012/12/viewing-open-files-on-a-file-server-from-powershell/#comments</comments>
		<pubDate>Wed, 05 Dec 2012 14:55:23 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[Clustering]]></category>
		<category><![CDATA[PowerShell Scripting]]></category>
		<category><![CDATA[Server Based Computing]]></category>
		<category><![CDATA[Virtual Desktop Infrastructure]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[XenApp]]></category>
		<category><![CDATA[XenDesktop]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SBC]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[VDI]]></category>
		<category><![CDATA[xenapp]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=2480</guid>
		<description><![CDATA[So this is a situation you should all be aware of in an SBC / VDI environment, despite all warnings, you&#8217;ve redirected folders to your network drive and your file servers are screaming in agony? Having been in this situation recently, I needed to audit and report on the types of files open on the file server, my hunch was a certain select number of users were running applications (like *gulp* lotus notes) from the network share. Disappointed with the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright size-full" alt="/wp-content/uploads/2011/03/windows_powershell_icon.png?w=58&amp;h=58&amp;h=58" src="/wp-content/uploads/2011/03/windows_powershell_icon.png?w=58&amp;h=58&amp;h=58" height="58" width="58" />So this is a situation you should all be aware of in an SBC / VDI environment, despite all <a href="http://helgeklein.com/blog/2011/11/folder-redirection-denial-of-service-waiting-to-happen/" target="_blank">warnings</a>, you&#8217;ve redirected folders to your network drive and your file servers are screaming in agony?</p>
<p>Having been in this situation recently, I needed to audit and report on the types of files open on the file server, my hunch was a certain select number of users were running applications (like *gulp* lotus notes) from the network share.</p>
<p>Disappointed with the powershell scripts on the interwebs, I decided to write my own function to perform this task:</p>
<p>[sourcecode language=&#8221;powershell&#8221;]<br />
function get-openfiles{<br />
param(<br />
    $computername=@($env:computername),<br />
    $verbose=$false)<br />
    $collection = @()<br />
foreach ($computer in $computername){<br />
    $netfile = [ADSI]&quot;WinNT://$computer/LanmanServer&quot;</p>
<p>        $netfile.Invoke(&quot;Resources&quot;) | foreach {<br />
            try{<br />
                $collection += New-Object PsObject -Property @{<br />
        		  Id = $_.GetType().InvokeMember(&quot;Name&quot;, &#8216;GetProperty&#8217;, $null, $_, $null)<br />
        		  itemPath = $_.GetType().InvokeMember(&quot;Path&quot;, &#8216;GetProperty&#8217;, $null, $_, $null)<br />
        		  UserName = $_.GetType().InvokeMember(&quot;User&quot;, &#8216;GetProperty&#8217;, $null, $_, $null)<br />
        		  LockCount = $_.GetType().InvokeMember(&quot;LockCount&quot;, &#8216;GetProperty&#8217;, $null, $_, $null)<br />
        		  Server = $computer<br />
        		}<br />
            }<br />
            catch{<br />
                if ($verbose){write-warning $error[0]}<br />
            }<br />
        }<br />
    }<br />
    Return $collection<br />
}<br />
[/sourcecode]</p>
<p>The function above (get-openfiles) has been written to accept an array of servers to the command line and it will return the following items:</p>
<ul>
<li>The ID of the open file.</li>
</ul>
<ul>
<li>The server it&#8217;s open from.</li>
</ul>
<ul>
<li>The username who has the file open.</li>
</ul>
<ul>
<li>The amount of locks the file has.</li>
</ul>
<p><strong>A couple of quick examples for using this command are below:<br />
<code><br />
</code><br />
</strong> <span style="text-decoration:underline;">Retrieving open files from server1:</span><br />
<code><br />
</code><br />
<img class="aligncenter" alt="full" src="/wp-content/uploads/2012/12/full.png" height="261" width="595" /><br />
<code><br />
</code></p>
<p>[sourcecode language=&#8221;powershell&#8221;]get-openfiles -computername server1 | select server,itempath,lockcount[/sourcecode]</p>
<p><code><br />
</code><br />
<span style="text-decoration:underline;">Retrieve a count of open files that end with the nsf file type (<em>Lotus Notes</em>):</span><br />
<code><br />
</code><br />
<img class="aligncenter size-full wp-image-2483" alt="count" src="/wp-content/uploads/2012/12/count.png" height="37" width="595" /><br />
<code><br />
</code></p>
<p>[sourcecode language=&#8221;powershell&#8221;](get-open files -computername server1,server2 | ? {$_.itempath -like &quot;*.nsf*&quot;}).count()[/sourcecode]</p>
<p><code><br />
</code><br />
<span style="text-decoration:underline;">Retrieve a report of total open files on a number of file servers:</span><br />
<code><br />
</code><br />
<img class="aligncenter size-full wp-image-2487" alt="report" src="/wp-content/uploads/2012/12/report.png" height="64" width="595" /></p>
<p>&nbsp;</p>
<p>[sourcecode language=&#8221;powershell&#8221;]get-openfiles -computername server1,server2,server3,server4,server5 | group -property server[/sourcecode]</p>
<p><code> </code></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2012/12/viewing-open-files-on-a-file-server-from-powershell/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Monitoring Storage disk queue&#8217;s and IO with PowerShell</title>
		<link>http://andrewmorgan.ie/2012/11/monitoring-storage-disk-queues-and-io-with-powershell/</link>
		<comments>http://andrewmorgan.ie/2012/11/monitoring-storage-disk-queues-and-io-with-powershell/#comments</comments>
		<pubDate>Fri, 30 Nov 2012 09:38:45 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[Citrix]]></category>
		<category><![CDATA[PowerShell Scripting]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[XenApp]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[xenapp]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=2469</guid>
		<description><![CDATA[Here&#8217;s one that used to bother me alot. The problem usually went as follows: &#8220;Your XenApp servers have very high disk queue&#8217;s and IO&#8221; &#8220;What&#8217;s causing it?&#8221; &#8220;dunno&#8230;&#8221; With Server 2008, the task manager&#8217;s resource monitor feature will help you find these items. But in server 2003 this was a perilous task. The specific details for disk io per process are stored in performance monitor under each specific process running. Trying to analyse each process was a massive pain, but [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright size-full" alt="/wp-content/uploads/2011/03/windows_powershell_icon.png?w=58&amp;h=58&amp;h=58" src="/wp-content/uploads/2011/03/windows_powershell_icon.png?w=58&amp;h=58&amp;h=58" height="58" width="58" />Here&#8217;s one that used to bother me alot. The problem usually went as follows:</p>
<p>&#8220;Your XenApp servers have very high disk queue&#8217;s and IO&#8221;</p>
<p>&#8220;What&#8217;s causing it?&#8221;</p>
<p>&#8220;dunno&#8230;&#8221;</p>
<p>With Server 2008, the task manager&#8217;s resource monitor feature will help you find these items. But in server 2003 this was a perilous task. The specific details for disk io per process are stored in performance monitor under each specific process running. Trying to analyse each process was a massive pain, but powershell can do some very clever work to help alleviate this!</p>
<p>I wrote two quick functions which act similar to &#8220;top&#8221; in linux for giving an on screen view, updating at interval of what exactly is creating IO activity. These two functions are:</p>
<p>get-IODataBytes:</p>
<p><img class="aligncenter size-full wp-image-2470" alt="storageio" src="/wp-content/uploads/2012/11/storageio.png" height="233" width="595" /></p>
<p>Get-IODataOperations</p>
<p><img class="aligncenter size-full wp-image-2471" alt="storageioops" src="/wp-content/uploads/2012/11/storageioops.png" height="240" width="595" /></p>
<p>The code for these functions are below:</p>
<p>[sourcecode language=&#8221;powershell&#8221;]<br />
function get-iodatabytes{<br />
    $result=(get-counter -counter &quot;Process(*)IO Data Bytes/sec&quot; -ea 0).countersamples | ? {$_.cookedvalue -gt 0} | select instancename,@{Name=&quot;SessionID&quot;;Expression={if ($_.path.contains(&quot;#&quot;)){($_.path.split(&quot;#)&quot;))[1]}else{&quot;0&quot;}}},@{Name=&quot;IO Data Bytes/sec&quot;;Expression={[math]::Round($_.cookedvalue,0)}},@{Name=&quot;IO Data KBytes/sec&quot;;Expression={[math]::Round($_.cookedvalue / 1024,0)}} | sort -Descending &quot;IO Data Bytes/sec&quot; | ft<br />
    $currentqueue=(((get-counter -counter &quot;PhysicalDisk(0 C:)Current Disk Queue Length&quot; -ea 0).countersamples) | select cookedvalue).cookedvalue<br />
    clear<br />
    write-warning &quot;Hit [CTRL] + [C] to exit live capture&quot;<br />
    write-host &quot;Current Disk queue: $currentqueue&quot;<br />
    return $Result<br />
}</p>
<p>FUnction get-IODataOperations {<br />
    $result=(get-counter -counter &quot;Process(*)IO Data Operations/sec&quot; -ea 0).countersamples | ? {$_.cookedvalue -gt 0} | select instancename,@{Name=&quot;SessionID&quot;;Expression={if ($_.path.contains(&quot;#&quot;)){($_.path.split(&quot;#)&quot;))[1]}else{&quot;0&quot;}}},@{Name=&quot;IO Data Operations/sec&quot;;Expression={[math]::Round($_.cookedvalue,0)}} | sort -Descending &quot;IO Data Operations/sec&quot; | ft<br />
    $currentqueue=(((get-counter -counter &quot;PhysicalDisk(0 C:)Current Disk Queue Length&quot; -ea 0).countersamples) | select cookedvalue).cookedvalue<br />
    clear<br />
    write-warning &quot;Hit [CTRL] + [C] to exit live capture&quot;<br />
    write-host &quot;Current Disk queue: $currentqueue&quot;<br />
    return $Result<br />
}</p>
<p>[/sourcecode]</p>
<p>if you wish to loop one of these functions, simply use the following code:</p>
<p>[sourcecode language=&#8221;powershell&#8221;]<br />
while ($true){<br />
get-iodataoperations<br />
start-sleep 1<br />
}<br />
[/sourcecode]</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2012/11/monitoring-storage-disk-queues-and-io-with-powershell/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>On IOPS, shared storage and a fresh idea. (Part 3) tying it all together in the stack</title>
		<link>http://andrewmorgan.ie/2012/10/on-iops-shared-storage-and-a-fresh-idea-part-3-tying-it-all-together-in-the-stack/</link>
		<comments>http://andrewmorgan.ie/2012/10/on-iops-shared-storage-and-a-fresh-idea-part-3-tying-it-all-together-in-the-stack/#comments</comments>
		<pubDate>Fri, 26 Oct 2012 14:08:13 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[Citrix]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Server Based Computing]]></category>
		<category><![CDATA[Server Virtualisation]]></category>
		<category><![CDATA[Virtual Desktop Infrastructure]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[XenApp]]></category>
		<category><![CDATA[XenDesktop]]></category>
		<category><![CDATA[XenServer]]></category>
		<category><![CDATA[HyperV]]></category>
		<category><![CDATA[SBC]]></category>
		<category><![CDATA[VDI]]></category>
		<category><![CDATA[xenapp]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=2393</guid>
		<description><![CDATA[Note: This is part three, have a read of part one and two. Hello there, and thank you for dropping back for part 3&#8230; I suppose I should start with the disappointing news that I have yet to test this option for VDI in a box. And despite Aaron Parker&#8217;s suggestions it wasn&#8217;t due to lack of inspiration, it was down to lack of time! This series has gathered allot of interest from both community and storage vendors alike, and [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright" alt="" src="/wp-content/uploads/2012/10/andrew-logo1.png?w=595" height="76" width="75" />Note: This is part three, have a read of part <a href="http://andrewmorgan.ie/2012/10/05/on-e2e-geek-speak-iops-shared-storage-and-a-fresh-idea-part-1/" target="_blank">one</a> and <a href="http://andrewmorgan.ie/2012/10/10/on-iops-shared-storage-and-a-fresh-idea-part-2-go-go-citrix-machine-creation-services/" target="_blank">two</a>.</p>
<p>Hello there, and thank you for dropping back for part 3&#8230;</p>
<p>I suppose I should start with the disappointing news that I have yet to test this option for VDI in a box. And despite Aaron Parker&#8217;s suggestions it wasn&#8217;t due to lack of inspiration, it was down to lack of time! This series has gathered allot of interest from both community and storage vendors alike, and I feel I should set the record straight before I got any further:</p>
<ol>
<li>This<strong> isn&#8217;t a production idea</strong>, you would be crazy to use this idea in a live environment.</li>
<li>Throughout this entire project, we&#8217;re focusing on pooled stateless. Stateful desktops would be a separate post entirely.</li>
<li>This wasn&#8217;t an attack on products in this market space, merely a fresh view on an old problem.</li>
<li>If i had the skills or funds necessary to run this project to a production solution, I wouldn&#8217;t have posted it. I would already be hard at work creating a reasonably priced product!</li>
</ol>
<p>Now that my declarations are out of the way, I&#8217;d first like to talk about the moral of the story. This isn&#8217;t an unfamiliar expression:</p>
<p><strong>IOPS mitigation is not about read IOPS it&#8217;s about <span style="text-decoration:underline;">WRITE IOPS</span></strong>!</p>
<p>VMware, Citrix and Microsoft have similar but very different solutions for read IOPS negotiation. Similar in the sense that they try to negate storage read IOPS. But the key difference with XenServer is the local disk cache via Intellicache has the out of box functionality to cache the majority of read&#8217;s to local disk (think SSD*) without the baked in soft limit of 512 MB for Microsoft HyperV and VMware respectively.</p>
<p>Long story short, VMware and Microsoft&#8217;s solution is about 512mb of recognizable read IOPS negation un-tuned, but enabled. Of course this value can be tuned upwards, but the low entry point of cache would suggest, at least to me, that tuning up will have an upsetting affect on the host.</p>
<p>This to me is why IntelliCache has the upperhand in the (value add product) VDI space for read IOPS negation and they even throw in the Hypervisor as part of your XenDesktop licensing, so win win, but what about those pesky write IOPS?</p>
<p><span id="more-2393"></span></p>
<p><strong>Let&#8217;s look at Citrix for a moment!</strong></p>
<p>If we review <a href="http://andrewmorgan.ie/2012/10/05/on-e2e-geek-speak-iops-shared-storage-and-a-fresh-idea-part-1/" target="_blank">article 1</a> and <a href="http://andrewmorgan.ie/2012/10/10/on-iops-shared-storage-and-a-fresh-idea-part-2-go-go-citrix-machine-creation-services/" target="_blank">article 2</a> for a moment, the half baked idea formed by <a href="https://twitter.com/barryschiffer" target="_blank">Barry Schiffer</a>, <a title="The dutch IT guy!" href="http://www.ingmarverheij.com/">Ingmar Verheij</a>, <a href="https://twitter.com/KBaggerman" target="_blank">Kees Baggerman</a>, <a title="An amazing blog, i regularly read from Remko." href="http://www.remkoweijnen.nl/blog/">Remko Weijnen</a> and I, when combined with Citrix IntelliCache turned out to be a phenomenal combination to create an IOPS avoidance product. But the key point we had in the back of our heads was, Citrix provisioning server already has this driver!</p>
<p>Citrix provisioning server has a RAM cache driver, with configurable size baked into the Provisioning Services product. This driver works in a very similar way to the EWF driver, just without the API and flexibility of a Microsoft driver.</p>
<p>There are customers of Citrix out there using RAM caching with XenApp who I spoke to, they have assigned a large (8gb+ cache, 3-4gb of cache utilised day to day) to negotiate the chance of a spillover, but it could still happen and this is an acceptable risk to their implementation. I struggled to find a XenDesktop customer using this method who would talk about their implementation.</p>
<p>But with XenDesktop in mind, using an overly large cache size to avoid spillover just doesn&#8217;t scale the way a consolidated Server Based Computing model would&#8230; Which leaves us back in this same dilemma, I&#8217;d like to cache in RAM, but I don&#8217;t want to risk users losing data when they perform a task we have not factored for.</p>
<p>So with all this in mind, lets talk about my final hurdle I faced with this project.</p>
<p><img class="alignright size-thumbnail wp-image-2402" title="BSOD" alt="" src="/wp-content/uploads/2012/10/bsod.jpg?w=150" height="112" width="150" /></p>
<p><strong>RAM cache flood and my half baked solution:</strong></p>
<p>The Microsoft EWF driver suffered the same problem as the Citrix provisioning server when the cache filled, i.e. it froze or outright bug checked if you tried to reference a file put into the cache before you filled it with other information.</p>
<p><a href="http://info.kraftkennedy.com/blog/bid/102199/Citrix-Provisioning-Server-Understanding-the-Limitations-of-Write-Cache-in-Target-Device-RAM">Jeff Silverman</a> has done a great article on what happens in this event with the Citrix Provisioning Services RAM cache and I urge you to go read it so I don&#8217;t have to repeat it! Go now, I&#8217;ll wait right here for you to get back!</p>
<p><strong>Read that article?</strong> Ok good, let&#8217;s continue.</p>
<p>To combat this scenario with the Windows EWF driver, I created a very rough around the edges windows service using polling (Sorry Remko) to check the size of the cache periodically via the <a href="http://msdn.microsoft.com/en-us/library/ms933209%28v=winembedded.5%29.aspx">EWFAPI</a> and write the cache out to disk.</p>
<p>The function in the EWFAPI called <a href="http://msdn.microsoft.com/en-us/library/aa940887%28v=winembedded.5%29.aspx">EwfCommitAndDisableLive</a> allowed me to dump the ram cache to disk and subvert the cache, going straight to disk when this event had occurred. By using this routine the ram cache simply disables itself and allows pass-through to disk at this point.</p>
<p><a href="/wp-content/uploads/2012/10/ewfdriverbasicprincipal.png"><img class="aligncenter" title="EWFDriverBasicPrincipal" alt="" src="/wp-content/uploads/2012/10/ewfdriverbasicprincipal.png" height="244" width="516" /></a></p>
<p>With this in mind, I tuned my service to spill to disk when the cache was greater than 80% of ram available, not in use by the operating system when the system booted, This worked well to a point, but the key failure to this approach became apparent when you opened a large number of applications and they struggled to occupy the space available around the cache.</p>
<p>My second attempt however, proved much more fruitful where I monitored for free system bytes in memory and if this dropped below a certain threshold the EWF drive began it&#8217;s dump routine to disk. Once the dump routine was complete, ram cleared and the writes had been committed to storage where the disk continued to use it for the remainder of the session. Once this spill over had occurred, a notification bubble fired in the user session warning them of the degradation of service and they should log off saving work at the next convenient moment&#8230;</p>
<p><em>Voila! no blue screen, spill to disk and user notification of degradation.</em></p>
<p>This wasn&#8217;t fool proof, it was very rough, it didn&#8217;t handle files being written larger than the RAM cache, but In my opinion, it satisfied the <strong>biggest fear</strong> and business case against using the Citrix Provisioning server ram caching, the ram cache flood scenario. I was happy with the results and it scaled well to the size of my lab, it showed what is possible with a RAM filter driver and it allowed me to prove my point before I started to poke the hornets nest of the storage market. So let&#8217;s park the EWF story for now and focus on my favorite subject, Citrix technologies.</p>
<p><em><strong>Note:</strong> I won&#8217;t be making this service and driver solution publicly available, it&#8217;s not a production ready solution and Microsoft would sue the pants off me. I&#8217;m sure you&#8217;ll understand why, but if you want more information drop me an email.</em></p>
<p>The next part&#8217;s of this blog are all theoretical, but I know certain people I want to listen, <em>are</em> listening (Hi Kenneth, hope you are well :)).</p>
<p><strong>Negating the negated. Lets talk about that spill over.</strong></p>
<p>But what about that Spill over event? by using a spill over from ram to disk, we create a situation where we could change a steady, slightly reliable IOPS per from each desktop, to a situation where, &#8220;couldn&#8217;t a collection of spillovers at the same time cause your storage to becoming swamped with IOPS?&#8221;</p>
<p>Absolutely, and I&#8217;ve been thinking about this quite a bit&#8230; But there&#8217;s another hidden potential here even in a RAM spill over scenario&#8230;</p>
<p style="text-align:center;"><em>With a little bit of trickery couldn&#8217;t we also negate this spillover event with a simple provisioning job? </em></p>
<p><a href="/wp-content/uploads/2012/10/difdiskcopycreate.png"><img class="aligncenter size-full wp-image-2408" title="difdiskcopycreate" alt="" src="/wp-content/uploads/2012/10/difdiskcopycreate.png" height="272" width="595" /></a></p>
<p>With a bit of time spent thinking about this scenario, this is what I came up with&#8230;</p>
<p>Why doesn&#8217;t the controller, for XenApp or XenDesktop (PVS / DDC) copy or (my personal preference) create a local, blank differencing disk when a VM boots?</p>
<p>The hypervisor could be completely agnostic at this point, we could spill over to local disk, keeping write IOPS completely away from the shared storage? even in a spill over event?</p>
<p>This approach (in this half baked enthusiasts view) would negate the negated&#8230; But don&#8217;t take my word for it, lets go for some theoretical solutions.</p>
<p><strong>Solution A: Implementing a spill over routine with the Citrix provisioning server driver.</strong></p>
<p>So with my success with the Microsoft driver, I got myself thinking how easy would this be to do utilizing the Citrix Provisioning Services driver? Without access to the code, I&#8217;m going to be making slightly risky statements here, but I have allot of faith in Citrix that they could make this happen.</p>
<p>From everyone I have spoken to about this idea, they all see the value in the ability to spill out of RAM&#8230; So Citrix, please make it so. Below are some idea&#8217;s for deployment methods assuming Citrix do march down this route and the pro&#8217;s and con&#8217;s I see that live with each scenario.</p>
<p>Bear in mind, I&#8217;m not a storage guy, a full time developer or a software architect, I&#8217;m just an enthusiast that see&#8217;s potential, so drop your comments below as to what you think!</p>
<p><span style="text-decoration:underline;"><strong>Machine Creation Services.</strong></span></p>
<p><strong>Idea A: Provisioning services improved RAM caching, Machine Creation services and Intellicache on XenServer.</strong></p>
<p><a href="/wp-content/uploads/2012/10/1-mcs-pvs-driver1.png"><img class="aligncenter size-full wp-image-2406" title="1. MCS &amp; PVS Driver" alt="" src="/wp-content/uploads/2012/10/1-mcs-pvs-driver1.png" height="355" width="595" /></a></p>
<p>Utilizing XenServer and MCS we could leverage the intellicache to negate the read IOPS as we proved in my own EWF driver testing, but still deliver on that spill over mechanism allowing continuation of service.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Read IOPS negation.</li>
<li>RAM caching to remove write IOPS (bar a spill over).</li>
<li>Continuation of service in a cache flood scenario.</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Limited to XenServer.</li>
<li>Over provisioning of RAM necessary per desktop.</li>
<li>RAM spillover will result in a large amount of IOPS to the shared storage.</li>
</ul>
<p><strong>Idea B</strong>: <strong>Provisioning services improved RAM caching, Machine Creation services and Intellicache on XenServer&#8230; With local copy!</strong></p>
<p><a href="/wp-content/uploads/2012/10/2-mcs-pvs-local-copy.png"><img class="aligncenter size-full wp-image-2409" title="2. MCS &amp; PVS &amp; local copy" alt="" src="/wp-content/uploads/2012/10/2-mcs-pvs-local-copy.png" height="329" width="595" /></a></p>
<p>Same benefits as previous, but now, we have zero reliance on the shared storage when the VM is up (except for ID disk actions).</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Read IOPS negation.</li>
<li>RAM caching to remove write IOPS.</li>
<li>Uses local resources in a spill over.</li>
<li>Continuation of service in a cache flood scenario.</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Limited to XenServer.</li>
<li>Over provisioning of RAM necessary per desktop.</li>
</ul>
<p>So that&#8217;s MCS in a nutshell with per VM caching, I think this solution has so much potential I can&#8217;t believe it&#8217;s not been done, but I digress. So lets park that topic for now and move on to Citrix Provisioning Services.</p>
<p><strong><span style="text-decoration:underline;">Citrix Provisioning Services:</span><br />
</strong></p>
<p>So lets look at the &#8220;favorite of many&#8221; technology.</p>
<p><strong>Idea A: Citrix Provisioning Services and Improved RAM caching driver.</strong></p>
<p><a href="/wp-content/uploads/2012/10/pure-pvs.png"><img class="aligncenter size-full wp-image-2407" title="Pure PVS" alt="" src="/wp-content/uploads/2012/10/pure-pvs.png" height="401" width="595" /></a></p>
<p>In a pure Provisioning services environment, we would force our read IOPS via the lan, instead of storage protocol but still deliver a spill back to disk to allow continuation of service.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Hypervisor agnostic.</li>
<li>RAM caching to remove write IOPS (bar a spill over).</li>
<li>Continuation of service in a cache flood scenario.</li>
<li>Potentially no shared storage needed, at all, if caching on the PVS server.</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Read IOPS aren&#8217;t really negated, they&#8217;re just forced over another technology.</li>
<li>Over provisioning of RAM necessary per desktop.</li>
<li>RAM spillover will result in a large amount of IOPS to the shared storage / pvs server.</li>
</ul>
<p><strong>Idea B: Citrix Provisioning Services and Improved RAM caching driver.. With local copy!<br />
</strong></p>
<p><a href="/wp-content/uploads/2012/10/pvslocalcopy.png"><img class="aligncenter size-full wp-image-2413" title="pvslocalcopy" alt="" src="/wp-content/uploads/2012/10/pvslocalcopy.png" height="500" width="576" /></a></p>
<p>Taking the above benefits, but with the gain of utilizing local storage in the spillover event.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Hypervisor agnostic.</li>
<li>RAM caching to remove write IOPS.</li>
<li>Uses local resources in a spill over.</li>
<li>Continuation of service in a cache flood scenario.</li>
<li>Potentially no shared storage needed, at all.</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Read IOPS aren&#8217;t really negated, they&#8217;re just forced over another technology.</li>
<li>Over provisioning of RAM necessary per desktop.</li>
</ul>
<p><span style="text-decoration:underline;"><strong>So lets Review:</strong></span></p>
<p>And there we have it, 4 solutions to IOPS negation utilizing the Provisioning server RAM caching driver, with a little bit of a modification to deliver a robust solution to RAM caching.</p>
<p>The copy and creation of differencing disks again would deliver additional benefits to leverage the hardware you put into each Hypervisor without the Shared Storage investment.</p>
<p><em>Win Win, but is it?</em></p>
<p><strong>There&#8217;s an oversight here:</strong></p>
<p>There&#8217;s a niggle here that&#8217;s been bothering me for some time and you&#8217;ll probably note I mentioned it as a CON to most of the solutions above&#8230; I&#8217;m going to lay it out on the table in complete honesty&#8230;</p>
<p style="text-align:center;"><em>&#8220;Isn&#8217;t over provisioning RAM on a per desktop basis a waste of resource? Wouldn&#8217;t it be better if we could share that resource across all VM&#8217;s on a Hypervisor basis?&#8221;</em></p>
<p>You betcha! If we are assigning out (for argument sake) 1gb of ram cache per VM, that RAM is locked into that VM and if another machine spills, the free RAM in other desktops is wasted.</p>
<p>You would be completely insane not to reserve this RAM per VM, if an over-commit for the VM&#8217;s is reached this RAM will merely spill out to a page file type arrangement, negating <strong>all</strong> your benefits.</p>
<p>Ultimately, assigning RAM in this way could be seen as wasteful in the grand scheme of things&#8230;</p>
<p><span style="text-decoration:underline;"><strong>But there are other ways to <a href="http://www.worldwidewords.org/qa/qa-mor1.htm" target="_blank">skin this cat</a>!</strong></span></p>
<p>So this leads me on to something I was also considering which popped up in a twitter conversation recently. <strong>RAM disk&#8217;s and Hypervisors</strong>.</p>
<p>Current storage vendors will create a storage pool, consisting of ram inside a VM, per hosting hypervisor for local storage to allow good IOPS leveraging that VM. This VM can perform additional RAM optimizations like compression, de-duplication and sharing of similar pages to reduce the count.</p>
<p>This approach is super clever, <em>but</em>, In my humble opinion (please don&#8217;t kill me vendors), this approach is wasteful. Running a VM as a storage repository per host has an overhead to run this virtual machine and takes away from the agnostic solution that is possible&#8230;</p>
<p style="text-align:center;"><strong><em>What If the hypervisor provides the RAM disk?</em></strong></p>
<p style="text-align:left;">So excluding ESXi for a second, as getting a RAM disk into that platform would require VMware to allow access to the stack. Lets look at Hyper-V (2012) and XenServer for a second&#8230;</p>
<p style="text-align:left;">With Unix and Windows platforms, <a href="http://en.wikipedia.org/wiki/List_of_RAM_drive_software" target="_blank">RAM disks have been available for years</a>. They were once a necessity and a number of vendors still provide them for high performance IO environments.</p>
<p style="text-align:left;">Lets say (for arguments sake) Citrix and Microsoft decide to provide a snap-in to their hypervisor to allow native RAM disks (or a vendor writes one themselves!) and maybe, they even decide to provide RAM compression, Spill over to local disk, dedupe, and page sharing on this volume from the hypervisor stack&#8230;</p>
<p style="text-align:left;">Wouldn&#8217;t this extend provide all the benefits we&#8217;ve spoken about, without the need for a VM per host? And using Thin Provisioning allow all desktops to share the large pool of RAMdisk available?</p>
<p style="text-align:center;"><em>Yes, yes, it would.</em></p>
<p style="text-align:left;"><a href="/wp-content/uploads/2012/10/ramdisklocalcopy.png"><img class="aligncenter size-full wp-image-2414" title="ramdisklocalcopy" alt="" src="/wp-content/uploads/2012/10/ramdisklocalcopy.png" height="411" width="595" /></a></p>
<p style="text-align:center;"><em>Above is an example of how I would see this working.</em></p>
<p style="text-align:left;">So random pictures are fine and all, but what about the read IOPS negation technologies? and what about combining these with XenServer or Hyper-V?</p>
<p style="text-align:left;"><strong>XenServer and IntelliCache:</strong></p>
<p style="text-align:left;"><a href="/wp-content/uploads/2012/10/mcsramdiskintellicache.png"><img class="aligncenter size-full wp-image-2415" title="mcsramdiskintellicache" alt="" src="/wp-content/uploads/2012/10/mcsramdiskintellicache.png" height="308" width="595" /></a></p>
<p style="text-align:left;">Well there you have it now, all the benefits of a per VM filter, leveraging intellicache for reads and spilling out to local disk&#8230; RESULT!</p>
<p style="text-align:left;"><strong>Pro&#8217;s:</strong></p>
<ul>
<li>Read IOPS negation</li>
<li>Write IOPS negation</li>
<li>No Shared Storage required for running VM&#8217;s</li>
<li>Shared pool of RAM for all desktop&#8217;s to use.</li>
</ul>
<p><strong>Con&#8217;s:</strong></p>
<ul>
<li>A small one, but no migration of VM&#8217;s.</li>
</ul>
<p><strong>Provisioning server?</strong></p>
<p><a href="/wp-content/uploads/2012/10/pvsramdisk1.png"><img class="aligncenter size-full wp-image-2418" title="pvsramdisk" alt="" src="/wp-content/uploads/2012/10/pvsramdisk1.png" height="385" width="595" /></a></p>
<p>and again, all the benefits of a per VM filter, reads redirected via lan and spilling out to local disk&#8230; RESULT!</p>
<p><strong>Pro&#8217;s:</strong></p>
<ul>
<li>Write IOPS negation</li>
<li>No Shared Storage required for running VM&#8217;s</li>
<li>Shared pool of RAM for all desktop&#8217;s to use.</li>
</ul>
<p><strong>Con&#8217;s:</strong></p>
<ul>
<li>A small one, but no migration of VM&#8217;s.</li>
<li>No real read IOPS negation.</li>
</ul>
<p style="text-align:left;"><strong>And HyperV + CSV Cache?</strong></p>
<p style="text-align:left;">Well here&#8217;s an accumulation of my thoughts:</p>
<p style="text-align:left;"><a href="/wp-content/uploads/2012/10/hypvcsv.png"><img class="aligncenter size-full wp-image-2416" title="hypvcsv" alt="" src="/wp-content/uploads/2012/10/hypvcsv.png" height="464" width="595" /></a></p>
<p style="text-align:left;">So lets just talk for a second about what we are seeing&#8230; Utilizing a RAM disk with spill over, and copied vhd&#8217;s on boot we are removing the need for shared storage completely and hosting the IOPS from the hypervisor, natively without the need for additional VM&#8217;s.</p>
<p style="text-align:left;">And see that little icon down the bottom? Yep, that&#8217;s right, live migration from host to host thanks to <a href="http://blogs.technet.com/b/uspartner_ts2team/archive/2012/07/23/shared-nothing-live-migration-on-windows-server-2012.aspx" target="_blank">Microsofts Shared Nothing Live Migration</a>!</p>
<p><strong>Pro&#8217;s:</strong></p>
<ul>
<li>Some write IOPS negation</li>
<li>No Shared Storage required for running VM&#8217;s</li>
<li>Liv migration.</li>
<li>Shared pool of RAM for all desktop&#8217;s to use.</li>
<li>write back to local disk.</li>
</ul>
<p><strong>Con&#8217;s:</strong></p>
<ul>
<li>No full read IOPS negation.</li>
</ul>
<p style="text-align:left;"><strong>Review.</strong></p>
<p style="text-align:left;">I&#8217;m sure there&#8217;s loads of reading in here, and there will be tons of thought and questions after this blog post. This has been in my head for roughly 9 months now and it feels victorious to finally get it all down on paper.</p>
<p style="text-align:left;">At the end of the day, Ram Caching is the way of the future, you pay no maintenance on it, you keep your IOPS off your storage and with a little magic from Microsoft, or particularly Citrix. You could see these benefits.</p>
<p style="text-align:left;">If / When these technologies make it out to you, you could quite happily stick with Machine Creation services, leverage intellicache and your shared storage requirement could be a cheap NAS from any vendor. Provisioning services also see&#8217;s allot of benefits from this approach, but the real creme de la creme is in that intellicache feature.</p>
<p style="text-align:left;">The key functionality to these approaches is simple:</p>
<ul>
<li>Cache RAM</li>
<li><strong>Spill to disk</strong></li>
<li>Keep the differences on local storage if it spills.</li>
</ul>
<p style="text-align:left;"><strong>One last thing?</strong></p>
<p style="text-align:left;">In true Mark Templeton fashion, you know I have a one last thing. This actually hit me today while writing this post and to be honest, I&#8217;m so amazed by the potential of this idea I&#8217;m going to build it in the lab this weekend.</p>
<p style="text-align:left;">But until then, a teaser&#8230;</p>
<p style="text-align:left;"><a href="/wp-content/uploads/2012/10/teaser.png"><img class="aligncenter size-full wp-image-2421" title="teaser" alt="" src="/wp-content/uploads/2012/10/teaser.png" height="317" width="595" /></a></p>
<p style="text-align:left;">What if I told you there was already an overlay, freely available baked into a Microsoft technology that would allow you to overlay local storage in Hyper-V with RAM. A powerful API attached to it, and the ability to write specific files to the local disk, subverting the overlay only when needed?</p>
<ul>
<li>RAM disk type technology? &gt; yep</li>
<li>already available? &gt; yep</li>
<li>Powerful API? &gt; yep</li>
<li>already can spill to disk? &gt; yep</li>
</ul>
<p style="text-align:left;"><strong>Yep Yep Yep!</strong> check back in a few days.</p>
<p style="text-align:left;"><em>(If you know what it is already, keep it to yourself until I&#8217;ve gotten out of the lab!)</em></p>
<p><strong>What do you think?</strong></p>
<p>It doesn&#8217;t take a half baked enthusiast like me to see this potential and I&#8217;d be really eager to hear your comments on these approaches. If you would prefer to keep your comments offline, you can reach me on andrew@andrewmorgan.ie.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2012/10/on-iops-shared-storage-and-a-fresh-idea-part-3-tying-it-all-together-in-the-stack/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Date and time shift when using Lotus Notes in Server 2008 R2 / XenApp</title>
		<link>http://andrewmorgan.ie/2012/08/date-and-time-shift-when-using-lotus-notes-in-server-2008-r2-xenapp/</link>
		<comments>http://andrewmorgan.ie/2012/08/date-and-time-shift-when-using-lotus-notes-in-server-2008-r2-xenapp/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 11:10:58 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[IBM Software]]></category>
		<category><![CDATA[Remote Desktop Services (RDS)]]></category>
		<category><![CDATA[Server Based Computing]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[XenApp]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Remote Desktop services]]></category>
		<category><![CDATA[xenapp]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=2184</guid>
		<description><![CDATA[This was an extremely strange / rare issue, so I figured I would share it. In this customers environment, they are using XenApp 6.5 on Server 2008 R2 for published desktops, this environment is a hosted desktop environment for a number of countries in Europe. Infrequently an issue could be observed where the users timezones would shift out by one or two hours within the Lotus Notes application. This would case SameTime conversations and Calendar times to display out by [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright" src="http://www-03.ibm.com/press/us/en/attachment/32540.wss?fileId=ATTACH_FILE0&amp;fileName=LotusNotes_icon_256.jpg" alt="" width="86" height="86" />This was an extremely strange / rare issue, so I figured I would share it.</p>
<p>In this customers environment, they are using XenApp 6.5 on Server 2008 R2 for published desktops, this environment is a hosted desktop environment for a number of countries in Europe.</p>
<p>Infrequently an issue could be observed where the users timezones would shift out by one or two hours within the Lotus Notes application. This would case SameTime conversations and Calendar times to display out by the aforementioned value above.</p>
<p>When this issue occurred, it happened to all users on the server. A restart of the server did not fix the issue.</p>
<p>Interestingly, a &#8220;<em>TZUtil /g</em>&#8221; was reporting the client was in the correct time zone:</p>
<p><img class="aligncenter size-full wp-image-2187" title="Snagit1" src="/wp-content/uploads/2012/08/snagit1.png" alt="" width="261" height="31" /></p>
<p>If you ran &#8220;<em>TZUtil /s GMT Standard Time</em>&#8220;, then closed and opened Lotus Notes&#8230; The problem was resolved for that user, in that session until they logged off.</p>
<p>It&#8217;s worth pointing out, that this issue was only seen in Lotus Notes, not in any other application, java or otherwise.</p>
<p>When comparing the TimeZone settings from a problematic server to a working server, I found the following difference:</p>
<p>These keys are stored under:</p>
<p>HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTimeZoneInformation</p>
<p><a href="/wp-content/uploads/2012/08/incorrecttimezone.gif"><img class="aligncenter size-full wp-image-2185" title="incorrecttimezone" src="/wp-content/uploads/2012/08/incorrecttimezone.gif" alt="" width="512" height="247" /></a></p>
<p>And the working server looked as follows:</p>
<p><a href="/wp-content/uploads/2012/08/correcttimezone.gif"><img class="aligncenter size-full wp-image-2186" title="correcttimezone" src="/wp-content/uploads/2012/08/correcttimezone.gif" alt="" width="567" height="257" /></a></p>
<p>&nbsp;</p>
<p>Now that is weird! So we copied the correct keys from the server to server and the issue was resolved. On all servers once users closed and opened Lotus Notes again.</p>
<p><strong>But what caused this?</strong></p>
<p>With a work around in place, I began to dig deeper into what caused the timezone to change on the servers despite the fact that no users have the ability to do so.</p>
<p>Analysing the logins to the servers, I spotted an administrator account logging into each of the servers as the day went by. This user didn&#8217;t log into the correctly working servers so this was the first clue.</p>
<p>Now if you&#8217;ve used Lotus Notes combined with XenApp and timezones before, you&#8217;ll know its a complete nightmare, interestingly the administrator in question (me, shamefully), was logging onto a XenApp session with a linux timezone to replicate an issue.</p>
<p>More embarrassingly, I then decided to Remote Desktop inside of the XenApp session to the affected servers, and with my admin account being who it was&#8230; inadvertently changed the timezone for the servers it seems.</p>
<p><strong>That doesn&#8217;t sound right? You rdp&#8217;d from a client in a different time zone and it changed the server timezone?</strong></p>
<p>I agree, but I have since been able to replicate this in a test environment. As with Server 2008 Microsoft now handle the timezone redirection themselves as part of group policy and administrative accounts will change the timezone of the server intermittently.</p>
<p>Now most customers probably wouldn&#8217;t even notice this, unless they are using lotus notes, as all other applications behaved correctly.</p>
<p><strong>How do you work around this issue?</strong></p>
<p>Ensure that the Group Policy you use to configure timezone redirection is configured to &#8220;not apply&#8221; to any local administrator on the XenApp server that may log in.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2012/08/date-and-time-shift-when-using-lotus-notes-in-server-2008-r2-xenapp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Batch installing type 1 fonts in Server 2008 R2 / Windows 7</title>
		<link>http://andrewmorgan.ie/2012/08/batch-installing-type-1-fonts-in-server-2008-r2-windows-7/</link>
		<comments>http://andrewmorgan.ie/2012/08/batch-installing-type-1-fonts-in-server-2008-r2-windows-7/#comments</comments>
		<pubDate>Mon, 13 Aug 2012 09:19:44 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[Server Based Computing]]></category>
		<category><![CDATA[Virtual Desktop Infrastructure]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=2154</guid>
		<description><![CDATA[This was such a massive pain, I sank way too much time into it so I figured I would share it. The font I was trying to install was needed by the customer, the font itself is called Helvetica light 45 as below: Previously when installing this in server 2003, I just used the tried and trusted script from the Scripting guys here and it went off without a hitch. But with windows vista and above interactive session detection foils [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="/wp-content/uploads/2012/08/font_book_icon.png"><img class="alignright size-full wp-image-2155" title="Font_Book_Icon" src="/wp-content/uploads/2012/08/font_book_icon-e1344502090858.png" alt="" width="50" height="50" /></a>This was such a massive pain, I sank way too much time into it so I figured I would share it. The font I was trying to install was needed by the customer, the font itself is called Helvetica light 45 as below:</p>
<p><a href="/wp-content/uploads/2012/08/font.png"><img class="aligncenter size-full wp-image-2159" title="font" src="/wp-content/uploads/2012/08/font.png" alt="" width="600" height="181" /></a></p>
<p>Previously when installing this in server 2003, I just used the tried and trusted script from the Scripting guys <a href="http://www.google.ie/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;ved=0CE0QFjAA&amp;url=http%3A%2F%2Fblogs.technet.com%2Fb%2Fheyscriptingguy%2Farchive%2F2008%2F04%2F25%2Fhow-can-i-install-fonts-using-a-script.aspx&amp;ei=XXkjUOfwO4yDhQe2moHgBQ&amp;usg=AFQjCNG4JkIIBTXWe9Hb94OiQ-tS1FVcmg">here</a> and it went off without a hitch. But with windows vista and above <a href="http://blogs.msdn.com/b/patricka/archive/2010/04/27/what-is-interactive-services-detection-and-why-is-it-blinking-at-me.aspx">interactive session detection</a> foils our lovely plans.</p>
<p>So moving on, what other options do we have? You could use:</p>
<ul>
<li><strong>The managed API AddFontResource</strong> (nope, type 1 fonts dont register the same way as typical fonts)</li>
<li><strong>Using Visual Studio to create an MSI:</strong> (nope, see above)</li>
<li><strong>Using a third party msi builder:</strong> (nope, see above)</li>
<li><strong>Copy the files from the fonts directory from one machine to another</strong> (nope, something is missing)</li>
</ul>
<p>So, after much hair pulling I hit a dead end.</p>
<p>I&#8217;ll spare you the details, but here&#8217;s an easy way to do it going forward:</p>
<ul>
<li>install the font on a test machine:</li>
<li>Open command prompt as an administrator and browse to c:windowsfonts</li>
<li>find the font files here and copy them out to a working directory</li>
</ul>
<p><img class="aligncenter size-full wp-image-2157" title="copy" src="/wp-content/uploads/2012/08/copy.png" alt="" width="450" height="61" /></p>
<ul>
<li>Open regedit and browse down to:</li>
</ul>
<p>hklm:softwaremicrosoftWindows NTCurrentVersiontype 1 installertype 1 Fonts:</p>
<p><a href="/wp-content/uploads/2012/08/registry.png"><img class="aligncenter size-full wp-image-2158" title="registry" src="/wp-content/uploads/2012/08/registry.png" alt="" width="600" height="186" /></a></p>
<ul>
<li>Export this key to your working directory:</li>
</ul>
<p><strong>Move to the target machine:</strong></p>
<ul>
<li>Copy the fonts from the working directory to the fonts folder as above.</li>
<li>Import the registry key.</li>
<li>Restart the machine.</li>
</ul>
<p>Tada!</p>
<p>If you know of an easier way to do this, be my guest to share it. But I dont want to look at a font file again for a very long time.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2012/08/batch-installing-type-1-fonts-in-server-2008-r2-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing ThreadLocker. A community tool for granular control of processes.</title>
		<link>http://andrewmorgan.ie/2012/05/introducing-threadlocker-a-community-tool-for-granular-control-of-processes/</link>
		<comments>http://andrewmorgan.ie/2012/05/introducing-threadlocker-a-community-tool-for-granular-control-of-processes/#comments</comments>
		<pubDate>Tue, 15 May 2012 12:47:06 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[Remote Desktop Services (RDS)]]></category>
		<category><![CDATA[Server Based Computing]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Virtual Desktop Infrastructure]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[XenApp]]></category>
		<category><![CDATA[XenDesktop]]></category>
		<category><![CDATA[Performance Tool]]></category>
		<category><![CDATA[Processor Clamping]]></category>
		<category><![CDATA[Remote Desktop services]]></category>
		<category><![CDATA[SBC]]></category>
		<category><![CDATA[VDI]]></category>
		<category><![CDATA[xenapp]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=1861</guid>
		<description><![CDATA[&#160; Throughout this blog post, I&#8217;m going to be talking about Process Affinity and Process Priority. Understanding these definitions will help. I&#8217;m also only targetting server 2008 R2 and Windows 7 for this post. An issue I see time and time again in Virtual Desktop Infrastructure and Server Based Computing environments is CPU spikes cause sessions to pause and stick. These CPU spikes can be caused by overcommitment or overzealous application usage and the vendors (Citrix, ThreadMaster, RES, Appsense, etc) have come to [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<p><img class="alignright wp-image-3267 size-thumbnail" src="http://andrewmorgan.ie/wp-content/uploads/2014/11/Threadlocker-150x150.jpg" alt="Threadlocker" width="150" height="150" />Throughout this blog post, I&#8217;m going to be talking about <a href="http://en.wikipedia.org/wiki/Processor_affinity" target="_blank">Process Affinity</a> and <a href="http://en.wikipedia.org/wiki/Scheduling_(computing)#Windows" target="_blank">Process Priority</a>. Understanding these definitions will help. I&#8217;m also only targetting server 2008 R2 and Windows 7 for this post.</p>
<p>An issue I see time and time again in Virtual Desktop Infrastructure and Server Based Computing environments is CPU spikes cause sessions to pause and stick. These CPU spikes can be caused by overcommitment or overzealous application usage and the vendors (Citrix, ThreadMaster, RES, Appsense, etc) have come to the rescue frequently with tools to reduce these events from occurring.</p>
<p>The problem with these solutions (Appsense excluded) is they are reactive, I.E. they take a number of seconds to identify a spike and respond by dropping the priority of the process or reducing the Users time on the processor.</p>
<p>These few seconds of high usage, reduce the amount of time the users applications and desktop session can spend on the processor, this reduction of resources cause the VDI desktop of the user to be completely unusable during the pause and ultimately resulting in complaining from the user community. Worse yet, if this is an SBC environment you now have all users on that server locked out!</p>
<p>And all this may sound a bit over the top, but its very easy to reproduce. For example, create a Microsoft Excel sheet and attempt to vlookup over a few thousand cells and watch the processor get chewed up. In this example, yes a vLookup across that many cells would be better served from a server based solution, <strong>but what&#8217;s stopping your users doing it</strong>?&#8230; Exactly.</p>
<p><strong>Looking at SBC for a second:</strong></p>
<p>With Server 2008 R2, the Fair Share CPU scheduling feature really is best (free) solution out there for CPU Utilisation management. The processor scheduling is far better than the Citrix equivalent and they also offer a feature (albeit, it feels unfinished) called Windows System Resource Manager to configure the processor affinity along with Process soft rules for performance management.</p>
<p>By setting these extremely intensive Multi-threaded applications to an affinity, we can &#8220;Lock&#8221; these processes to only run on certain processor cores, allowing the remaining cores to rebalance the rest of the workload. This ultimately, leaves the users session still responsive even if the application no longer responds. Allowing the user to continue working in other application until the intensive process is complete.</p>
<p><strong>The problem with Windows System Resource Manager?</strong></p>
<ul>
<li>It&#8217;s a pain to configure on more than one system</li>
<li>It requires (yeuck) Windows Internal Database</li>
<li>It has been marked as &#8220;Depreciated&#8221; in Server 2012</li>
<li>If a user changes affinity, Resource manager doesn&#8217;t re adjust.</li>
<li>It still suffers from &#8220;pauses&#8221; or sluggishness when the Cpu is really being hammered.</li>
</ul>
<div>So we&#8217;re back at the start again, Fair Share CPU scheduling is still the best free product, but how can we cap processes to cpu&#8217;s or drop the priority of a &#8220;Known Intensive&#8221; processes like Excel to stop these pauses?</div>
<div></div>
<div><strong>What about VDI:</strong></div>
<div>Well, there is nothing out there that&#8217;s free, move along.</div>
<div></div>
<div><strong>End result:</strong></div>
<p>This was my dillema recently with both XenApp &amp; Xendesktop. Ultimately not happy to Pay for a solution, embrace a depreciated tool, or wash my hands of the problem, I decided to write my own tool, complimenting fair share CPU scheduling but allowing affinity and priority locking.</p>
<p><strong>Introducing Threadlocker:</strong></p>
<p>ThreadLocker has been written to help you target known problematic processes and deal with them pro actively.</p>
<p>Threadlocker also has the added benefit of dropping the priority of known grunty processes to idle, meaning the process will use as much CPU as it can, but any other higher priority process can interupt without sluggishness or pauses.</p>
<p><img class="aligncenter size-full wp-image-1863" title="window" src="/wp-content/uploads/2012/05/window.png" alt="" width="545" height="451" /></p>
<p>With ThreadLocker you can target these processes and set their Affinity number of processors they can run on:</p>
<p><img class="aligncenter size-full wp-image-1865" title="affinity" src="/wp-content/uploads/2012/05/affinity.png" alt="" width="308" height="311" /></p>
<p>Or their Process Priority to drop them out of the normal running context:</p>
<p><img class="aligncenter size-full wp-image-1866" title="priority" src="/wp-content/uploads/2012/05/priority.png" alt="" width="600" height="35" /></p>
<ul>
<li>Threadlocker is light weight and scalable.</li>
<li>Threadlocker works flawlessly with Cpu Fair Share Scheduling, so even if a process is &#8220;ThreadLocked&#8221; the users running those applications will fair share on the designated cores.</li>
<li>Threadlockers configuration is xml based and can be copied down to the machine with Startup script or Group Policy preferences.</li>
<li>Threadlocker can be used in VDI environments where no other free solution is available.</li>
<li>Threadlocker will re-adjust priority, or affinity if the devious user tries to remove the restriction.</li>
</ul>
<div></div>
<p><strong>Threadlocker has been successfully tested on the following platforms:</strong></p>
<ul>
<li>XenApp 6.5</li>
<li>Windows Server 2008 R2 Service Pack 1</li>
<li>Windows 7 x64 Service Pack 1</li>
</ul>
<div><strong>Requirements:</strong></div>
<ul>
<li>Threadlocker Requires .Net Framework 3.5 sp1</li>
</ul>
<p><strong>Download:</strong></p>
<p><a href="http://andrewmorgan.ie/2015/09/threadlocker-2-0/" target="_blank">Here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2012/05/introducing-threadlocker-a-community-tool-for-granular-control-of-processes/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Changing the default shell of Windows Server 8 Core</title>
		<link>http://andrewmorgan.ie/2012/03/changing-the-default-shell-of-windows-server-8-core/</link>
		<comments>http://andrewmorgan.ie/2012/03/changing-the-default-shell-of-windows-server-8-core/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 12:05:55 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[PowerShell Scripting]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=1800</guid>
		<description><![CDATA[I have to admit, I&#8217;m a bit torn with Windows 8 in general. I&#8217;m absolutely in love with Windows Server 8&#8217;s new Powershell functions and management console, but despise the lack of a start menu. Luckily Powershell has gotten so powerful in Server 8, I hope to not spend much time in the Gui. Back on topic: By default when you install Windows Server 8 Core and log into the console, you get presented with a CMD prompt&#8230; Weird eh? [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright" src="/wp-content/uploads/2012/03/beta-e1331990113658.jpg?w=600" alt="" width="74" height="62" /></p>
<p>I have to admit, I&#8217;m a bit torn with Windows 8 in general. I&#8217;m absolutely in love with Windows Server 8&#8217;s new Powershell functions and management console, but despise the lack of a start menu. Luckily Powershell has gotten so powerful in Server 8, I hope to not spend much time in the Gui.</p>
<p><strong>Back on topic:</strong> By default when you install Windows Server 8 Core and log into the console, you get presented with a CMD prompt&#8230; Weird eh?</p>
<p><img class="aligncenter size-full wp-image-1801" title="cmd" src="/wp-content/uploads/2012/03/cmd.png" alt="" width="600" height="313" /></p>
<p>Now most administrators will simply type powershell and perform their tasks, but I personally feel this is the wrong way around. Powershell should launch first, and if cmd is really needed you could call it inside of powershell!</p>
<p>Being the pedantic individual that I am, I set about changing Server Core to auto-load powershell on login. This was quite an easy task and I&#8217;ve documented it below for other users to follow if they wish:</p>
<p>The shell in Windows Server 8 is configured under the following key:</p>
<p>HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogonAlternateShellsAvailableShells</p>
<p>Under this key, on Server 8 Core, you will see the following entry:</p>
<p><a href="/wp-content/uploads/2012/03/defaultshell.png"><img class="aligncenter size-full wp-image-1802" title="defaultshell" src="/wp-content/uploads/2012/03/defaultshell.png" alt="" width="600" height="81" /></a></p>
<p>And that&#8217;s where our CMD is coming from! This is another one of these blasted<strong> TrustedInstalle</strong>r Keys. <strong>So if you want to change it, you&#8217;ll need to take owership of the key, then assign full control to your user account.</strong></p>
<p>So the first thing I did was create a value lower than 30000 and assign it to powershell, but this <strong>didnt</strong> work.</p>
<p>Unusually here the weighting system is highest wins, rather than lowest which is a little counter intuitive, but I digress.</p>
<p>I added a new key 90000 (i&#8217;ll explain this later) and entered the path to powershell as below:</p>
<p><a href="/wp-content/uploads/2012/03/powershell.png"><img class="aligncenter size-full wp-image-1803" title="powershell" src="/wp-content/uploads/2012/03/powershell.png" alt="" width="600" height="126" /></a></p>
<p>Now Once I restarted, Powershell is the automatic shell of choice:</p>
<p><a href="/wp-content/uploads/2012/03/end-result.png"><img class="aligncenter size-full wp-image-1804" title="end result" src="/wp-content/uploads/2012/03/end-result.png" alt="" width="600" height="326" /></a></p>
<p><strong>Bonus 1: Why 90000?</strong></p>
<p>Well if you look at a Server 8 Gui server, you&#8217;ll notice that Explorer.exe wins the selection by being 60000:</p>
<p><a href="/wp-content/uploads/2012/03/gui.png"><img class="aligncenter size-full wp-image-1805" title="gui" src="/wp-content/uploads/2012/03/gui.png" alt="" width="600" height="400" /></a></p>
<p>So I added another 30000 and bob&#8217;s your uncle.</p>
<p>If you asked yourself, &#8220;<em>hmmm, could i also do this on windows server 8 where the gui is installed?</em>&#8221; <strong>the answer is yes.</strong></p>
<p>And if you asked yourself  &#8220;<em>hmmm, could I also do this on Windows 8?</em>&#8221; <strong>the answer is no.</strong></p>
<p>And if you also asked yourself &#8220;<em>hmmm, could i assign these in a users key instead of local machine?</em>&#8221; <strong>the answer is no.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2012/03/changing-the-default-shell-of-windows-server-8-core/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Disable the Windows Firewall in Server 8 Beta, with Powershell</title>
		<link>http://andrewmorgan.ie/2012/03/disable-the-windows-firewall-in-server-8-beta-with-powershell/</link>
		<comments>http://andrewmorgan.ie/2012/03/disable-the-windows-firewall-in-server-8-beta-with-powershell/#comments</comments>
		<pubDate>Sat, 17 Mar 2012 14:08:57 +0000</pubDate>
		<dc:creator><![CDATA[andyjmorgan]]></dc:creator>
				<category><![CDATA[PowerShell Scripting]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[NetSecurity]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows Server 8 Beta]]></category>

		<guid isPermaLink="false">http://andrewmorgan.ie/?p=1729</guid>
		<description><![CDATA[(Note: this will also work with Windows 8 Consumer Preview) While troubleshooting an issue in windows server 8&#8217;s new Powershell Web Access, I had the need to disable the windows firewall. Normally I would use a &#8220;netsh firewall&#8221; command, but when running this in windows server 8 we receive the notification: &#8220;In future versions of Windows, Microsoft might remove the Netsh Functionality for windows firewall with Advanced Security&#8221; &#8220;If you currently use Netsh firewall to configure and manage Windows Firewall [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="/wp-content/uploads/2012/03/beta.jpg"><img class="alignright size-full wp-image-1730" title="Beta" src="/wp-content/uploads/2012/03/beta-e1331990113658.jpg" alt="" width="74" height="62" /></a></p>
<p>(<strong>Note:</strong> this will also work with Windows 8 Consumer Preview)</p>
<p>While troubleshooting an issue in windows server 8&#8217;s new Powershell Web Access, I had the need to disable the windows firewall. Normally I would use a &#8220;netsh firewall&#8221; command, but when running this in windows server 8 we receive the notification:</p>
<p><em>&#8220;In future versions of Windows, Microsoft might remove the Netsh Functionality for windows firewall with Advanced Security&#8221;</em></p>
<p><em>&#8220;If you currently use Netsh firewall to configure and manage Windows Firewall with advanced Security, Microsoft recommends that you transition to Windows Powershell.&#8221;</em></p>
<p>This message continues in the screenshot below:<br />
<code><br />
</code><br />
<a href="/wp-content/uploads/2012/03/warning.png"><img class="wp-image-1731 aligncenter" title="warning" src="/wp-content/uploads/2012/03/warning.png" alt="" width="600" height="147" /></a><br />
<code><br />
</code><br />
So with the warning in mind, I decided it was time to learn the new thing for the day and off I went to find out how to quickly disable the firewall using powershell!</p>
<p>As above the first clue is in the message, a new module seems to be available on both Windows 8 and Server 8. So with a quick <strong>get-module -listavailable</strong> I can see netsecurity listed:<br />
<code><br />
</code><br />
<a href="/wp-content/uploads/2012/03/net-security.png"><img class="aligncenter size-full wp-image-1732" title="net security" src="/wp-content/uploads/2012/03/net-security.png" alt="" width="600" height="305" /></a><br />
<code><br />
</code><br />
&#8220;So what commands can I use with the netsecurity module&#8221; I asked myself. I ran a quick &#8220;<strong>Get-Command -module NetSecurity</strong>&#8221; and was overwhelmed with a large list of potential candidates as below:<br />
<code><br />
</code><br />
<a href="/wp-content/uploads/2012/03/firewall-profile.png"><img class="aligncenter  wp-image-1733" title="firewall profile" src="/wp-content/uploads/2012/03/firewall-profile.png" alt="" width="600" height="281" /></a><br />
<code><br />
</code><br />
So I used the trusted &#8220;Import-Module NetSecurity&#8221; command and set about reading the help files. Or so I thought&#8230;<br />
<code><br />
</code><br />
<a href="/wp-content/uploads/2012/03/help.png"><img class="aligncenter size-full wp-image-1734" title="help" src="/wp-content/uploads/2012/03/help.png" alt="" width="600" height="44" /></a><br />
<code><br />
</code><br />
As with PowerShell 3.0, the helpfiles for Powershell are not completely installed by default, we need to run update-help to download the powershell help files. This is causing quite a debate in the powershell community, so I&#8217;m not going to get into this, personally I think its a good idea.</p>
<p>Anyway, so off I went to update the help, <em>or so I thought</em>:<br />
<code><br />
</code><br />
<a href="/wp-content/uploads/2012/03/error1.png"><img class="aligncenter size-full wp-image-1735" title="error1" src="/wp-content/uploads/2012/03/error1.png" alt="" width="600" height="105" /></a><br />
<code><br />
</code><br />
<em>Bugger&#8230;</em></p>
<p>I&#8217;ll admit, this list had me scratching my head for some time, but I soon enough stumbled across the important command on this list for my objective. &#8220;<strong>Get-NetFirewallProfile&#8221;</strong>.</p>
<p>Get-NetFirewallProfile lists out the firewall profiles for your machine. The profiles are separated out into Domain, Public and Private as you can see in the screen-shot below:<br />
<code><br />
</code><br />
<a href="/wp-content/uploads/2012/03/crossreference.png"><img class="aligncenter size-full wp-image-1736" title="crossreference" src="/wp-content/uploads/2012/03/crossreference.png" alt="" width="600" height="364" /></a><br />
<code><br />
</code><br />
Now that we&#8217;re aware of where the profiles live, its just a simple task of piping the current profiles, into a &#8220;<strong>Set-NetFirewallProfile</strong>&#8221; command to turn the profiles off.</p>
<p>Below is a quick on-liner to disable the windows firewall in Server 8 or Windows 8 completely:<br />
<code><br />
</code></p>
<p>[sourcecode language=&#8221;powershell&#8221;]<br />
Import-Module NetSecurity -ea Stop ; Get-NetFirewallProfile | Set-NetfirewallProfile -Enabled False<br />
[/sourcecode]</p>
<p><code><br />
</code><br />
And that&#8217;s it!<br />
<code><br />
</code><br />
<a href="/wp-content/uploads/2012/03/result.png"><img class="aligncenter size-full wp-image-1741" title="result" src="/wp-content/uploads/2012/03/result.png" alt="" width="600" height="313" /></a><br />
<code><br />
</code><br />
And once finished troubleshooting, you can turn it back on as below:<br />
<code><br />
</code></p>
<p>[sourcecode language=&#8221;powershell&#8221;]<br />
Import-Module NetSecurity -ea Stop ; Get-NetFirewallProfile | Set-NetfirewallProfile -Enabled True<br />
[/sourcecode]</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewmorgan.ie/2012/03/disable-the-windows-firewall-in-server-8-beta-with-powershell/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
