!--a11y-->
Configuring Thread Settings for Application
Sharing Server (RTC) 
To optimize performance of the Real-Time Collaboration Application Sharing Server, you need to optimize the application and system thread settings (for dispatcher and server) of J2EE Engine using the J2EE Engine Config Tool. This topic also discusses additional parameters in the J2EE Engine Config Tool and Application Sharing Server descriptor file (web.xml) that need to be considered.

If the Application Sharing Server is installed on the portal machine, you will need to make sure that the shared thread settings are optimized for the portal, CM, and Collaboration components, as well.
In addition to
the optimization settings described in this topic, you can also specify the
maximum number of concurrent application sharing sessions (and instant
messaging sessions) allowed and also the maximum number of users allowed per
session. For more information, see
Configuring Maximum
Numbers of Sessions and Users Allowed.
Before a new participant can join an existing application sharing session or start a new session, the system first verifies if the maximum number of concurrent sessions or the maximum number of users for that particular session has been reached. If the user is allowed to join the session or start a new one, only then are the thread setting limitations verified. In the event a session cannot be started or a user cannot participate in an existing session because of the defined limitations, the user will be notified on the screen.
The number of threads that each machine is capable of supporting depends on the amount of available memory, CPU, and other system resources. You will need to conduct a number of performance tests to obtain the correct settings for a specific machine.
To run the Application Sharing Server in an optimal manner, you need to optimize the following parameters in the J2EE Engine Config Tool:
● system thread parameters (under ThreadManager on server only)
● application thread parameters (under ApplicationThreadManager on server only)
● request queue (RQ) parameters (on server only)
● connection manipulator parameters (on dispatcher only)

When optimizing the thread count settings in the J2EE Engine, take into consideration that an individual thread is dedicated to each user running an Application Sharing session. Each thread is maintained for the entire duration of the session; a thread is released when the user ends their participation in the session.
For more information on these parameters, see the following documentation:
●
J2EE Engine Configuration: Thread
System in
Core System
Modules
● How To… Fine Tune the J2EE Engine Performance
Available on SAP Developer Network at https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7fdca26e-0601-0010-369d-b3fc87d3a2d9 or use the search tool on the site to locate the document.
To specify the runtime allocation and thread count usage, you need to configure the following parameters in the Application Sharing descriptor file, web.xml:
Parameter |
Default Value |
Description |
ServerMaxSystemThreads |
200 |
Specifies the maximum number of J2EE system threads which can be allocated to the Application Sharing Server. This number should not be larger than the maximum system thread count defined in the ThreadManager within the J2EE Engine Config Tool. |
ServerMaxSystemThreadsInPercent |
50 |
Specifies the percentage of the maximum system thread count (defined in the ThreadManager within the J2EE Engine) that is allocated to the Application Sharing Server. |
ServerMaxClientThreads |
200 |
Specifies the maximum number of J2EE application threads which can be allocated to the Application Sharing Server. This number should not be larger than the maximum application thread count defined in the ApplicationThreadManager within the J2EE Engine Config Tool. |
ServerMaxClientThreadsInPercent |
50 |
Specifies the percentage of the maximum application thread count (defined in the ApplicationThreadManager within the J2EE Engine Config Tool) that is allocated to the Application Sharing Server. |
Based on the above values, the Application Sharing Server at run time calculates the actual “percentage” values (ServerMaxSystemThreadsInPercent and ServerMaxClientThreadsInPercent), compares them to one another and then to the fixed values (ServerMaxSystemThreads andServerMaxClientThreads). The lowest number of threads by four-way comparison is then defined as the overall maximum number of threads used by the Application Sharing Server for a given session (the same value is used for both system and applications threads).
For example, if the values in the following table are defined in the Application Sharing web.xml file and the J2EE Config Tool, the maximum number of system and application threads used by the Application Sharing Server will be 100, since this is the lowest value by comparison:
|
Max Thread Count in J2EE Engine |
Max Thread Count in Application Sharing Descriptor File (web.xml) |
|
Fixed value |
Percentage value |
||
Application thread count |
400 |
400 threads |
80% (=320 threads) |
System thread count |
200 |
100 threads |
80% (=160 threads) |
The web.xml file is located at:
Platform |
Path |
UNIX |
/usr/sap/<SAP Web AS Java instance name>/JC<instance_number>/j2ee/cluster/server0/apps/sap.com/com.sap.netweaver.coll.appl.rtc.streamsrv/servlet_jsp/streamingserver/root/WEB-INF/ |
Windows |
\usr\sap\<SAP Web AS Java instance name>\JC<instance_number>\j2ee\cluster\server0\apps\sap.com\com.sap.netweaver.coll.appl.rtc.streamsrv\servlet_jsp\streamingserver\root\WEB-INF\ |
