Configuring log profiles  IPV6 support

Chapter 3: Creating and Configuring Servers

Configuring server stack size

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 systems and 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.

StepsConfiguring stack size for servers running on UNIX

  1. Highlight the icon for the server and select File | Properties.

  2. Display the Resources tab. You may need to scroll to the right to see this tab.

  3. Enter a stack size in the Thread Stack Size field, specified in bytes as a decimal number. (The field displays with no value if you have not specified a value before. This means the default setting is in effect.)

  4. Stop and restart the server.

StepsConfiguring 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.

  1. Save a copy of the original server executable, jagsrv.exe in the EAServer bin subdirectory.

  2. Change the thread stack size by running the following command in the EAServer bin subdirectory:

    editbin /stack:value jagsrv.exe

    where value is the new stack size, specified in bytes as a decimal number. 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
  3. You can confirm the new setting by running the Microsoft dumpbin utility, which is included with Microsoft Visual C++. Run the following command:

    dumpbin /headers jagsrv.exe

    In the output, the stack size appears as a hexadecimal number on a line such as this:

     80000 size of stack reserve

Copyright © 2005. Sybase Inc. All rights reserved. IPV6 support