This discussion is archived
8 Replies Latest reply: Jul 8, 2013 2:20 PM by Todd Little RSS

MAX/MIN in ubb for automatic change of number of server

652398 Newbie
Currently Being Moderated

In Tuxedo ubb configuration file, there is MAX and MIN for each server. As said in official documents:

"Specifies the minimum and maximum number of occurrences of the server to be started by tmboot(1). If not specified, MIN defaults to 1 and MAX defaults to MIN. The same parameters are available for use with request/response servers. However, conversational servers are automatically spawned as needed. So if you set MIN=1 and MAX=10, for example, tmboot starts one server initially. When a tpconnect() call
is made to a service offered by that server, the system starts a second copy of a server. As each copy is called, a new one is spawned, up to a limit of 10."


In my mind, MAX is not set to equal with MIN and server can dynamically increase to MAX only the tpconnect() function is called in code. Otherwise, the number of server cannot be increased automatically even though MIN is not equal with MAX. If so, the change of number of server dynamically is controlled by code rather than Tuxedo itself. Is that right? Thanks a lot.

  • 1. Re: MAX/MIN in ubb for automatic change of number of server
    652398 Newbie
    Currently Being Moderated

    Does anyone give me some ideas? Thanks.

  • 2. Re: MAX/MIN in ubb for automatic change of number of server
    Per Lindström Explorer
    Currently Being Moderated

    I don't understand what you're trying to accomplish.

     

    Are you configuring an application that is going to utilize conversational servers?

     

    Are you designing such an application?

     

    Are you developing such an application?

     

    Please clarify what your problem is and I might be able to shed some light on it. I don't have much experience with conversational servers, though...

     

    Best regards,

    /Per

  • 3. Re: MAX/MIN in ubb for automatic change of number of server
    Todd Little Expert
    Currently Being Moderated

    Hi,

     

    As Per asks, is the server in question a conversational server (not common), or a normal request/response server?  If it is the latter, Tuxedo will only start additional servers if:

    1. Requested to do so by tmboot
    2. Requested to do so via MIB request
    3. The server is configured as part of an MSSQ set and server spawning is enabled.  Then when the queue depth for the server exceeds the high water mark Tuxedo will automatically boot additional servers.  Once the queue depth drops below the low water mark, Tuxedo will automatically shut down these additionally booted servers.

     

    For conversational servers, the behavior is as the documentation states, i.e., additional conversational servers will be spawned if all current servers are busy when a client does a tpconnect().

     

    In all cases, Tuxedo will never boot more than MAX servers.

     

    Regards

  • 4. Re: MAX/MIN in ubb for automatic change of number of server
    652398 Newbie
    Currently Being Moderated

    Thanks Todd as before.

     

    My app is a normal request/response server. If so, you mean

    1. Requested to do so by tmboot                         - You mean modify the ubb to add the number of server and tmboot the server?
    2. Requested to do so via MIB request                 - You mean the changing dynamically the number of server using script?
    3. The server is configured as part of an MSSQ set and server spawning is enabled.  Then when the queue depth for the server exceeds the high water mark Tuxedo will automatically boot additional servers.  Once the queue depth drops below the low water mark, Tuxedo will automatically shut down these additionally booted servers.

    - I can't catch "The server is configured as part of an MSSQ set and server spawning is enabled". Could give me one example?

     

    Thanks a lot.

  • 5. Re: MAX/MIN in ubb for automatic change of number of server
    652398 Newbie
    Currently Being Moderated

    hi, It's a normal request/response app.

  • 6. Re: MAX/MIN in ubb for automatic change of number of server
    Per Lindström Explorer
    Currently Being Moderated

    Hi,

     

    I'll try to fill in some of the answers...

     

    1. You can have a server configured like this:

    foo SRVGRP=bar SRVID=100 MIN=1 MAX=5

     

    then tmboot (entire application) will start 1 (due to MIN=1) instances of foo, with server ID 100 (due to SRVID=100).

    If you feel that more servers are needed due to increased load, you can request this with the command

    tmboot -s foo -i 101

    that would start an additional copy of the server foo. -i 102 and so on would be able to start up to 5 instances (due to MAX=5), IF you have left room for SRVID 101-104 in this group (i e no other servers in SRVGRP bar have these SRVID:s).

     

    2. This is pretty much the same as case 1 but using MIB calls instead of tmboot or tmadmin commands. One interesting difference in this case is that you by using MIB calls can increase MAX= if you would need to by making another MIB call first doing so (i e if you forgot to set MAX= and had it left at default value = MIN). You still need to have "room" in your SRVID:s, though, and that is harder to do afterwards, that means that it usually a good idea to use sparse SRVID:s (i e leave at least 10 numbers between each SRVID) when you write your original ubbconfig.

     

    3. You can configure Tuxedo to start (and stop) additional server instances automatically based on the load placed on these servers (actually the load placed on the queue to the servers if one should be more precise). This is a large topic in itself that I won't deep-dive in here, but start with reading about MSSQ sets at

    http://docs.oracle.com/cd/E35855_01/tuxedo/docs12c/ada/adtun.html#wp1015636, then check http://docs.oracle.com/cd/E35855_01/tuxedo/docs12c/rf5/rf5.html#wp1532198 and look for the RQADDR parameter, finally read http://docs.oracle.com/cd/E35855_01/tuxedo/docs12c/rf5/rf5.html#wp1003290 about the (lower-case) -p option.

     

    Hope this helps,

    /Per

  • 7. Re: MAX/MIN in ubb for automatic change of number of server
    652398 Newbie
    Currently Being Moderated

    Thanks for your kindly reply.

     

    1. I got it.

    2. Could you give me a simple example for increasing dynamically the number of servers?

    3. You mean that Tuxedo itself can adjust the number of servers using Load Priority, in others words, the precondition is I change the Load Priority of certain a server?

     

    Thanks.

  • 8. Re: MAX/MIN in ubb for automatic change of number of server
    Todd Little Expert
    Currently Being Moderated

    Hi,

     

    One way of dynamically changing the number of servers is to use the tmconfig command.  Another way is to use the Tuxedo MIB.  If you search this forum, you will see ud32 scripts you can model your script after that shows how to use the Tuxedo .TMIB service to make MIB requests.  As well, you can check out the Tuxedo documentation on how to dynamically modify your configuration at:  Dynamically Modifying an Application

     

    As for Tuxedo automatically adjusting the number  of servers, you should check the documentation around using MSSQ sets (Multiple Servers, Single Queue).  You can read more about that at: Tuning a Oracle Tuxedo ATMI Application

     

    Regards,

    Todd Little

    Oracle Tuxedo Chief Architect