Follow Ervik.as

What people say about the guide

DABCC.COM

The GIDWIM document was designed by my friend, Alexander Ervik Johnsen to be a guideline for Citrix application packaging and distribution. A list of Best Practices for technologies such as Citrix XenApp, Citrix XenDesktop and Microsoft Terminal Server/Remote Desktop Services. In this guide Alexander has gone in to great detail on how to use the following to automate and ease the pain of manually installing Citrix applications.

SBCSTUFF.COM

This might be the best 'all-you-need-to-know-guide' to application packaging and deployment guide SBCSTUFF.COM has seen in some time. We give it the thumbs up. Check it out.

 

Become a Ervik.as Partner

Become a partner

Stay up-to-date with the latest news

feed-image Subscribe to RSS Feed
The GiDWiM Guide
Understanding Performance Counters data while troubleshooting Performance issues PDF 
Written by Alexander Ervik Johnsen   
Friday, 18 September 2009 15:03
Bookmark and Share
I've been troubleshooting all day, and to get a better overview of the things to look for in a Terminal Services or Citrix XenApp environment I rambled down some key elements on how to troubleshoot overall Database system performance issue, analyzing performance counters is the best way to start. By collecting performance counters during busy period for few days consistently and analyzing those data would give a better idea about overall system problems regarding Memory, CPU, and/or Disk I/O. Please note, for troubleshooting a particular SQL problem such as a stored procedure or a piece of T-SQL, it is better to look at the query execution plan and SQL Trace data and identify the need of redesigning a query or table indexes. Some key performance counters to use while assessing a performance issues on SQL Server.

Memory:

Memory and Disk I/O complements each other. Memory issues on the system could affect disk I/O and vice versa. It is very critical to carefully observe the trend of performance counters data over a long period of time to identify the real problem.

· Memory\Available Mbytes

Threshold: A consistent value of less than 20 to 25 percent of installed RAM is an indication of insufficient memory.

Significance: This indicates the amount of physical memory available to processes running on the computer. Note that this counter displays the last observed value only. It is not an average.

· Memory\Page Reads/sec

Threshold: Sustained values of more than five indicate a large number of page faults for read requests.

Significance: This counter indicates that the working set of your process is too large for the physical memory and that it is paging to disk. It shows the number of read operations, without regard to the number of pages retrieved in each operation. Higher values indicate a memory bottleneck.

If a low rate of page-read operations coincides with high values for Physical Disk\% Disk Time and Physical Disk\Avg. Disk Queue Length, there could be a disk bottleneck. If an increase in queue length is not accompanied by a decrease in the pages-read rate, a memory shortage exists.

· Memory\Page Input/Sec:

Threshold: The value should not exceed 15. Higher the value poor the performance.

Significance: Pages Input/sec is the rate at which pages are read from disk to resolve hard page faults. Hard page faults occur when a process refers to a page in virtual memory that is not in its working set or elsewhere in physical memory, and must be retrieved from disk.

· Memory\Pages/sec

Threshold: Sustained values higher than five indicate a bottleneck.

Significance: This counter indicates the rate at which pages are read from or written to disk to resolve hard page faults. To determine the impact of excessive paging on disk activity, multiply the values of the Physical Disk\ Avg. Disk sec/Transfer and Memory\ Pages/sec counters. If the product of these counters exceeds 0.1, paging is taking more than 10 percent of disk access time, which indicates that you need more RAM. If this occurs over a long period, you probably need more memory.

A high value of Pages/sec indicates that your application does not have sufficient memory. The average of Pages Input/sec divided by average of Page Reads/sec gives the number of pages per disk read. This value should not generally exceed five pages per second. A value greater than five pages per second indicates that the system is spending too much time paging and requires more memory (assuming that the application has been optimized).

Processor

To measure processor utilization and context switching, you can use the following counters:

· Processor\% Processor Time

Threshold: The general figure for the threshold limit for processors is 65 percent.

Significance: This counter is the primary indicator of processor activity. High values many not necessarily be bad. However, if the other processor-related counters are increasing linearly such as % Privileged Time or Processor Queue Length, high CPU utilization may be worth investigating.

· Processor\% Privileged Time

Threshold: A figure that is consistently over 75 percent indicates a bottleneck.

Significance: This counter indicates the percentage of time a thread runs in privileged mode. When your application calls operating system functions (for example to perform file or network I/O or to allocate memory), these operating system functions are executed in privileged mode.

· System\Context Switches/sec

Threshold: As a general rule, context switching rates of less than 5,000 per second per processor are not worth worrying about. If context switching rates exceed 15,000 per second per processor, then there is a constraint.

Significance: Context switching happens when a higher priority thread preempts a lower priority thread that is currently running or when a high priority thread blocks. High levels of context switching can occur when many threads share the same priority level. This often indicates that there are too many threads competing for the processors on the system. If you do not see much processor utilization and you see very low levels of context switching, it could indicate that threads are blocked.

Disk I/O

To measure disk I/O activity, you can use the following counters:

