* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download The Ultimate Citrix Printing internals Cheat Sheet
Survey
Document related concepts
Transcript
TheUltimateCitrixPrintinginternalsCheatSheet-Keytakeaways 1 Therearetwomain(Microsoft)printfileformats,EMFandXPS. 2 EMFprintoutputisfirstrenderedbytheGDI-GraphicalDeviceInterface-before beinghandedovertothespoolerservice. 3 XPSwasintroducedasofWindowsVista.EMFdevelopmentendedwithWindows XPandServer2003. 4 EMFdataisnotcompressed.XPSdatadoesgetcompressed. 5 WithEMFeachimageneedstoberedrawnoverandoveragain,evenifthesame imageisusedmultipletimes.XPScanreferenceasingleimagemultipletimes, thinkcompanylogo's,watermarksetc. 6 TobeabletouseXPSbothyourprintdeviceaswellastheprintdriverneedto supporttheXPSprintfileformat.Ifnot,itwillfallbacktoEMF. 7 HighlevelPrintSpooling:Printoutputisreceivedbythespoolerservice,print driverrendersMetafileintorawdatareadablebyprintdevice(theactualprintjob),spoolerservicesendsprint-jobtophysicalprintdevice. 8 Whenspooledlocally,localresources(CPU,Memory)areleveraged.Nonetwork trafficgenerated. 9 Whenspooledremotely(printserver)remoteresourcesareleveraged.Thiswill alsoproduceadditionalnetworktrafficbetweentheXenAppandprintserver. Mightbesomethingtoconsiderdependingonyourprintarchitecture. 10 Mostprintissuescanbeleadbacktobadlywrittendrivers.Nottestedand/or optimizedformultiuserenvironments. 11 Mainproblemsusedtobe(orstillare):Spoolerservicecrashes,CTXprint managerservicecrashes,bluescreens,autoprintcreationfailures,highCPU loadsandmore. 12 DoNOTmakeuseofkernelmode(version2)printdrivers. 13 Useusermode(version3and4)printdriversexclusively. 14 Considerisolatingyourprintdriversa.k.a.PrintDriverIsolationintroducedwith WindowsServer2008R2. 15 But…onlyapplyPrintDriverIsolationwhereitmakessense. 16 Therearethreeisolationmodesavailable:None,SharedandIsolated. 17 WhentheIsolatedmodeisusedaseparateisolatedrun-space (PrintIsolationHost)onaperdriverbasiswillbecreated,completelyisolatingthe driverfromallotherdriversonthesamemachine,includingtheprintand spoolerservices. 18 ThesamehappenswiththeSharedmode,aseparateisolatedrun-spacewillbe createdbutthis'space'willbesharedwithmultiple(selectable)drivers. 19 WhenIsolationmodegetsappliedtomultipledrivers(isolatingeachdriver separately)itwilldemandmoreresources(CPU,Memory)fromthelocal machinewhencomparedto'Shared'and'None'. 20 Ifaisolateddriverfailsorgetcorrupteditcanonlyaffectitselfortheother driversaspartofSharedisolationmodelforexample.Allotherdriversonthe samemachinewouldbeunaffectedincludingtheprintandspoolerservices. 21 Useisolatedmodefortestingpurposesonly,usesharedmodeinproduction. 22 Version4modesprintdrivers:DesignedforMetrostyleapplications(XPS), enhancedprintersharing,easiertoinstall,maintain,manageetc. 23 WhenaCitrixsessionstarts,theuserlogsin,itwill,bydefault,trytomapall printersknowntotheclientdevicewithinthatsession. 1 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 Changethisbehaviortomaptheclientsdefaultprinteronly.Configurethe‘Autocreateclientprinters’policyforthis.Ofcourseyouhavemultipleoptionsto choosefrom. ThesystemwillusetheWindowsversionoftheprinterdriverifitisavailableon theServerOSmachine(itwilltrytomatchthedriverfoundontheclientdevice). Iftheprinterdriverisnotavailable,thesystemattemptstoinstallthedriverfrom theWindowsoperatingsystem.IfthedriverisnotavailableinWindowsitwill tryandusetheCitrixUniversalprintdriver(itwillneedtoenabledforthisto work). Configurethe‘Automaticinstallationofin-boxprinterdrivers;tochangethis behavior. Thinkaboutimplementing‘printerdrivermappingcompatibility’.Printdriver mappingisusefulinsituationswheretheprintdriverontheclientisnamed differentlythantheprintdriverontheserver(theseneedtomatch)butdooffer theexactsamefunctionality.Itcanalsobeconfiguredtocreateawhitelist,this wayyoutellthesystemthatitisoktoautoinstallprintdriverswhennot foundonthesystem,butonlyifthosedriversareonthelist. Use‘signed’driversexclusivelyandalwaysthoroughlytestyourprint architecturesetup,nomatterhowconvincedyoumaybeitwillwork. Limitthenumberofprintdriversinstalled,lessismore! Whencomparingprintdrivers(client/server)makesuretolookattheversion numbersaswell,theyneedtomatcha100%. Avoidupgradingprintdrivers.Alwaysuninstalltheolddriverandinstallthenew one. Contacttheprintdrivervendorifandwhenneeded.Forexample,iftheyonly haveversion2printdrivers,ortheirdriversarenottested/signedformultiuser environments. AlwaystrytomatchtheprintserverOStothatoftheXenAppserverOS. TheCitrixPrintManagementServicewasintroducedaround2005,whichis aroundthesametimeastheEMFbasedUPD. ItcommunicateswiththespoolerserviceandthelocalICAclient,itcompressed printdatabeforesendovertheICAchannelanditalsomanagestheICAvirtual channelforclientprintmapping. Bothservices,printmanagerandspooler,canbeconfiguredtoautomatically restartwhenneeded. Printingpreferences(user)andpropertieswillbestoredontheclientdeviceby default.Ifthisisnotsupportedtheywillbestoredintheuserprofilewithinthe serverOperatingSystem. Configurethe‘Printerpropertiesretention’policytochangethisdefault behavior.Youhavemultipleoptions. Aprintingpathwaydefineshowprinttrafficcanorwillberoutedthroughout yourenvironment.Italsotellsuswhereajobgetsprocessed,spooled,rendered etc. TherearetwoCitrixprintingpathways,theclientprinting-pathwayandthe network-printingpathway. Besidesthesepathwaysthereisalsoasetupnamed‘Serverlocalprinters’,which isbasicallyaphysicalprintdevicedirectlyattachedtoaXenAppserver. Withthe‘Serverlocalprinterssetup’spoolingtakesplacelocallyfromaclient perspective. 2 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 Whenusingtheclientprinting-pathway,applicationprintoutputisspooled/ renderedontheXenAppserver(again,localfromaclientperspective)beforeitis sendback(leveragingtheICAprotocol)totheclientdevice.Fromtheretheprint jobwillbedeliveredtothephysicalprintdevice. Withtheclientprinting-pathwaythetrafficsendbetweentheXenAppserverand theclientdeviceissendovertheICAprotocol,meaningitcanbemanaged/ compressed. Whena(fat)clientdevicehasalocalprinterprovisionedtheclient-printing pathwaywillalwaysbeused. WhenTCP/IPdirectprintersareaddedmanuallyorbyusing/applyingGroup PolicyPreferences,theprinterisseenandtreatedasalocallyattachedprinter.As such,printtrafficwillflowthroughtheclientprinting-pathway. Thinclientdevices(oftenLinuxbased)donotsupporttheclient-printing pathway.Theylacklocalprintingcapabilities.Thenetworkprinting-pathway (sessionprintersforexample)willneedtobeusedinstead. Thenetworkprinting-pathwaywillsendtheapplicationprintoutputfromthe XenAppservertotheprintserverwhereitwillbespooled/rendered.So spoolingwilltakeplaceremotely.Fromthereitwillsendtheprintjobtothe physicalprintdevice. Usingthenetworkprinting-pathwayalltrafficsendbetweentheXenAppserver andthePrintserverwillbeuncompressed/unmanaged,non-ICA. Whenthesemachinesarephysicallyclosetogether(fastLAN)thiswon’tbean issue.When,forexample,theprintserverislocatedinthebranchofficeandthe XenAppserverislocatedbackinthedatacenterthiscouldformapotential problem.Thinkaboutyoursetup. TheUniversalPrintServercanhelpcompress/managetrafficsendbetweenthe XenAppserverandthePrintserver. Whenaclientdevicehasanetworkprovisioned(printserver)printer,Citrixwill alwaystryandrouteprinttrafficoverthenetworkprinting-pathway. Isaytry,becauseiftheprintserverandtheXenAppserverareindifferent domainsandtheyareunabletocommunicate,theclientprinting-pathwaywillbe usedinstead.Thesameapplieswhenbothmachinesareunabletocommunicate forotherreasons. Bydisablingthe‘Directconnectiontoprintservers’policy,wecanforcetheclient printing-pathwaytobeused,evenwhennetworkprovisionedprintersare leveraged. Forexample,printserverinthebranchofficeandtheXenAppserverinthedata center,clientshavenetwork-provisionedprinters(sonetworkprinting-pathway willbeusedbydefault).Byforcingtheclientprinting-pathwayprinttrafficwill besendback(fromtheXenAppserver)totheclientdeviceleveragingtheICA protocol,fromtheclientdevicetotheprintserver,overtothephysicalprint device. IfboththeXenAppserverandprintserverarelocatedinthedatacenter,thendo NOTapply/forcetheclientprinting-pathway.Trafficwillneedtotraversthe WAN/LANmultipletimes,inanuncompressedformat. Beforeanything,it’simportanttounderstandthedifferencesbetweenboth pathwaysandhowtheycan,andbydefaultwill,beapplied. Thereisnoonesizefitsall,period! KeepingtheXenAppandprintserverclosetogetherisn’talwaysthebest 3 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 solution. AllthisappliestoXenAppaswellasXenDesktopandisn’tIMAofFMAspecific. TheUniversalPrintDriver(UPD)isdisabledbydefault. TheUPDisinstalledaspartoftheVDA. ThereisanEMFaswellasanXPSprintfileformatUPD. EMFwasfirst.Itgotintroducedaround2005. TheEMFUPDwillbeusedbydefault.Thiscanbechangedthroughpolicy. BoththeUniversalPrintServeraswellastheUniversalPrinterusetheUniversal PrintDriverbydefault. IdeallyyouwouldliketousetheUPDexclusively.Remember,lessismore! Itcanbeusedcombinedwithnativeprintdrivers.Inmostcasesthisisnecessary sincetheUPDonlysupportsstaplingandsortingasfarasenhancedprinting featuresgo. ConfigurethesystemtousetheUPDwhennonativeprintdriverisavailable. TheUniversalPrinterisalogical/genericobjectcreatedatthebeginningofa session.Itwillbemappedtotheclientsdefaultprinterbutthiscanbechangedto anyprinterknowntotheclientdevice. WhenusingtheUniversalPrinternoprintmapping/enumerationtakesplace, speedingupthelogon/loginprocess. TheUniversalPrinteronlyworksforWindowsdevices. Itispotentiallyusefulwhenthe‘Waitforprintertobecreated’policyisusedor whenyouneedaccesstomultipleprinters,local&network. TheUniversalPrintServer(UPS)consistsoutofaclient(UPClient)andserver (UPServer)component. Makesuretocheckthee-docspagestoseewhichprotocolsareusedandwhich accompanyingnetworkportsneedtobeopened. UsestheUPDbydefaultbutcanbepairedwithWindowsNativeprintdrivers, again,formoreenhancedprintingcapabilities. It’soptimizedfornetworkprintersandofferssomeadditionalcompressionand QoSoptions. ItsupportsbothEMFandXPSbasedprintdrivers. Italsoworksforthinclientdevicesandtablets,basedonnetwork(session) printers. TheUPSdoesnotsupportclientsiderendering/spooling.Meaningthatall applicationprintoutputwillbesendovertotheprintserver(whichhasthe UPServercomponentinstalled)rightaway,whichwilltakeoverfromthere. AlltrafficsendbetweentheXenApp(UPClientcomponent)andprintserver (UPServercomponent)canbemanaged/compressedwhenenablingtheUPS. Wheninstalleditwillbedisabledbydefault.Needstobeenabledbyconfiguring the‘UniversalPrintServerenable’policy. NetworkprinterwillleveragetheUPSautomaticallythroughaprocesscalled auto-discovery. AsofXenDesktopTechPreview3(TP3)theUniversalPrintServerisfully supportedonWindowsServer2012(R2)aswellasServer2008R2. Itcanhandleupto50printjobsperminute,max. Recommendedforremoteofficescenarios.Pleasenotethattestingwillbe necessarytoseeifeducatecompressionratiosareachieved. Helpsinmanagingalargeamountofnetworkprinters. Canbeusedforproximityprinting.TheUPSisaprerequisite. 4 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 TheICAprotocolisbuildupoutofmultiple(32)virtualchannels.Eachvirtual channelhasit’sownpurpose.Thereisalsoaprintingvirtualchannel. ICAchannelshavedifferentpriorities,rangingfrom0to3,with0beingthe highest/mostimportant. Theprio0virtualchannelsarealsoreferredtoasThinwire(soundfamiliar)? Theprintingvirtualchannel,bydefault,hasapriorityof3,thelowest.It’streated asabackgroundprocess. Virtualchannelprioritiescanbechangedbyeditingtheaccompanyingregistry keyandchangingthevaluenumber. Thinkthisthrough.Whengivingmore,orahigherprioritytoaspecificVCitalso meansthatyouaretakingawayprioritysomewhereelse. HKLM\System\CurrentControlSet\Control\TerminalServer\Wds\icawd\Priority istheregistrykeythatgoeswiththeprintingVC. WecanaccelerateICAtrafficingeneral,includingprinttraffic,byimplementinga CitrixCloudbrigdeforexample. Allocate/configureprintingbandwidththroughCitrixpoliciesandapplythem onaperuser,perserverorperSitebasis. Usesession(network)printersonfast(er)networks. Sessionprintersarenetworkprintersthatcanbeassignedandmappedtoa specificuserorusergroups. WithproximityprintingsessionarefilteredbasedonIPaddressesorsubnets (therearesomemoreoptions).Thiswayauserwillalwaysconnecttotheclosest printer(UPSisneeded). Whendealingwithslowprintingrememberthatit’snotallaboutnetwork bandwidth.Alsocheckforcongestionandlatency. The‘simpler’theprintdriverthelesstrafficwillbegenerated.Usevendor driversonlywhenspecificfunctionalityisneeded. Lastminuteeditionfromthee-docspages:XenAppandXenDesktop7.6FP3 includesanAlways-Onloggingfeaturefortheprintserverandprinting subsystemontheVDA.InordertocollatethelogsasaZIPforemailing,orto automaticallyuploadtoCitrixInsightsServices,usethePowerShellcmdlet(StartTelemetryUpload)suppliedwiththeVDAinstallerin7.6FP3. Lastupdated:15May2015.CitrixPrintingTool3.1helpsconfiguringand troubleshootingtheCitrixPrintingsubsystemonXenApp,XenAppOnlinePlugin, andXenDesktop. Lastupdated:15May2015.PrintDetectiveisaninformationgatheringutility thatcanbeusedfortroubleshootingproblemsrelatedtoprintdrivers.It enumeratesallprinterdriversfromthespecifiedWindowsmachine,including driverspecificinformation.Itcanalsobeusedtodeletespecifiedprintdrivers.It allowsforlogfilecapabilitiesandprovidesacommand-lineinterfaceaswell. Lastupdated:13November2015:Allpurposetroubleshoottool-RunCitrix ScoutfromasingleXenDesktopcontroller(DDC)orXenAppservertocapture keydatapointsandCDFtracesforselectedcomputersfollowedbysecureand reliableuploadofthedatapackagetoCitrixTechnicalSupport. Lastupdated:31August2015.TheCitrixUPSPrintDriverCertificationToolcan beusedtotestthecompatibilityofaprintdriverwiththeCitrixUniversalPrint Server. Lastupdated:15May2015.Notsure?Testyourprintdriversthoroughlyusing StressPrinters. 5 109 110 CheckoutMicrosoft’s(MSDN)webpagetofindoutmoreaboutPrintDriver Isolation. Releasedata:February2012,primarilyfocusedonXenApp6.5:XenAppPrinter DriverManager.ManageyourXenAppprintdrivers.UpdatetheAutomatic PrinterReplicationListwithaGUI.Haveaoverviewofwhatdriversareinstalled onwhatservers. AcollectionofCitrixtroubleshootanddiagnostictools.CtxAdmTools. 111 Ihopeyoufoundthissomewhatinformative.Thanksforreading,downloadingand hopefullysharing! 6