<?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>Jonathan Medd&#039;s Blog &#187; citrix</title>
	<atom:link href="http://www.jonathanmedd.net/category/citrix/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jonathanmedd.net</link>
	<description>Scripting. Powershell, VMware, Windows, Active Directory &#38; Exchange. All that kind of stuff.....</description>
	<lastBuildDate>Wed, 21 Jul 2010 12:41:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Virtualising Citrix on VMware</title>
		<link>http://www.jonathanmedd.net/2009/06/virtualising-citrix-on-vmware.html</link>
		<comments>http://www.jonathanmedd.net/2009/06/virtualising-citrix-on-vmware.html#comments</comments>
		<pubDate>Tue, 23 Jun 2009 11:56:41 +0000</pubDate>
		<dc:creator>Jonathan Medd</dc:creator>
				<category><![CDATA[citrix]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.jonathanmedd.net/?p=141</guid>
		<description><![CDATA[I was lucky enough to take on a project initially started and blogged about by my co-host on the Get-Scripting podcast Alan Renouf.
In summary, his posts were mainly around the design decision of whether to go for VM&#8217;s with one or two vCPU&#8217;s and how many Citrix users you could support per VM.  Following on [...]]]></description>
			<content:encoded><![CDATA[<p>I was lucky enough to take on a project initially started and<a href="http://www.virtu-al.net/2008/11/29/citrix-on-vmware-1vcpu-or-2vcpu/" target="_blank"> blogged about</a> by my co-host on the <a href="http://get-scripting.blogspot.com" target="_blank">Get-Scripting podcast</a> Alan Renouf.</p>
<p>In summary, his posts were mainly around the design decision of whether to go for VM&#8217;s with one or two vCPU&#8217;s and how many Citrix users you could support per VM.  Following on from his initial testing using Citrix Edgesight we ran a pilot with a few different scenarios and it turned out that the best performance with the highest number of Citrix users per VM came out to be a VM with 2 x vCPU&#8217;s; a conclusion which didn&#8217;t really match the initial testing, I guess you can&#8217;t beat real users doing real work and the sometimes crazy things they get up to pushing the boundries of performance.</p>
<p>A number of other decisions were also made at this time, most of which contributed to other significant cost savings on top of those we were going to achieve simply by reducing the number of physical boxes used to host the Citrix environment.</p>
<p>Something else which came out of the pilot was a decision to store the VM&#8217;s on local storage not SAN. Whilst this obviously reduces the flexibility offered by a virtualisation solution with shared storage, which gives options like VMotion, DRS etc, the cost savings gained by using local storage were very significant. Not only did we have none of the charges associated with SAN storage (fibre cards, cabling, switch ports, SAN disk) we could deploy the hosts with ESX Foundation licenses. From a redundancy and maintenance point of view we designed it so that we could afford to lose more than one host for a period of time and still have enough capacity to provide a good service.</p>
<p>We deployed four VM&#8217;s per ESX host, i.e. 8 cores available to 8 x vCPU&#8217;s. (Note: I have recently read Duncan Epping&#8217;s post around <a href="http://www.yellow-bricks.com/2009/04/28/cpu-affinity/" target="_blank">how many cores you should specify when using CPU affinity</a>. It makes for interesting reading, thankfully we are not currently seeing any issues around what might arise from this)</p>
<p>During the pilot and the early part of the rollout we found we were able to happily achieve around 45 users per VM, i.e. up to 180 per ESX host with CPU levels on the host comfortably averaging below the 75% mark. As the rollout progressed and we retired the physical Citrix boxes the levels attracted by each VM were more typically around the 40 users mark, i.e. approx 160 users per physical host.</p>
<p>This was because we were able to replace three physical Citrix boxes with one ESX host containing four Citrix VM&#8217;s, so a 3 &#8211; 1 reduction physical, but a 25% increase in the number of Citrix servers which obviously means you naturally attaract less users per Citrix server with a consistent number of users.  However, since we deployed 2 x vCPU machines it also meant cost savings with half the required Windows VM&#8217;s over the original plan to deploy 1x vCPU VM&#8217;s which would have meant eight Citrix VM&#8217;s per host.</p>
<p>One issue we did experience was that of vCPU peaks from rogue user processes which would hog all the CPU for significant periods of time and give a bad experience to other users on that VM. This was believed to happen previously in the physical Citrix deployemnt, but was more easily masked by the availability of physical cores. Most typically these processes would be Internet Explorer, quite often accessing Flash based content. To mitigate this issue we used some application threading software on each VM to set maximum levels for CPU usage per user process. This performed very well by limiting these processes to a certain amount of vCPU and consequently not impacting other Citrix users&#8217; performance &#8211; the decision to use 2 x vCPU&#8217;s in a VM helped here too, the 1x vCPU VM&#8217;s in the pilot really suffered with this problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonathanmedd.net/2009/06/virtualising-citrix-on-vmware.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Counting the Number of Sessions Per Citrix Server</title>
		<link>http://www.jonathanmedd.net/2009/03/counting-the-number-of-sessions-per-citrix-server.html</link>
		<comments>http://www.jonathanmedd.net/2009/03/counting-the-number-of-sessions-per-citrix-server.html#comments</comments>
		<pubDate>Wed, 04 Mar 2009 22:39:00 +0000</pubDate>
		<dc:creator>Jonathan Medd</dc:creator>
				<category><![CDATA[citrix]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://jonathanmedd.wordpress.com/2009/03/04/counting-the-number-of-sessions-per-citrix-server/</guid>
		<description><![CDATA[Whilst monitoring some newly provisioned Citrix servers running on VMware hosts today, I soon became very bored with manually checking how many sessions were on each Citrix VM as the load on each one increased, whilst trying to get it to the optimum level.
I knew it was possible to use Powershell to connect with Citrix [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst monitoring some newly provisioned Citrix servers running on VMware hosts today, I soon became very bored with manually checking how many sessions were on each Citrix VM as the load on each one increased, whilst trying to get it to the optimum level.</p>
<p>I knew it was possible to use Powershell to connect with Citrix servers, but had never really looked into it before. Not surprisingly it turned out to be very straightforward.</p>
<p>By using some technology known as <a href="http://community.citrix.com/blogs/citrite/vishalg/2008/05/01/The+ultimate+guide+to+Citrix+MFCOM+SDK">MFCom</a> we can connect with the Citrix farm and get some cool information out.</p>
<p>In the below example we create a new com object using MFCom, then initialise the connection. We are then able to access some methods and properties of that object. In this case we are looking at the Sessions property, we group all of the results by ServerName and then produce some output with the name and number of sessions on that Citrix box.</p>
<pre><span style="color:#800080;">$farm</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">New-Object</span><span style="color:#000000;"> -com </span><span style="color:#800000;">"</span><span style="color:#800000;">MetaframeCOM.MetaframeFarm</span><span style="color:#800000;">"</span><span style="color:#800080;">$farm</span><span style="color:#000000;">.Initialize(</span><span style="color:#000000;">1</span><span style="color:#000000;">)</span><span style="color:#800080;">$farm</span><span style="color:#000000;">.Sessions </span><span style="color:#000000;">| </span><span style="color:#5f9ea0;font-weight:bold;">Group-Object</span><span style="color:#000000;"> </span><span style="color:#800000;">ServerName</span><span style="color:#000000;"> | </span><span style="color:#5f9ea0;font-weight:bold;">Sort-Object</span><span style="color:#000000;"> </span><span style="color:#800000;">name</span><span style="color:#000000;"> | </span><span style="color:#5f9ea0;font-weight:bold;">Format-Table</span><span style="color:#000000;"> </span><span style="color:#800000;">Name</span><span style="color:#000000;">,</span><span style="color:#800000;">Count</span><span style="color:#000000;"> -auto</span></pre>
<p>which will give you something like:</p>
<p>Name                                             Count</p>
<p>CitrixServer01            38<br />
CitrixServer02            45<br />
CitrixServer03            41</p>
<p>This would return all of the servers in the farm. In this particular instance I only wanted a particular selection of servers, so I stored them in a text file, got PS to read that file and then filter the query by only looking at servers in that list.</p>
<pre><span style="color:#800080;">$servers</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">Get-Content</span><span style="color:#000000;"> </span><span style="color:#800000;">c:\scripts\servers.txt</span><span style="color:#000000;">

</span><span style="color:#800080;">$farm</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">New-Object</span><span style="color:#000000;"> -com </span><span style="color:#800000;">"</span><span style="color:#800000;">MetaframeCOM.MetaframeFarm</span><span style="color:#800000;">"</span><span style="color:#800080;">$farm</span><span style="color:#000000;">.Initialize(</span><span style="color:#000000;">1</span><span style="color:#000000;">)</span><span style="color:#800080;">$farm</span><span style="color:#000000;">.sessions | </span><span style="color:#5f9ea0;font-weight:bold;">Where-Object</span><span style="color:#000000;"> {</span><span style="color:#800080;">$servers</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-contains</span><span style="color:#000000;"> </span><span style="color:#000080;">$_</span><span style="color:#000000;">.ServerName} | </span><span style="color:#5f9ea0;font-weight:bold;">Group-Object</span><span style="color:#000000;"> </span><span style="color:#800000;">ServerName</span><span style="color:#000000;"> | </span><span style="color:#5f9ea0;font-weight:bold;">Sort-Object</span><span style="color:#000000;"> </span><span style="color:#800000;">name</span><span style="color:#000000;"> | </span><span style="color:#5f9ea0;font-weight:bold;">Format-Table</span><span style="color:#000000;"> </span><span style="color:#800000;">Name</span><span style="color:#000000;">,</span><span style="color:#800000;">Count</span><span style="color:#000000;"> -auto</span></pre>
<p>Once again Powershell very easily gets rid of a really dull manual task.</p>
<p>If you wish to take this a step further check out Powershell MVP Brandon Shell&#8217;s blog where he has loads of Powershell / Citrix examples.</p>
<p><a href="http://bsonposh.com/archives/tag/citrix">http://bsonposh.com/archives/tag/citrix</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonathanmedd.net/2009/03/counting-the-number-of-sessions-per-citrix-server.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
