Chapter 1 Jaguar Configuration


Configuring server stack size

Your Jaguar server has a stack size property that determines the amount of memory reserved for the call stack associated with each thread created by the server. Jaguar 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 256 K. This is appropriate for almost all situations, and provides adequate reserve memory for the worst 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 components in any of these categories:

WARNING!

Do not reduce the stack size below 64K. If you reduce the stack size, test your server thoroughly under worst-case client loads and check the log for stack overflow errors.

There are different procedures for setting the stack size on UNIX and Windows platforms.

Steps Configuring stack size for servers running on UNIX

  1. Highlight the icon for the server and select File | Server 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 Jaguar server.


Steps Configuring stack size for servers running on Windows NT

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 Jaguar server executable, jagsrv.exe in the Jaguar bin subdirectory.

  2. Change the thread stack size by running the following command in the Jaguar bin subdirectory:
    EDITBIN /STACK:value jagsrv.exe
    where 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 64 KB 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 on a line such as this:
     100000 size of stack reserve



 


Copyright © 2000 Sybase, Inc. All rights reserved.