Optimizing Printing in Presentation Server Environments
To deliver the best user experience with Presentation Server, printing has to be configured correctly. Shawn Bass provides in-depth detail on the implementation and management of printers. This video shows how to leverage the Universal Print Driver and many other insights that will help you deploy your environment successfully. (Running time: 27:41 minutes)
Tags: technical video
Views: 2,945
Rating: 4
Transcript : Hello. My name is Shawn Bass. I’m an independent consultant that specializes in server-based computing technology and a frequent contributor to a variety of Citrix-related support forums on the Internet. I’m here to talk to you today about the universal printing technology that Citrix has designed and built into the Presentation Server 4.0 product. Before we get into the session, here’s an overview of the session content. First I will discuss the modes of printing in Presentation Server 4. Then I’ll cover the dependencies for the universal print technology. Then I will discuss some of the improvements in Presentation Server 4’s printing, such as an improved performance, ease of use, and improved security and server stability. Then I’ll cover the printing policy settings in depth, by creating a new policy and applying it to the users of my server. Then I will illustrate how to implement bandwidth control, and show the impact of this setting using the Windows Performance Monitor. Finally, I’ll close with some tips for creating a functional printing environment using Presentation Server 4.0. In order to frame this conversation, I think it’s important to note that there is really two types of printing that you can do in Presentation Server 4.0. The first type of printing is what I’ll call traditional, or model specific, driver based printing. This involves either a natively supplied Windows driver or a third party vendor supplied driver. This also includes driver mapping and Presentation Server 4.0 Session Printers, as model specific drivers are still used in both cases. The second mode of printing in Presentation Server 4.0 is universal printing. Within universal printing, there’s three different versions of a universal print driver that have been produced over the product lifetime of MetaFrame XP and Presentation Server. In MetaFrame XP Feature Release 1, Citrix created the universal print driver version 1. This print driver was a PCL 4 driver based on the HP LaserJet Series 2 printer. It was capable of device independent output in monochrome mode up to 300 DPI. When Citrix released MetaFrame XP Feature Release 3, they created the universal print driver version 2. This print driver was a PCL 5c driver based on the HP Color LaserJet 4500. It was capable of device independent output in color mode up to 600 DPI. When Citrix released Presentation Server 4.0, they completely rewrote the universal print driver concept to improve it in many ways, and it became the universal print driver version 3. The UPD version 3 has many advantages over the previous editions of the UPD and also has many advantages over the traditional, model-specific driver printing mode. We’ll get into some of those advantages in just a moment, but I wanted to make sure that you understood the various different versions of universal printing. Because depending upon what version of the ICA client you have, you may not get the UPD version 3, you may get a previous UPD version. It’s important to know that the universal print driver version 3 technology in Presentation Server 4.0 is a feature that requires both Presentation Server 4.0 and the ICA Client version 9.0 or higher. If you attempt to connect to a Presentation Server 4.0 environment with a client that is below the 9.0 client, you’ll have to rely on either an exact driver match, a driver mapping, or one of the previous editions of the universal print engine. As you can see, in my case, the Program Neighborhood client that I’m using is version 9.1, which satisfies the 9.0 or above requirement. When I connect into a Presentation Server 4 environment, you’ll be able to see within my session that the auto-created client printer is using the Citrix universal print driver technology. So, if I click on the Start Menu and go to Printers and Faxes, bring up the properties in my auto-created printer, you will see in the Advanced tab that the Driver says it’s using the Citrix Universal Driver. In the event that that did not come up, or my printer did not auto-create, it could be a situation where I do not have the ICA Client 9.0 or above. There are certainly other reasons why I may not be auto-creating, but that’s one of the first things to check. There are several improvements that Citrix made in the universal print technology in Presentation Server 4. One area that you’ll notice an improvement is in performance. You should see about a three to four time improvement, or reduction in time to print. in universal print technology in PS 4 than in previous versions. This is possible for several reasons. On the server-side, since the print job doesn’t have to be converted to PCL, there’s less server resources consumed. On the client-side, previous versions of the universal print technology took the print job and rasterized it. This basically means that they converted it to a full-size graphic in order to print it out. This resulted in very large spool files in the client, and caused a lot of system resources to be consumed in order to print the job out. This was often much slower than using the native print drivers or print driver mapping. Citrix also improved the compression of the print data in the ICA virtual channel. This results in less bandwidth consumed and quicker printing for the client. Also, if you’re using your environment with a pass-through connection where you may have a published desktop that connects to a secondary silo of published applications, in previous versions of the universal print driver technology, the print job would have to be processed twice. First, on the secondary silo where the applications were launched, and then secondly, on the published desktop silo before the job would be sent down to the client. In universal print technology version 3 in Presentation Server 4, the print technology recognizes that you’re running a pass-through session and doesn’t re-render the job a second time. Another area that’s been improved is there is a larger print history buffer, and the history buffer is able to be reused. What this means is that if the client is printing sections of documents that are similar to previous print jobs, the client will recognize that and will take those out of the print buffer cache, as opposed to re-rendering them again. All of these improvements are going to make a marked improvement in the amount of time it takes to print in your environment. Citrix greatly improved the ease of use of printing technology in Presentation Server 4. When a user launches an application on a Citrix server, they will see that the naming convention of the printers has changed dramatically. In previous versions of the universal print technology, the client printer would be referred to by the client network, then the client name, and then the printer name. And in situations like this in Adobe Acrobat Reader, where the dialogue box where you see the name of the printer is fairly short, it might be very hard to distinguish one printer from the next. In the universal print technology in Presentation Server 4, you will see the printer name, followed by the machine name, followed by the session number. This is especially true when using pass-through authentication to another Citrix server. In previous versions of Presentation Server, when using the pass-through Citrix session, the name of the printer would be prefaced with the first Citrix session’s server name before listing the remainder of the printer name. This could be very confusing for the user. With UPD 3 in PS 4, the printer name looks the same, except a new session number is added to the end. Again, this makes it very easy for the client to see which printer they were actually trying to print to. Secondly, if you click on the properties of the printer, you can see here that I’m using the Citrix universal print driver. And if I click on the Local Settings button, you’ll notice that a dialogue does display that looks very familiar to the user, because these are the exact properties of my client printer. In previous versions of the universal print technology, you would see a very generic property screen that would not allow you to modify many of the settings that are unique to this printer. The way in which this works, is the Citrix Print Manager service sends a command to the ICA client and tells it to open this dialogue on the client-side. When I make changes to the printer properties, these settings are collected by the ICA client and sent back to the Print Manager service and stored, so that when I print, those settings will be sent back down to the client where they’ll be applied to the rendered print job. In addition to that, there’s a Preview on client option. If I choose the Preview on client option and then print my print job, the Citrix ICA client will invoke the EMF Viewer. What this allows me to do is to preview my print output, rotate pages, cancel the print job, redirect the print job to another printer, or even print multiple copies without incurring another download and re-rendering of the job. All of these changes make printing in Presentation Server 4.0 much easier to use. Security is a key strength with the universal print service in Presentation Server 4. The Citrix Print Manager service runs under the credentials of the Citrix SMA user account. The SMA user account is only a power user on the server and has limited rights to perform operations on the Citrix sessions themselves. The Citrix Print Manager service also manages the security rights of each session’s access to its printer objects. What this means is that a session within a Citrix server is not allowed to have access to another session’s printer. This will reduce the likelihood that a user can print to another session’s printer. In this particular server session, I’m going to go look at the printer objects, and you will notice that I have my default printer here, which is my administrator’s printer. If I look at the properties of it, I can change any of the property tabs or investigate the printer properties on this session. However, if I try to look at a printer that is auto-created for a user coming from the same client device but with a different set of credentials, and try to look at the properties of it, I receive a message that says I do not have access to this printer. Now, as an administrator of this server, I could still go in and take ownership of this object and grant myself rights. But, by default, the Citrix Print Manager service keeps this secure. There is also a default PRN flag that can be configured by an administrator of the environment, that will give administrators to have access to all printer objects. That particular flag is discussed in the Advanced Concepts Guide. From a server stability perspective, the Citrix Print Manager service runs as a standard user process. Which means, if there’s a crash in the Citrix Print Manager service, it can’t bring the entire server down. In addition, it’s a well-known issue that poorly coded print drivers can lead to an unstable Citrix server environment. So if you’re able to get your environment working entirely on universal print technology, you’ll also find improved server stability. Presentation Server 4 makes available policies to enable very granular control over all the settings that would affect a Citrix server and a session. This guide will not cover policies in depth, but we will touch on all the specific settings that pertain to printing configuration. For more information on how to configure policies, please see the Video Admin Guide on Implementing Policies. When I’m ready to create my first policy object, I’m going to log on to the server with the administrator account and launch the Citrix Management Console. If I navigate to the Policies node, you’ll see here that I have no policies currently defined. So I’ll right click on the Policies node and choose Create Policy. Since this policy has to do exclusively with print settings, I’m going to call this my Default Printing Policy. When I click OK, the policy’s going to be stored in the IMA datastore. Now I can right click on the policy object and choose Properties to customize it. Again, this policy’s going to do exclusively with printing settings, so I’ll expand the Printing node and expand the Client Printers node. The first setting here is for auto-creation of client printers. When I enable this policy, I have four options. The first option is to auto-create all client printers, in which case, all printers defined on the client will be auto-created within their Citrix server session. My next option is to auto-create local, or non-network, client printers only. My third option is to auto-create the client’s default, or main, printer only. And my fourth option is to not auto-create any client printers. For maximum compatibility, and for ease of use for my users, I’m going to choose to auto-create all client printers. However, note that if a client has many print devices, it’s going to cause an increased load on the server to auto-create all the client printers. What some admins choose to do is to auto-create the client’s default printer only and provide access to a utility, like the Citrix Print Configuration Utility, to allow users to map additional printers on an as-needed basis. However, in my case, I’m going to choose to auto-create all client printers. This setting is the default of Presentation Server 4 if you don’t create a policy, or if you don’t explicitly override the setting in the policy. Next is a configuration setting for legacy client printer naming. If I enable this policy, I have two options. What this refers to is that the naming convention for client printers within a Citrix session has changed in Presentation Server 4. The new naming convention has the printer name, followed by the computer name, followed by the session number. If, for whatever reason, you have a compatibility issue and need to maintain the old printer naming convention from Presentation Server 3 or MetaFrame XP, you can choose to create old-style client printers. However, most people will find that the increased security and the ability to not allow one session to print to another session’s printer in Presentation Server 4 is enough of a reason to move with the dynamic session-private client printers. Again, if you have an app compatibility issue, you may need to modify this. Otherwise, stay with the default setting. The next configuration option is for printer properties retention. If I enable this policy, I’ve a few different options. What these settings refer to is if a user clicks on Printing Preferences within an ICA printer, and they modify any of the printing preferences, the ICA client can send those preferences back to the Citrix server, where they can then be applied to future print jobs. Those customized preferences need to be retained somewhere, and that’s what this policy setting is used for. You have three options. You can either save the preferences on the client device only, you can save them in the user profile only, or you can save them in the profile if they’re not saved on the client. As far as which option you choose, it really depends on your environment. If you have the need to be able to hot desk, you may choose to store these settings in the user profile. If, however, everyone maintains the same ICA client, you may choose to store it on the ICA client itself. Again, this really depends on the environment. In my case, I have a hybrid profile solution that allows me to store the settings within the user profile, so I’m going to choose to retain them in the user profile only and allow people to move between ICA clients. The next configuration setting is print job routing. If I enable this setting, I’m allowed two options. First, I can have the Presentation Server connect directly to the network print server, if possible. The second option is to always connect indirectly via the client network. As far as the setting that is preferred in this case, it really depends on your environment. If you’re on a LAN environment, connecting directly to the network print server from the Presentation Server will probably yield the fastest print performance. However, if you’re in a WAN environment, due to some configuration options in the ICA client, such as print job compression as well as print bandwidth management, you will probably receive faster print jobs by connecting indirectly via the client network. In my case, I’m going to choose this option. The last configuration setting, if you enable this policy, determines that you want to disable client printer mapping. Since we don’t want to disable client printer mapping, we’re going to disable this setting. Now that I finished configuring my client printer auto-creation settings, I’m going to collapse this node and expand the Drivers node. Within the Drivers node I have two configuration settings. The first is native printer driver auto-install. If I enable this policy, I am allowed two options. The first is to install Windows native drivers as needed, and the second is to not automatically install drivers. The drivers that these settings apply to refer to the native drivers that are provided in the default installation of Windows Server software. This does not refer to any vendor provided drivers, nor does it refer to the point and print technology that allows for automatic driver installation from a print server. Since the native drivers provided with Windows Server are certified and stable, I will enable this option. This is the default behavior for this setting if left not configured. The second configuration setting that I have has to do with the universal printer. If I enable this, I have a couple different options. The first option is to use universal driver only if the requested driver is unavailable. The second is to use only model specific drivers. And the third option is to use the universal driver only. This is something that you’re going to need to experiment on your own, to determine whether or not you can get by with the universal drivers for all of your print devices. Some environments may have very specific types of printers that cannot use the universal driver, or there is some incompatibility with their application, and they need to use the vendor supplied model specific drivers. When that’s the case, it’s usually best to use the setting that says use universal driver only if requested driver is unavailable. In which case, you’ll get the model specific drivers for those printers that need it and the universal driver for everything else. So this is the setting that I’m going to choose in this case. Now that I’ve completed the driver configuration portion of the policy, I can look at the Session printers policy. Session printers are similar to a concept from MetaFrame XP and Presentation Server 3 called importing a network print server. However, what makes this more powerful in Presentation Server 4.0, is that the session printers can be connected at logon time as well as during session reconnection. Combine that with the ability to assign specific session printers to different Citrix servers or IP ranges, and you have the facility to allow users to roam around an office, or move between offices, and automatically be connected to the nearest network printer. This functionality is called proximity printing. Two important concepts about session printers are, number one, they do not use universal print driver technology. In order to use a session printer, you will need to load a model specific print driver, or already have a native print driver on your server. Secondly, session printer policies merge. Traditional policy object with a high priority will take precedence, or override, lower priority policies. However, in the case of session printer policies, they will be merged together. To configure my session printer policy, I first have to enable the policy and choose Add to add my network printer. Next I choose New, and I have to specify the credentials that I want to use to enumerate the print objects. In this case, my Console Administrator account has the rights, so I’m going to choose Next. And here I can choose the network printer location, either via entering the UNC Path, if I know the print server name and printer shared name, or I can choose to browse for the printer and browse the directory to find my print object. I’m going to choose that option and add this Brother printer and click Finish. You now see that the Brother printer has been added off the server HYDROGEN, and it shows me the print model. If I add another one, I go through the same process—passing the same credentials, browse for the printer, and this time I’m going to add the HP2840 printer. Now you’ll notice that both of these printers show up in my session printer policy, which means that when this policy’s applied to my server or users or IP range, those users that have received those policy settings will automatically receive these printers in their session. And there’s two other things I can do with this session printer policy. First of which, I can choose a printer and click on the Settings button. I can now apply customized settings. Anytime somebody connects to the session printer via the policy, they can set specific form settings, like the paper size, copy count, print quality, page orientation. And in this case, I’m going to set the page orientation to landscape and set the customized settings at every logon. And click OK. Now you’ll notice that the settings show as modified. Now the second thing that I can do with the session printers, is I can choose whether or not they’re going to override the client’s default printer. When I click the dropdown, I have several options. The first is to set the default printer to the client’s main printer. The second is to not adjust the user’s default printer. Or the third or fourth options are to set the specific network printers that I imported. In this case, I’m going to set the default printer to the client’s main printer to inherit any existing auto-created settings that they might have had. And I’m going to click on Apply and OK to complete my policy configuration. Even though I’ve completed the configuration of this policy, and the settings are stored in the IMA datastore, these settings will not affect any Citrix sessions until I apply them to a specific target. So if I right click on my Default Printing Policy object and choose Apply this policy to, I have several different options on how I can apply this policy. I can apply it based on access control, settings for Access Gateway. I can apply based on an IP address range, or a specific IP. Client name. Or server or set of servers. Or a user or a global group name. In my case, I want it to affect all users of the RADON server. So I’m going to choose the Servers option and filter based on servers. And, by default, it’s going to apply to all servers in the list, and the RADON server’s included in that. When I click OK now, all users of the RADON server are going to automatically receiver the policy settings that I defined in the Default Printing Policy. In my case, I set up the session printers, so, in order to illustrate that, I’m going to close my existing session in the Citrix server, and I’m going to start another session, again, so that you can see the session printers that I imported. As my session’s starting up, you’ll notice, too, that the auto printer creation will add the printer objects as they get created. So don’t expect to see them all instantaneously when you get into the session. Go to Printers and Faxes. Here the auto-created printers begin to enumerate, and eventually my session printers will be tacked on to the end, as well. Look at the details list. Here are the two session printers that I added. And if I go to the Properties of the HP Color LaserJet and look at the printing preferences, you can see that the setting that I defined for landscape on that printer has been inherited in the settings as I defined in the session printer policy. Now that I’ve implemented my policy, a hypothetical situation has come up where I’ve received complaints about sporadic slowness from users in my London office. I know that these users are only connected to the network over a 512-bit kilobit link, so I suspect it may be bandwidth related. What I can do is modify my existing policy to limit printer bandwidth to a fixed amount. So to examine the behavior of what happens when we do that, the first thing that we want to do is see what happens in a situation where we have not limited the bandwidth. So we’re going to run Performance Monitor and remove the default counters. And I’m going to add specific counters for the ICA session object. And the counters that I’m looking for are the Input Printer Bandwidth for my London user and the Output Printer Bandwidth for my London user. Now, I’m also going to modify those counters and set the scale to something that makes more sense. And I’m going to watch most closely the output printer bandwidth, as I would expect that to be the larger portion of the data. So now that my Performance Monitor chart is set up, I’m going to minimize that, and I’m going to go to my client. And I’m going to print my 47 page PDF. Now if I switch back to the server and look at my Performance Monitor, you can see that the bandwidth consumed by this print job reaches a maximum of about 7 megabytes. That amount of data being sent through the 512 kilobit WAN link, will saturate the entire connection, probably for an entire minute or several minutes. During that time, because the traffic is not treated any differently vs. standard ICA traffic, the other users running Citrix sessions on that server through the connection, will experience slowness in their performance. In order to eliminate that, what we can do is control the amount of bandwidth available for the print channel. So what I’m going to do is remove these counters, and I’m going to exit my existing session. And I want to go back to the CMC, right click on my existing policy and choose Properties. I’m going to draw down on bandwidth, Session Limits, choose Printer, enable the policy, and we’re going to limit it to 128 kilobits. I click OK. And now any subsequent sessions that are falling under that Default Printing Policy will now have their print bandwidth limited to 128 kilobit. In order to test this, I am going to switch back to my user’s desktop. I’m going to run the same PDF document that I had running before. I’m going to go back into Perf Mon now and re-add my counters again, because my ICA session object has probably changed. And again, I’m interested in the Input Printer Bandwidth for my user. And I’m also interested in the Output Printer Bandwidth for my user. And again, I’m going to change my scale. And again, I’m going to watch the Output Printer Bandwidth most closely. So, with that in mind, I’m going to minimize back and go to my user session. I’m going to print the same document that I did before. And I’m going to click OK. I’m going to switch back to my server, and I’m going to watch the behavior of this now. So you can see my output printer bandwidth is not being clamped at exactly 128 kilobit per second, but it’s very close. You see roughly, it’s going to bounce around 110 to 140,000 and average around that area. Now what this means from a client perspective is, their print job is going to take longer to get delivered to the client, will take longer to print. At the same time, though, you will have protected the quality of the session for that user as well as other users in that office. And this is one of the reasons why, at least in the printing area, it’s very important to limit the session bandwidth. Now that you’ve seen what can be accomplished with the printer policy settings, I’d like to leave you with a few tips for a functional print environment. Wherever possible, avoid loading third party print drivers in your environment. When you must load a third party model specific printer driver, make sure it’s one that is Windows hardware quality lab certified. And preferably, the driver should be a user mode, or version 3, driver vs. a kernel mode, or version 2, driver. Kernel mode drivers can bring the entire server down if they happen to fault. The best case scenario is to rely on the universal print driver as much as possible. Second, avoid the use of host based printers when connecting them over the network. Host based printers offload much of the print processing on the system generating the print request. If your Citrix server is the host in this case, you will cause excess resource consumption on your servers. Host based printers are fine for client auto-created printers via the universal print driver. Third, if you’re experiencing a particular problem in your printing environment, always check that you are running the latest Citrix ICA Client and all the relevant hotfixes for Presentation Server. When problems are found with the universal print driver, they are corrected in server hotfixes in ICA Client updates. Fourth, admins no longer have access to modify an ICA session’s printers, because the printers are now a dynamic session private printer’s. If you need this functionality, you will need to set the default PRN flag’s registry entry per the Advanced Concepts Guide. With these points in mind, I wish you luck with a successful print environment using Presentation Server 4.0. Thank you for listening.