Chapter 3 Creating and Configuring Servers
EAServer has a stack size property that determines the amount of memory reserved for the call stack associated with each thread created by the server. EAServer runs each client request on a different thread, so the stack size is the dominant factor in determining how many client requests can be served simultaneously.
The default stack size is 256K on UNIX and on 32-bit Windows operating systems. This is appropriate for almost all situations, and provides adequate reserve memory for the largest case loads that have been tested by Sybase engineering and customers.
For production servers that see heavy use from large numbers of clients, you may want to decrease the stack size from the default value. However, you must ensure that the stack size is adequate for the components running on the server. If the stack size is too small, your server may experience thread stack overflow errors, which are recorded in the server log.
Sybase recommends that you do not reduce the stack size if you run:
WARNING! | Do not reduce the stack size below 32K. If you reduce the stack size, test your server thoroughly under heaviest client loads and check the log for stack overflow errors. |
There are different procedures for setting the stack size on UNIX and Windows platforms.
Configuring stack size for servers running on
UNIX
Configuring stack size for servers running on
Windows
To change the thread stack size, you must have the Microsoft editbin utility, which is included with Microsoft Visual C++. This command-line utility allows you to modify object files, executable files, and dynamic link libraries (DLLs). For more information on the editbin utility, see the Microsoft Visual C++ documentation.
editbin /stack:value jagsrv.exewhere value is the new stack size, specified in bytes. editbin rounds the value up to the closest number divisible by four. For example, the following command sets a 64K stack size:
editbin /stack:65536 jagsrv.exe
dumpbin /headers jagsrv.exe
100000 size of stack reserve
Copyright © 2002 Sybase, Inc. All rights reserved. |
![]() |