Usage Note 18735: Overview of the Cost Algorithm for the Stored Process Server
The Stored Process Server "Cost Algorithm" determines how requests are
distributed among the Stored Process Servers and how many simultaneous
requests can be accommodated by each Stored Process Server in the
load-balancing cluster.
An overview of the Cost Algorithm for the Stored Process Server is
available at:
http://support.sas.com/rnd/itech/doc9/admin_oma/sasserver/poollb/
loadalg.html
Here are some additional notes about the Cost Algorithm.
1.) The cost is maintained separately for each Stored Process Server.
For example, if the "Maximum Cost" setting is "1000" and you
have three Stored Process Servers (i.e. MultiBridge connections)
then each of these three servers permits a "Maximum Cost" of
"1000".
2.) If you are using the default configuration of three Stored
Process Servers (i.e. three MultiBridge connections) with a
"Maximum Cost" of "1000", a "Cost Per Client" of "100",
(and a "context" cost of "100" and a "session" cost of "1")
then:
A. Each request generally incurs a total cost of 201
(100 "Cost Per Client" + 100 "context cost" + 1 "session
cost" = 201).
NOTE: The cost per request could, in some cases, be
less than 201 since the cost for "client", "context"
and "session" are added at different times.
If the requests are processed faster than the contexts
are created, then more than 4 requests could be
executed simultaneously. But, for simplicity this
discussion will assume a cost a total cost of 201 for
each request.
B. So, each Stored Process Server can accommodate up to
four simultaneous requests ( 4 * 201 = 804). Since 804 is
less than 1000 (The "Maximum Cost"), but 1005 ( 5 * 201 =
1005) exceeds the "Maximum Cost", this means that up to four
simultaneous requests can be accommodated.
C. Since each Stored Process Server can accommodate up to
four simultaneous requests, then all three Stored Process
Servers can accommodate up to twelve simultaneous requests
( 4 * 3 = 12 ).
D. The notes in the Object Spawner log about "updating cost
with xxx" pertain to the cost of an individual Stored
Process Server (for example, the Stored Process Server that
is running on port 8611). But, the message unfortunately
does not indicate which specific Stored Process Server is
getting the cost update. For example, consider the message:
Server A5N68MWJ.AW000002 has updating cost with 202
In this example "A5N68MWJ.AW000002" is the "Logical Stored
Process Server" The message does not tell which physical
Stored Process Server (there are three servers by default)
received the cost update.
There are generally "Server xxxxx has client entering" (or
"Server xxxxx has client leaving" ) messages prior to this
message that can help determine the specific physical Stored
Process Server that is associated with the "updating cost with
xxx" message.
E. If the logical Stored Process Server (which includes the three
physical Stored Process Servers) has reached maximum capacity
at 12 Stored Processes, the Object Spawner will hold any
pending requests until one server finishes a Stored Process.
If no server is available in the length of time specified by
the "Availability Timeout" (the default value is 60 seconds),
the pending request will be rejected and an ERROR message
will appear (see "Item 4" below) in your Object Spawner log
file.
3.) The total server cost increases by 1 for each active Stored
Process "session" on the server. This is generally a minor
issue, but "sessions" are factored into the Cost Algorithm to
improve the distribution of work between servers. For more
information about "Sessions" see:
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/sessions.html
4.) If your Stored Process Servers are experiencing a heavy workload,
you may see the "updating cost" values increasing in your Object
Spawner log file as more and more requests are processed. If
the cost reaches the "Maximum Cost" value on all of your Stored
Process Servers, then you will generally see ERROR messages in
your Object Spawner log file about:
ERROR: The Balance algorithm timed out before a server could be
found.
5.) If you expect to run many simultaneous Stored Processes or you
have requests rejected because no server is available, you
should consider adding more MultiBridge connections (i.e., more
Stored Process Server instances) and/or increasing the
"Availability Timeout" value for your Stored Process Server.
Raising the Maximum Cost is not generally recommended unless you
understand the memory requirements that change may place on
the Server.
Operating System and Release Information
SAS System | SAS Integration Technologies | Microsoft Windows XP Professional | 9.1 TS1M3 SP1 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP1 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP1 | |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP1 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP1 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP1 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP1 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP1 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP1 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP1 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP1 | |
64-bit Enabled Solaris | 9.1 TS1M3 SP1 | |
64-bit Enabled HP-UX | 9.1 TS1M3 SP1 | |
z/OS | 9.1 TS1M3 SP1 | |
HP-UX IPF | 9.1 TS1M3 SP1 | |
Linux | 9.1 TS1M3 SP1 | |
Linux on Itanium | 9.1 TS1M3 SP1 | |
OpenVMS Alpha | 9.1 TS1M3 SP1 | |
64-bit Enabled AIX | 9.1 TS1M3 SP1 | |
Tru64 UNIX | 9.1 TS1M3 SP1 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | |
Topic: | System Administration ==> Servers ==> Integration Technologies
|
Date Modified: | 2006-10-10 09:24:23 |
Date Created: | 2006-10-09 16:30:48 |