· PhysicalDisk\Avg. Disk Queue Length

Threshold: Should not be higher than the number of spindles plus two.

Significance: This counter indicates the average number of both read and writes requests that were queued for the selected disk during the sample interval.

· PhysicalDisk\Avg. Disk Read Queue Length

Threshold: Should be less than two.

Significance: This counter indicates the average number of read requests that were queued for the selected disk during the sample interval.

· PhysicalDisk\Avg. Disk Write Queue Length

Threshold: Should be less than two.

Significance: This counter indicates the average number of write requests that were queued for the selected disk during the sample interval.

· PhysicalDisk\Avg. Disk sec/Read

Threshold: No specific value.

Less than 10 ms – very good

Between 10-20 ms – okay

Between 20-50 ms – slow, needs attention

Greater than 50 ms – Serious I/O bottleneck

Significance: This counter indicates the average time, in seconds, of a read of data from the disk.

· PhysicalDisk\Avg. Disk sec/Transfer

Threshold: Should not be more than 18 milliseconds.

Significance: This counter indicates the time, in seconds, of the average disk transfer. This may indicate a large amount of disk fragmentation, slow disks, or disk failures. Multiply the values of the Physical Disk\Avg. Disk sec/Transfer and Memory\Pages/sec counters. If the product of these counters exceeds 0.1, paging is taking more than 10 percent of disk access time, so you need more RAM.

· PhysicalDisk\Disk Writes/sec

Threshold: Depends on manufacturer's specification.

Significance: This counter indicates the rate of write operations on the disk.

· Physical Disk: %Disk Time

Threshold: Greater than 50 percent, it represents an I/O bottleneck

Significance: Represents the percentage of elapsed time that the selected disk drive was busy servicing read or write requests.

· Physical Disk\Avg. Disk Reads/Sec and Physical Disk\Avg. Disk Writes/Sec

Threshold: It should be less than 85% of the disk capacity

Significance: It represents the rate of read operations on the disk.

When using above counters, you may need to adjust the values for RAID configurations using the following formulas.

Raid 0 -- I/Os per disk = (reads + writes) / number of disks

Raid 1 -- I/Os per disk = [reads + (2 * writes)] / 2

Raid 5 -- I/Os per disk = [reads + (4 * writes)] / number of disks

Raid 10 -- I/Os per disk = [reads + (2 * writes)] / number of disks

For example, you have a RAID-1 system with two physical disks with the following values of the counters.

Disk Reads/sec            80

Disk Writes/sec           70

Avg. Disk Queue Length    5

In that case, you are encountering (80 + (2 * 70))/2 = 110 I/Os per disk and your disk queue length = 5/2 = 2.5 which indicates a border line I/O bottleneck.

Disk I/O issues can be minimized by having larger and sequential I/O activities. To achieve than you should consider partitioning. Partitioning can be done in many ways – Database partitioning, Tempdb partitioning, Table partitioning, index partitioning. At a minimum, it is highly recommended to partition your database in such a way that clustered index, non-clustered index, and transaction logs are each on a separate physical drive and spread across multiple logical filegroups/files within that drive.

 
Old Citrix ICA Clients available for download PDF 
User Rating: / 2
PoorBest 
Written by Administrator   
Friday, 28 August 2009 19:31
Bookmark and Share

Many customers ask me for older versions of the Citrix ICA client for various reasons, and Citrix removes the older ones from their website. It's understandable to some extent, becuase of support and so on...
I wanted to bring an extra service to our customers and also to everybody that reads www.ervik.as( btw thanks you are great!), and now I have gathered the most common asked for Citrix ICA Clients.

Check out the download section for more information

 
Citrix XenApp and Citrix EdgeSight Anti Virus Recommendations PDF 
User Rating: / 1
PoorBest 
Written by Alexander Ervik Johnsen   
Wednesday, 26 August 2009 12:28
Bookmark and Share

The following are some guidence to help ease the negative effect that standard Anti-virus settings can cause on Citrix XenApp servers.
We all know that XenApp or for that matter simple Terminal Servers are not used as we do with workstations or desktop, so there is quite a few things to keep in mind.
The scan and realtime engines tend to have a bit of aggressiveness when it comes to performance and theirfore needs to be adjusted for the Antivirus Software or performance will be affected.

Citrix XenApp settings

  • Change what gets scanned to scan inbound only. Typical settings are to scan on write, read access, etc.
  • Scan local drives only
  • Exclude the pagefile from being scanned.
  • Exclude .dat and .tmp files.
  • Exclude C:\Documents and Settings\*.*
  • Disable the heuristics mode of scanning, this setting can be very intensive on the system
  • For Printing performance issues: Exclude the Spool folder, C:\WINDOWS\system32\spool to improve print performance
  • Exclude the C:\Program Files\Citrix folder and all subfolders
  • Exclude smss.exe, winlogon.exe, userinit.exe, csrss.exe and wfshell.exe
  • For Symantec only: Disable "Tamper Protection".
  • Scan on write events only
  • Exclude the \Program Files\Citrix folder from being scanned (the heavily accessed local host cache and Resource Manager/EdgeSight Basic local database are contained inside this folder)
  • If ICA pass-through connections are used, exclude the user‘s XenApp Plugin bitmap cache and the XenApp Plugin folders
  • WARNING! Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. If users are connecting to a published desktop, Citrix recommends removing the antivirus-related calls from the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Run registry key to improve performance

