Options for TAO Components

Overview

Certain components in TAO such as the ORB Core or Object Adapter can be tuned by users by providing value for options or environment variables to them. These options are commonly specified as (1) environment variables or (2) strings passed on the command-line. They are generally passed to component initialization methods for consumption.

Both command-line options and environment variables are used to control the global ORB features like the IOR format or ORB's bootstraping methods. Options in svc.conf file on the other hand provides a mechanism to fine-tune the internal components in TAO and they are specific to individual components. svc.conf files are not required to run TAO programs. However, if you know the behavior of your programs, you can tune-up your programs and use various optimization provided by TAO thru the use of svc.conf files.

Programmer's Note: the internal structure for options is the traditional argc/argv vector of strings style popularized by C and Unix. By convention, an initialization method will consume, i.e., remove from the vector, any options that it recognizes.


Environment Variables

The following environment variables are supported by TAO:

Environment Variable Description
NameServiceIOR which Specifies which IOR the Naming Service is listening on.
NameServicePort which Specifies which port the Naming Service is listening on.
TradingServiceIOR which Specifies which IOR the Trading Service is listening on.
TradingServicePort which Specifies which port the Trading Service is listening on.


Types of Options

The following components can be tuned via options:

Typically, CORBA::ORB options are set via command line parameters, while the rest of the options are set via the service configurator (svc.conf) file.

CORBA::ORB

Option Description
-ORBsvcconf config file name Specifies the name of the file from which it will read dynamic service configuration directives ala ACE's Service Configurator.
-ORBsvcconfdirective directivestring Specifies a service configuration directive, which is passed to ACE's Service Configurator.
-ORBdaemon Specifies that the ORB should daemonize itself.
-ORBdebug Turns on the output of debugging messages within ACE's Service Configurator componentry.
-ORBdebuglevel level Control the level of debugging in the ORB. Higher number produce more output (try 10).
-ORBhost hostname Tells the ORB to listen for requests on the interface associated with the host named hostname.
-ORBport portspec Tells the ORB to listen for requests on the port specified by portspec. If not specified, the OS gets to choose a random empty port.
-ORBobjrefstyle which Specifies the user-visible style of object references. The range of values is IOR, which is the traditional nonsensical object reference, or URL, which looks more like a URL.
-ORBrcvsock receive buffer size Specify the size of the socket receive buffer as a positive, non-zero integer. If not specified, the system-dependent default is used.
-ORBsndsock send buffer size Specify the size of the socket send buffer as a positive, non-zero integer. If not specified, the system-dependent default is used.
-ORBnameserviceport portspec Specifies which port the Naming Service is listening on.
-ORBnameserviceior ior Specifies the IOR for the Naming Service.
-ORBtradingserviceior" ior Specifiles the IOR for the Trading Service.
-ORBtradingserviceport" portspec Specifies to which port the tradingservice is listening on.
-ORBcollocation yes/no Specifies the use of collocation object optimization. Default is yes.
-ORBpreconnect host:port[,host:port...] Pre-establishes a blocking connection to each listed host:port combination. If a connection cannot be established, a warning is announced and it continues with the next listed. Listing the same combination multiple times will properly establish multiple connections to that endpoint.
-ORBcdrtradeoff maxsize Control the strategy to tradeoff between copy vs no copy marshalling of octet sequences. If an octet sequence is smaller than maxsize and the current message block contains enough space for it the octet sequence is copied instead of appended to the CDR stream.
-ORBgioplite Enable a lightweight version of the GIOP protocol. This protocol removes some of the fields in the GIOP and the Request header. It only works on homogenous environments..
-ORBdotteddecimaladdresses boolean (0 / 1) Use the dotted decimal notation for addresses.
-ORBInitRef ObjectId=IOR Allows specification of an arbitrary object reference for an initial service. The IOR could be in the one of the following formats : OMG IOR, URL or iioploc form. iioploc is a multiple end-point IORs understood by the string_to_object () and used as a boot-strapping mechanism by the resolve_initial_references (). The mappings specified through this argument override the orb-install-time defaults.
-ORBDefaultInitRef IOR prefix This argument allows resolution of initial references not explicitly specified with -ORBInitRef. It requires a URL prefix that, after appending a slash '/' and a simple object key, forms a new URL to identify an initial object reference. The URL prefix format currently supported is iioploc.

TAO_Resource_Factory

Option Description
-ORBresources which Specify whether each thread uses a global (which = global) or a thread-specific (which = tss) instance for the resources it returns.
-ORBreactorlock which Specify whether the ORB reactor is thread-safe (which = token) or not (which = null). Default is token.

This option has been superseeded by -ORBreactortype

-ORBreactortype which Specify what kind of reactor does the ORB use, the options are:
whichReactor
select_mtUse the ACE_Select_Reactor with the usual locking mechanism for this platform
select_stUse the ACE_Select_Reactor with null locks
fl_reactorUse the ACE_FlReactor only available if ACE was compiled with support for the FL toolkit
xt_reactorUse the ACE_FlReactor only available if ACE was compiled with support for the XWindows Toolkit
WFMOUse the ACE_WFMO_Reactor only available on Win32 platforms.
MsgWFMOUse the ACE_Msg_WFMO_Reactor only available on Win32 platforms.
The default is select_mt
-ORBcoltable which Specify whether each ORB uses a global (which = global) or a per-ORB (which = orb) collocation table.
-ORBinputcdrallocator which Specify whether the ORB uses a global (which = global) or a per-thread (which = tss) allocator for the incoming CDR buffers. Though tss should give the optimal performance; we made the default global. TAO optimizations for octet sequences will not work when returning that data type if the allocator is tss. Using global allocator also allows the users to take advantage of the TAO octet sequence extensions to preserve the buffer after the upcall.

