Specialized Administration > Configuring Your Windchill Environment > Using Windchill Configuration Assistant to Configure Windchill > Configuration Walkthrough > configureWindchill > Calculating Optimum Server Manager and Method Server Configuration
  
Calculating Optimum Server Manager and Method Server Configuration
After the memory region sizes have been calculated, the assistant determines the number of method servers to configure. It does this by considering both the size of the method server memory region and the number of CPUs.
The configureMethodServerService target calculates the number of method servers and background method servers based on the number of CPUs reported by the operating system. It then uses a lookup table containing the ratio of CPU to method servers that is defined in Configurator.properties to determine the ideal number of method servers for the number of CPUs. A second lookup table is used to determine the optimum number of method servers based on operating system and method server memory region size. If more than one method server is recommended and you are not running in interactive mode, then one of the method servers is configured as a background method server. All other method servers are configured as foreground method servers. When you are running in interactive mode and the assistant finds sufficient resources to run multiple method servers, it may prompt you to configure a background method server. If you do not want a background method server configured, enter n when prompted.
If the assistant determines that the current Windchill installation belongs to a cluster, then it will only offer to configure a background method server on the host configured as the cluster master.
If you want to configure more than one background method server, you must manually configure the additional background method servers. For details on configuring multiple background method servers, see Configuring Background Method Servers.
In the following example, the assistant recommends 3 method servers for the 8 CPU server and offers to configure a background method server:
configureMethodServerService:
[echo] Recommended number of MethodServers for 8 CPUs = 3
[echo] set outputProperty to default =3
[echo] Recommended number of MethodServers for 6100MB on Windows 7 (64bit) is 3
[echo] Recommended number of MethodServers based on available resources=3
[input] Enter number of MethodServers to configure (current=1): [3]
[input] Enter MethodServer max heap size (MB): [2033]
[echo] Setting max heap size for MethodServer to 2033
[input] Enter MethodServer initial heap size (MB): [2033]
[echo] Setting initial heap size for MethodServer to 2033
[input] Do you want to configure a BackgroundMethodServer (y/n)? ([y], n)
[echo] Configuring Background MethodServer
When the assistant configures a background method server it appoints one of the foreground method servers as the background method server and reduces the number of foreground method servers by one. Memory for method servers (including the background method server - if any) is allotted from the method server memory region.
All method servers (including background method server) are assigned identical Java heap sizes. The heap size is calculated by simply dividing the method server heap region by the sum of background plus foreground method servers. The calculated heap size must not exceed the heap size limit defined for the operating system and memory model (for example, 32bit or 64 bit). In the example above, both the background and foreground method servers were assigned heaps of 2033 MB.
Next, the heap size for the server manager is set. Interactively, you can use the default presented (which is the server manager memory region calculated under allocatePhysMem) or enter your own value. The following example shows the use of the default value:
configureServerManager:
[input] Enter ServerManager max heap size (MB): [812]
[echo] Setting max heap size for ServerManager to 812
[input] Enter ServerManager initial heap size (MB): [812]
[echo] Setting initial heap size for ServerManager to 812
After the number of method servers and the heap sizes for both the method servers and server manager have been set, the assistant configures additional Java command line options. These command line options fine tune the heap generation sizes for maximum garbage collection throughput, including the number of parallel threads.
The Java collector used with Windchill uses multiple CPUs to reduce the pause time of full garbage collections. Windchill uses multiple JVMs on a single system. The assistant allows you to tune the garbage collection by specifying the number of parallel threads that can be used for garbage collection on both the method servers and the server manager. The assistant determines the default values, and displays them when the assistant is run. In the following example, the assistant recommends two threads for each method server:
[echo] Calculated ParallelGCThreads=2
[input] Enter MethodServer parallel GC threads: [2]
In the following example, the assistant recommends two threads for the server manager:
[echo] Calculated ParallelGCThreads=2
[input] Enter ServerManager parallel GC threads: [2]