Microsoft KB Archive/239861

= SNA Server Host Print service supports 1,024 3270 print sessions =

Article ID: 239861

Article Last Modified on 7/18/2005

-

APPLIES TO


 * Microsoft SNA Server 3.0 Service Pack 4
 * Microsoft SNA Server 4.0
 * Microsoft SNA Server 3.0 Service Pack 2
 * Microsoft SNA Server 3.0 Service Pack 3
 * Microsoft SNA Server 3.0 Service Pack 4
 * Microsoft SNA Server 4.0
 * Microsoft SNA Server 4.0 Service Pack 1
 * Microsoft SNA Server 4.0 Service Pack 2
 * Microsoft SNA Server 4.0 Service Pack 3

-



This article was previously published under Q239861



Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



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.

For more information about the latest service pack for SNA Server 4.0, click the following article number to view the article in the Microsoft Knowledge Base:

215838 How to obtain the latest SNA Server Version 4.0 service pack



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 Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.  Start Registry Editor (Regedt32.exe). Locate the following key in the registry:

 On the Edit menu, click Add Value, and then add the following registry value:

Value Name: Max3270Sessions

Data Type: REG_DWORD

Value: 

Note: The range for this parameter is 1 through 4096. 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. Quit Registry Editor.</ol>

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.

Keywords: kbinfo kbqfe KB239861

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.