Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / TAO / orbsvcs / tests / ImplRepo / scale_clients / README
blob3e96b8f11b25de57caf72f30f8a7b842332e769c
1 This is a test of the ImplRepo being accessed by a variable number of clients trying to send a request
2 to a server registered with the ImplRepo and launched using the activator.
4 1. Syntax
6 run_test.pl [-clients <num>]
7       [-imrdebug <level>]
8       [-activationmode <mode>]
9       [-msecs_between_clients <msecs>]
10       [-server_init_delay <seconds>]
11       [-server_reply_delay <seconds>]
12       [-rt_timeout <round-trip-timeout-msecs>]
13       [-max_rt_tries <max-client-requests>]
14       [-no_imr]
16 2. Description of command line arguments
18 - clients <num>
19         The number of clients to spawn.
21 - imrdebug <level>
22         The debug level for the ImR Locator/Activator, default of 1
24 - activationmode <mode>
25         The server activation mode, normal|manual|per_client|auto_start
27 - msecs_between_clients <msecs>
28         The number of milliseconds to wait between client spawns.
29         This can be used to avoid a rapid succession of a large number
30         clients connecting to the ImplRepo.
32 - server_init_delay <secs>
33         The number of seconds to delay the server before it creates a
34         POA.
36 - server_reply_delay <secs>
37         The number of seconds to wait until a server replies to a
38         request.
40 - rt_timeout <round-trip-timeout-msecs>
41         The number of milliseconds to set for the client's round trip
42         timeout policy.
44 - max_rt_tries <max-client-requests>
45         If the round trip timeout policy setting causes an exception,
46         the client will attempt to try the request again. This
47         argument controls the maximum number of requests that the
48         client will make.
49         You can use this argument along with low value of rt_timeout
50         o cause a rapid number of request attempts.
52 - no_imr
53        Passing this argument will assume the ImplRepo is already
54        running with compatible arguments needed for the test. It may
55        be helpful to run the ImplRepo in the debugger will running
56        this test.
58 - ? (or any other argument)
59        Shows argument usage and default values.
61 3. Examples
63 Because the ImplRepo is a single threaded application, recursion can
64 take place while multiple clients attempt to make a request with the
65 server while the ImplRepo is pinging for status from the server. If
66 enough clients are making requests then it is possible to have a large
67 enough recursion depth to cause a stack overflow.
69 This test can be used to illustrate this problem. To quickly see the
70 problem with a limited number of clients, you can adjust the stack
71 size to a small value before running the test. For example, if you are
72 using Linux and running the bash shell, you can run the ulimit command
73 to specify the stack size. Under Linux 2.6.38 using g++ 4.5.2 it was
74 found that by setting the stack size to 200KBs by running
76 ulimit -s 200
78 and then invoke the test as
80 ./run_test.pl -clients 100 -server_init_delay 50 -msecs_between_clients 500
82 caused a seg fault with ImR_Locator_i::activate_server_by_name() being
83 recursively called 26 levels deep.