{"id":73,"date":"2014-01-10T22:20:55","date_gmt":"2014-01-10T20:20:55","guid":{"rendered":"http:\/\/blog.appcloud.ch\/?p=73"},"modified":"2017-03-12T10:20:03","modified_gmt":"2017-03-12T09:20:03","slug":"achieve-fastest-citrix-provisioning-target-device","status":"publish","type":"post","link":"https:\/\/blog.sachathomet.ch\/de\/2014\/01\/10\/achieve-fastest-citrix-provisioning-target-device\/","title":{"rendered":"Achieve fastest Citrix Provisioning Target Device"},"content":{"rendered":"<p>Citrix Provisioning Services is in my point of view an\u00a0incomparable way to deliver a Software image to a \u00a0system. It&#8217;s not a kind of an known enterprise software deployment, rather it&#8217;s a way to stream a virtual disk during runtime to hardware. Beside of PVS, the acronym of Provisioning Services.<\/p>\n<p>This article doesn&#8217;t explain what&#8217;s PVS and how it works. It only shows my personal best practice to have the fastest PVS target device. It&#8217;s maybe not the only one and right solution to work with PVS, e.g. for VDI other approaches would match better. \u00a0In the last couple of years I was working on multiple projects to introduce PVS OS streaming for XenApp servers on physical hardware or virtualized servers. The following instruction shows my way to deliver the fastest PVS Target for read-only XenApp servers, or in the XenApp replacement this \u00a0role is \u00a0Xen Desktop 7.x \u00a0App Edition called .<\/p>\n<p>In this article I only mention performance relevant topics, I will not talk about HA, continuous availability or about PXE, TFTP and so on.<\/p>\n<p><strong>#1. Reduce reads from disk, make use of\u00a0Standby Memory for vDisks<\/strong><\/p>\n<p>The best way to increase performance is to reduce work, in this \u00a0first step it&#8217;s to reduce the hard disk read by reading virtual hard disk files (VHD&#8217;s). This can be achieved by make use of the Windows disk cache, this approach is possible on physical PVS servers and as well on virtualized PVS servers on any hypervisor.\u00a0Using the Windows disk cache means that files which are read from disk, are cached in Standby memory of the Server.<br \/>\n(If you are using XenServer as hypervisor have a look to the IntelliCache feature,\u00a0http:\/\/blog.citrix24.com\/how-does-intellicache-work. )<\/p>\n<p>To make use of the file cache you need:<\/p>\n<ul>\n<li>The vDisk on <span style=\"text-decoration: underline;\">local<\/span> drives, no CIFS share, no NFS share.<\/li>\n<li>A plenty of memory to the PVS.<\/li>\n<\/ul>\n<p>Having the vDisk&#8217;s on local disks is not the common way to work with PVS, keep in mind that you have to synchronize the files on all servers in PVS farm.<\/p>\n<p>You can check if the file cache is used properly by having a look in the resource\u00a0manager. If you have nearly no free memory and have a lot of use standby memory it&#8217;s a good sign:<\/p>\n<p><a href=\"http:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/ressourcemgr.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77\" src=\"http:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/ressourcemgr.png\" alt=\"ressourcemgr\" width=\"698\" height=\"438\" srcset=\"https:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/ressourcemgr.png 698w, https:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/ressourcemgr-300x188.png 300w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/a><\/p>\n<p>To have a deep dive look in the cache use RamMap and keep an eye to File Summary:<\/p>\n<p><a href=\"http:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/rammap-vhd.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-76\" src=\"http:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/rammap-vhd.png\" alt=\"rammap-vhd\" width=\"774\" height=\"206\" srcset=\"https:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/rammap-vhd.png 774w, https:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/rammap-vhd-300x80.png 300w, https:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/rammap-vhd-768x204.png 768w\" sizes=\"auto, (max-width: 774px) 100vw, 774px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>#2. Use Target Device Write Cache on Ram<\/strong><\/p>\n<p>The second second way to increase performance is to use fastest possible storage, hard disk drives are quite\u00a0fast today, solid state disks are faster but Ram is still the fastest memory. Because we need on the Target device only the Write Cache it doesn&#8217;t matter that the Ram is a transient memory.<\/p>\n<p><strong>A short performance comparison:<\/strong><\/p>\n<p><span style=\"line-height: 1.5em;\">With AS SSD Benchmark you can measure the speed of your disk. <\/span><\/p>\n<p><span style=\"text-decoration: underline; line-height: 1.5em;\">Target Device with WriteCache on Ram:<br \/>\n<\/span><a style=\"line-height: 1.5em;\" href=\"http:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/assd_benchmark_CacheRam.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-78\" src=\"http:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/assd_benchmark_CacheRam.png\" alt=\"assd_benchmark_CacheRam\" width=\"502\" height=\"498\" srcset=\"https:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/assd_benchmark_CacheRam.png 502w, https:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/assd_benchmark_CacheRam-150x150.png 150w, https:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/assd_benchmark_CacheRam-300x298.png 300w, https:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/assd_benchmark_CacheRam-100x100.png 100w\" sizes=\"auto, (max-width: 502px) 100vw, 502px\" \/><\/a><\/p>\n<p><span style=\"text-decoration: underline;\">Target Device with WriteCache on local disk:<\/span><br \/>\n<a style=\"line-height: 1.5em;\" href=\"http:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/assd_benchmark_Cache_TargetDisk.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-79\" src=\"http:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/assd_benchmark_Cache_TargetDisk.png\" alt=\"assd_benchmark_Cache_TargetDisk\" width=\"491\" height=\"249\" srcset=\"https:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/assd_benchmark_Cache_TargetDisk.png 491w, https:\/\/blog.sachathomet.ch\/wp-content\/uploads\/2014\/01\/assd_benchmark_Cache_TargetDisk-300x152.png 300w\" sizes=\"auto, (max-width: 491px) 100vw, 491px\" \/><\/a><\/p>\n<p>( AS SSD Benchmark is Freeware and you can download and donate on:\u00a0<a href=\"http:\/\/www.alex-is.de\/PHP\/fusion\/downloads.php?cat_id=4&amp;download_id=9\">http:\/\/www.alex-is.de\/PHP\/fusion\/downloads.php?cat_id=4&amp;download_id=9<\/a>\u00a0)<\/p>\n<p><strong style=\"line-height: 1.5em;\">Keep in sight the Memory<\/strong><\/p>\n<p><span style=\"line-height: 1.5em;\">When you working with Write Cache in the Target device Ram you must \u00a0appreciate the dangers of it &#8230; If you are running out of WriteCache the Target Device, perhaps a XenApp server with 50 users on it, will reboot\u00a0<\/span>immediately<span style=\"line-height: 1.5em;\">\u00a0.<br \/>\n(By the way &#8230; \u00a0Citrix Provisioning Services 7.1 offers a great new feature, it&#8217;s the possibility to Cache to Ram with overflow to hard disk. Do not use it &#8230; it doesent work proper! Waiting for a hotfix.)<\/span><\/p>\n<ul>\n<li>Plan the amount of real used Memory:Think how much of the Ram you will use for WriteCache, give as much as possible and consider the real memory usage of a fully loaded server. e.g. if you have a XenApp server as Target device with 16GB of Memory you can allocate 6GB for WriteCache and have still 10GB Memory for the XenApp servers. If you have special memory hungry application on the server you need maybe an other\u00a0segmentation. It doesn&#8217;t exists a recipe, have a look on your currently productive servers about the used memory.<\/li>\n<\/ul>\n<ul>\n<li>Reboot your Target device\u00a0periodically to reset the used cache.<\/li>\n<\/ul>\n<ul>\n<li>Reduce usage of Write Cache by redirecting as much as possible to an other disk drive, of course this is only possible if you still have a local disk attached to the Target Device.Good candidates to redirect are:\n<ul>\n<li>Printer Spooler<\/li>\n<li>Pagefile<\/li>\n<li>EventLog<\/li>\n<li>EdgeSight database<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>Monitor your Write Cache, \u00a0a way to do this is e.g. using this small Powershell script on the PVS server with a scheduled task:<br \/>\n<span style=\"color: #ff0000;\">(If you have PVS 7.1<span style=\"text-decoration: underline;\"> with the newest Hotfixes<\/span> I recommend to use WriteCache on Ram with overflow to hard disk)<\/span><\/li>\n<\/ul>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\n#========================================================================\r\n# Created on: 09.01.2014\r\n# Created by: Sacha T. blog.sachathomet.ch\r\n# Filename: Citrix-PVS-Get-Targetdevice-WriteCacheSize.ps1\r\n#\r\n# Descritpion: This script query the used write cache of the PVS farm\r\n# connected target devices and write an event log entry if\r\n# a target device exceed a definec % value of cache.\r\n#\r\n# Prerequisite: Script must run on a PVS server, where MCLI snap-in is registered.\r\n#\r\n# Register SnapIn with command: C:\\WINDOWS\\Microsoft.NET\\Framework64\r\n# \\v2.0.50727\\InstallUtil.exe 'C:\\Program Files\\Citrix\\Provisioning S\r\n# ervices Console\\McliPSSnapIn.dll'\r\n#\r\n# Call by : Scheduled Task all e.g. all 5 min.\r\n#\r\n#========================================================================\r\n$thresholdInformation=55 # define the Threshold in %\r\n$thresholdWarning=70 # define the Threshold in %\r\nAdd-PSSnapin -Name McliPSSnapIn -ErrorAction SilentlyContinue\r\n$pvsdevices = mcli-get device -f deviceName | Select-String deviceName\r\nforeach($target in $pvsdevices)\r\n{\r\n $target | Select-String deviceName\r\n $_targetshort = $target -replace &amp;quot;deviceName: &amp;quot;,&amp;quot;&amp;quot;\r\n\r\n mcli-get deviceinfo -p devicename=$_targetshort -f status\r\n\r\n $devicestatus = mcli-get deviceinfo -p devicename=$_targetshort -f status\r\nif ($devicestatus&#x5B;4].TrimStart(&amp;quot;status: &amp;quot;) -replace &amp;quot;,&amp;quot;,&amp;quot;.&amp;quot; -gt $thresholdWarning)\r\n{Write-Host &amp;quot;WARNING: The Write Cache of the PVS-Target device $_targetshort exceeded $thresholdWarning %! Intervention is needed&amp;quot; -foregroundcolor &amp;quot;red&amp;quot;\r\n#do here what you need, email, eventlog etc ...\r\n write-eventlog -logname Application -source StreamProcess -eventID 3001 -entrytype Warning -message &amp;quot;A PVS target device, $_targetshort, exceeded the threshold ($thresholdWarning %) !&amp;quot; -category 1 -rawdata 10,20\r\n }\r\n\r\n elseif ($devicestatus&#x5B;4].TrimStart(&amp;quot;status: &amp;quot;) -replace &amp;quot;,&amp;quot;,&amp;quot;.&amp;quot; -gt $thresholdInformation)\r\n{Write-Host &amp;quot;INFORMATION: The Write Cache of the PVS-Target device $_targetshort exceeded $thresholdInformation %! &amp;quot; -foregroundcolor &amp;quot;yellow&amp;quot;\r\n#do here what you need, email, eventlog etc ...\r\n write-eventlog -logname Application -source StreamProcess -eventID 3001 -entrytype Information -message &amp;quot;A PVS target device, $_targetshort, exceeded the threshold ($thresholdInformation %) !&amp;quot; -category 1 -rawdata 10,20\r\n }<\/pre>\n<p><strong>#3. Avoid if possible cross Data centre streaming\u00a0<\/strong><\/p>\n<ul>\n<li>If you have different subnet&#8217;s, make use of subnet affinity in the load balancing configuration on the vDisk.<\/li>\n<li>If you have one subnet over more data centres, create a store with the vDisk for each data centre and let only provide servers from the\u00a0corresponding data centre this store. With this way you can still switch fast to a cross data centre configuration in a case of a PVS server outage in a data centre.<\/li>\n<li><\/li>\n<\/ul>\n<p><strong>4#. Use all exiting best practice guides for tuning:<br \/>\n(for all what I&#8217;ve forget here &#8230; )<\/strong><\/p>\n<p>e.g. : <a href=\"http:\/\/blogs.citrix.com\/2010\/11\/05\/provisioning-services-and-cifs-stores-tuning-for-performance\">http:\/\/blogs.citrix.com\/2010\/11\/05\/provisioning-services-and-cifs-stores-tuning-for-performance<\/a> \u00a0and\u00a0<a href=\"http:\/\/support.citrix.com\/article\/CTX127549\">http:\/\/support.citrix.com\/article\/CTX127549<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>ff<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Citrix Provisioning Services is in my point of view an\u00a0incomparable way to deliver a Software image to a \u00a0system. It&#8217;s not a kind of an known enterprise software deployment, rather it&#8217;s a way to stream a virtual disk during runtime to hardware. Beside of PVS, the acronym of Provisioning Services. This article doesn&#8217;t explain what&#8217;s [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,1],"tags":[14,34],"class_list":["post-73","post","type-post","status-publish","format-standard","hentry","category-design","category-uncategorized","tag-citrix","tag-provisioningservices"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"de","enabled_languages":["en","de"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"de":{"title":false,"content":false,"excerpt":false}}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/posts\/73","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/comments?post=73"}],"version-history":[{"count":2,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/posts\/73\/revisions"}],"predecessor-version":[{"id":962,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/posts\/73\/revisions\/962"}],"wp:attachment":[{"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/media?parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/categories?post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/tags?post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}