TAO_Default_Server_Strategy_Factory

Note: -ORBdemuxstrategy flag has been changed to -ORBsystemidpolicydemuxstrategy and -ORBuseridpolicydemuxstrategy.

Note: -ORBtablesize flag has been changed to -ORBactiveobjectmapsize.

Option Description
-ORBconcurrency which Specify which concurrency strategy to use. Range of values is reactive for a purely Reactor-driven concurrency strategy or thread-per-connection for creating a new thread to service each connection.
-ORBactiveobjectmapsize active object map size Specify the size of the active object map. If not specified, the default value is 64.
-ORBuseridpolicydemuxstrategy user id policy based demultiplexing strategy Specify the demultiplexing lookup strategy to be used with the user id policy. The demultiplexing strategy can be one of dynamic or linear. This option defaults to use the dynamic strategy.
-ORBsystemidpolicydemuxstrategy system id policy based demultiplexing strategy Specify the demultiplexing lookup strategy to be used with the system id policy. The demultiplexing strategy can be one of dynamic, linear, or active. This option defaults to use the active strategy.
-ORBuniqueidpolicyreversedemuxstrategy unique id policy based reverse demultiplexing strategy Specify the reverse demultiplexing lookup strategy to be used with the unique id policy. The reverse demultiplexing strategy can be one of dynamic or linear. This option defaults to use the dynamic strategy.
-ORBallowreactivationofsystemids allows reactivation of system ids Specify whether system ids can be reactivated, i.e., once an id that was generated by the system has be deactivated, will the user reactivate a new servant using the old id. If the user is not going to use this feature, the IORs can be shortened, an extra comparison in the critical upcall path removed, and some memory on the server side can be saved. The ORBallowreactivationofsystemids can be 0 or 1. This option defaults to 1.
-ORBactivehintinids adds an active hint in ids Specify whether an active hint should be added to ids. With active hints, ids can be found quickly. However, they lead to larger IORs. Note that this option is disregarded -ORBallowreactivationofsystemids is set to 0. The -ORBactivehintinids can be 0 or 1. This option defaults to 1.
-ORBpoamapsize poa map size Specify the size of the poa map. If not specified, the default value is 24.
-ORBpersiententidpolicydemuxstrategy persistent id policy based demultiplexing strategy Specify the demultiplexing lookup strategy to be used with the persistent id policy. The demultiplexing strategy can be one of dynamic or linear. This option defaults to use the dynamic strategy.
-ORBtransientidpolicydemuxstrategy transient id policy based demultiplexing strategy Specify the demultiplexing lookup strategy to be used with the transient id policy. The demultiplexing strategy can be one of dynamic, linear, or active. This option defaults to use the active strategy.
-ORBactivehintinpoanames adds an active hint in poa names Specify whether an active hint should be added to poa names. With active hints, poa names can be found quickly. However, they lead to larger IORs. The -ORBactivehintinpoanames can be 0 or 1. This option defaults to 1.
-ORBthreadflags thread flags Specify the flags used for thread creation. Flags can be any logical-OR combination of THR_DETACHED, THR_BOUND, THR_NEW_LWP, THE_SUSPENDED.
-ORBpoalock lock type Specify the type of lock to be used for POA accesses. Possible values for lock type are thread, which specifies that an inter-thread mutex is used to guarantee exclusive acccess, and null, which specifies that no locking be performed. The default is thread.
-ORBcoltbllock lock type Specify the type of lock to be used for the global collocation table. Possible values for lock type are thread, which specifies that an inter-thread mutex is used to guarantee exclusive acccess, and null, which specifies that no locking be performed. The default is thread.
-ORBconnectorlock lock type Specify the type of lock to be used by the connector. Possible values for lock type are thread, which specifies that an inter-thread mutex is used to guarantee exclusive acccess, and null, which specifies that no locking be performed. The default is thread.

TAO_Default_Client_Strategy_Factory

Option Description
-ORBiiopprofilelock which Specify, whether to use a lock for accessing the IIOP Profile or not. Default is thread, which means that a lock is used. The second option is null, which means a null lock is used. This makes sense in case of optiziations and is allowed when no forwarding is used or only a single threaded client.
-ORBclientconnectionhandler MT / ST / RW ST means use the single-threaded client connection handler, i.e., the leader follower model will not be used. However, ST does support nested upcalls and handling of new requests while waiting for the reply from a server.

MT means use the multi-threaded client connection handler which uses the leader follower model. This model allows the use of multiple threads with a single Reactor.

RW selects a strategy that simply blocks in recv() when waiting for a response from the server instead of waiting in the Reactor. The RW strategy only works when the application does not have to worry about new request showing up when waiting for a response. Therefore, this strategy is appropriate only for "pure" clients. Note that applications with nested upcalls are not "pure" clients. Also note that this strategy will only effect two way calls, since there is no waiting for one way calls. This strategy can also be used in an application that is both a client and a server if the server side is handled by a separate thread and the client threads are "pure" clients.

Default for this option is MT.


Back to the TAO components documentation.