EdgeSight settings

You must NOT be running McAfee 8.0 with patch 10. If so, you MUST install patch 11 or later before installing the EdgeSight Agent.
Some paths are given in case they were not already excluded (from above)

Server

Folders

  • C:\Program Files\Common Files\Citrix\System Monitoring\Server\RSSH
  • C:\Program Files\Citrix\System Monitoring\Server\EdgeSight 4.0\scripts\rssh
  • C:\Program Files\Citrix\System Monitoring\Server\EdgeSight 4.0\Pages
  • C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services
  • C:\Program Files\Microsoft SQL Server\MSSQL\Data

Agent

Exclude the following from being scanned:

Folders

  • C:\Documents and Settings\All Users\Application Data\Citrix\System Monitoring\Data

Files

  • C:\Program Files\Citrix\System Monitoring\Agent\Core\rscorsvc.exe
  • C:\Program Files\Citrix\System Monitoring\Agent\Core\Firebird\bin\fbserver.exe

Be sure to always check with your antivirus vendor, if they have any recommedations on how to setup the antivirus for a multiuser environment.

If you have any other recomendations that you would like to contribute with to this article then please post a Comment!

 
Software Incompatible with Citrix Application Streaming PDF 
Written by Alexander Ervik Johnsen   
Wednesday, 26 August 2009 12:09
Bookmark and Share

Here is a list of some finding that both I and I also saw that Citrix had found, I will update it as soon as I discover anything new.

The following may not be profiled for use with the application streaming functionality.

Adobe Acrobat 9.0
Citrix Conferencing Manager
Citrix EdgeSight Agent
Citrix ICA Client/XenApp Plug-in
Citrix Offline App Plug-in
Citrix Password Manager Agent
Citrix Streaming Profiler
Intuit Quickbooks Enterprise 2005
Microsoft .NET Platform
Microsoft SQL Server
Visma Global
Visma Business
Borlean BDE

If you want to add some Applications to this list, please use the comment field.

 
How to Automatically Generate a Process Dump when a Specific Event is Recorded in the Windows Event Log PDF 
Written by Alexander Ervik Johnsen   
Wednesday, 26 August 2009 12:04
Bookmark and Share

This article describes how to automatically generate a process dump when a specific event is recorded in the Windows Event Log.

In some situations, when troubleshooting process crashing or hanging, having the possibility to automate as much as possible the dump generation is required.

Sometimes, setting up a default debugger in Windows (see CTX105888 - How to Set the NT Symbolic Debugger as a Default Windows Postmortem Debugger) is not enough to gather the required process dump(s).

Procedure

If the process crash or hang has been narrowed down to occur when some events are being logged in the Windows Event Log, it is possible, using VBScript, to fully automate the task of dump generation.

The VBS script provided below was used to capture a dump of the Citrix Print Service when an event entered in the System Event log, with a specific eventID and description.

Note: In the code below, make sure you replace the text in bold and italic with the information specific to your environment and issue being investigated.

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate, (Security)}!\\" & _
strComputer & "\root\cimv2")

Set colMonitoredEvents = objWMIService.ExecNotificationQuery _
("Select * from __instancecreationevent where TargetInstance ISA " _
& "'Win32_NTLogEvent' and TargetInstance.EventCode = 'Enter your eventID number here, leaving the quotes'")

intContinue = 0
Do Until intContinue > 0
Set objLatestEvent = colMonitoredEvents.NextEvent
strDisplayMessage = objLatestEvent.TargetInstance.Message

If Instr(1, strDisplayMessage, "Enter the decription of the event leaving the quotes", 1) > 0 Then

strComputer = "."
arrTargetProcs = Array("Process.exe to dump")

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate, (Security)}!\\" & _
strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery("SELECT * FROM Win32_Process")

' Checking for target processes ...

For Each objProcess in colProcesses
For Each strTargetProc In arrTargetProcs
If LCase(objProcess.Name) = LCase(strTargetProc) Then
Set WshShell = wscript.createobject("wscript.shell")
WshShell.Exec("C:\Tools\userdump.exe ProcessName.exe DumpName.dmp")
'wait some time and kill CpSvc

WScript.Sleep 10000
WshShell.Exec("taskkill /im CpSvc.exe /f")
End If
Next
Next

' Restart the CpSvc service after 10 sec.

Dim WshShell
WScript.Sleep 10000
Set WshShell = wscript.createobject("wscript.shell")
WshShell.Exec("Net Start CpSvc")

End If
Loop

 
<< Start < Prev 1 2 3 4 Next > End >>

Page 1 of 4