SNA Server Host Print Service Supports 1,024 3270 Print Sessions

ID: Q239861


The information in this article applies to:
  • Microsoft SNA Server, versions 3.0, 3.0 SP1, 3.0 SP2, 3.0 SP3, 3.0 SP4, 4.0, 4.0 SP1, 4.0 SP2

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

SUMMARY

The host print service (Snaprint.exe) included with SNA Server supports a maximum of 1,024 3270 print sessions. 3270 print sessions are limited to 1,024 because of the threading model used by the Snaprint service. The Snaprint service can create a maximum of 32 threads to service the 3270 print sessions. Each thread can support up to 32 sessions. Thirty-two threads supporting a maximum of 32 sessions each yields 1,024 sessions.

Each of the first 32 3270 print sessions will cause the Snaprint service to create a new thread. Therefore, if the Snaprint service is configured with 32 3270 print sessions, each print session will be assigned to its own thread.

Additional 3270 print sessions are assigned to the existing threads in a round-robin order to ensure that the sessions are balanced among the 32 threads.


MORE INFORMATION

The limit of 1,024 3270 print sessions is also a practical limit based on performance testing. The following are the recommended number of print sessions per host print service:

  • Maximum simultaneously active GDI printer sessions: 240
  • Recommended maximum simultaneously active non-GDI printer sessions: 500
Please refer to the Microsoft SNA Print Service White Paper for complete details on the performance test results.

The Snaprint service has been modified to support more than 1,024 3270 print sessions for those customers who require more 3270 print sessions for host print service.

CAUTION: The use of more than 1,024 print sessions should only be considered in environments where printing throughput is light. Use the Microsoft SNA Print Service White Paper as a guideline when determining if the print requirements are light. The use of more than 1,024 print sessions may result in unacceptable printing performance. Other unpredictable results may also occur with high volume printing due to the resources (for example, GDI, memory, CPU) required for heavy printing loads.

After you apply the updated print server binaries, the following registry entries need to be added to allow more than 1,024 3270 print sessions.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).


  1. Start Registry Editor (Regedt32.exe).


  2. Locate the following key in the registry:

    HKEY_LOCAL__MACHINE\System\CurrentControlSet\Services\SnaPrint\Parameters


  3. On the Edit menu, click Add Value, and then add the following registry value:
    Value Name: Max3270Sessions
    Data Type: REG_DWORD
    Value: <Number of 3270 Print sessions>
    Note: The range for this parameter is 1 through 4096.


  4. On the Edit menu, click Add Value, and then add the following registry value:
    Value Name: OpenClose
    Data Type: REG_SZ
    Value: Yes
    This parameter can have any value. It is enabled as long as the entry exists. A value of Yes is shown for simplicity.


  5. Quit Registry Editor.


Each thread created by the Snaprint service for 3270 print sessions still supports a maximum of 32 sessions. However, the Snaprint service can now create more than 32 threads. The maximum number of threads that can be used for 3270 printing is obtained by dividing the Max3270Sessions registry setting by 32 (rounding up if necessary), because each thread can support up to 32 sessions. As was the case before this change was made, the Snaprint service does not assign a second session to any thread unless it has started the maximum number of threads and assigned one session to each of these.

If Max3270Sessions is set to 3000, the print service will create 94 threads (3000/32 = 93.75). If there are 94 print sessions, each of the 94 threads will have 1 session assigned to it. The 95th session will be assigned to the first thread created, giving that thread 2 sessions.

Using the maximum numbers of sessions, which is now 4096, the Snaprint service now supports a maximum of 128 threads for 3270 print sessions.

Note: Setting Max3270Sessions unnecessarily high will result in unnecessarily high thread and memory usage.

The OpenClose registry setting specifies that the Snaprint service opens a printer at the beginning of a print job and closes the printer at the end of the print job. By default, the Snaprint service opens all defined printers at print service startup. Using this option (especially in conjunction with a large number of print sessions) prevents the number of open printer handles from being unnecessarily high.

If the OpenClose option is set then the Monitor Job (for example Request Definite Response) option cannot be used on the 3270 printer sessions. If the Monitor Job/Request Definite Response option is specified on any session, it is ignored.

If these registry entries are not set, the Snaprint service will continue to support a maximum of 1,024 3270 print sessions, as it did prior to applying these updates.

This supported feature is now available from Microsoft, but has not been fully regression tested and should be applied only to systems having a specific need for it. If you are not severely affected by the lack of this feature, Microsoft recommends that you wait for the next Microsoft SNA Server version 4.0 service pack that contains this feature.

To obtain this feature immediately, contact Microsoft Product Support Services. For a complete list of Microsoft Product Support Services phone numbers and information on support costs, please go to the following address on the World Wide Web:
http://www.microsoft.com/support/supportnet/overview/overview.asp
The English version of this feature should have the following file attributes or later:

File name Date Time
xxxxxxxx.xxx xx/xx/xx xx:xx

NOTE: Because of file dependencies, the most recent fix that contains the above files may also contain additional files.

NOTE: If this product was already installed on your computer when you purchased it from the Original Equipment Manufacturer (OEM) and you need this feature, please call the Pay Per Incident number listed on the above Web site. If you contact Microsoft to obtain this feature, and if it is determined that you only require the feature you requested, no fee will be charged. However, if you request additional technical support, and if your no-charge technical support period has expired, or if you are not eligible for standard no-charge technical support, you may be charged a non-refundable fee.

For more information about eligibility for no-charge technical support, see the following article in the Microsoft Knowledge Base:
Q154871 Determining If You Are Eligible for No-Charge Technical Support

Additional query words:

Keywords : sna3 sna3sp1 sna3sp2 sna3sp3 sna3sp4 sna4 sna4sp1 sna4sp2
Version : WINDOWS:3.0,3.0 SP1,3.0 SP2,3.0 SP3,3.0 SP4,4.0,4.0 SP1,4.0 SP2
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: August 23, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.