DB2 - L

 View Only
  • 1.  DSNWLM_UTILS NUMTCB = 40

    Posted Oct 28, 2021 02:11 PM
    For our Utility WLM we have a proc with NUMTCB = 40. IBM recommended 1.
    What affect might I see dropping it from 40 to 1?
    thanks
    Bill

    ------------------------------
    williamgiannelliMe
    ------------------------------


  • 2.  RE: DSNWLM_UTILS NUMTCB = 40

    Posted Oct 28, 2021 09:12 PM
    I'm pretty sure NUMTCB=1 is recommended because utilities (DSNUTILS/UTILU) (if I recall correctly) allocate a lot of datasets, and if you have 40 utilities all running in the same address space they could end up stepping on each others' toes. Utilities also have to run APF-authorized and they have a special "intimate" relationship with Db2 storage, so you want to fence them as much as possible...not just keeping your code from clobbering them, but to keep them from clobbering each other. So yeah, keep them in their own APPLENV, and keep them to 1 TCB per address space.

    If you set NUMTCB=1, all that will happen is if you're running a utility using DSNUTILU, and kick off a second one, WLM will need to start a second APPLENV address space to handle the second invocation, a third one for a third utility, and so on until a utility wraps up and the address space can be re-used. If you're running a lot of concurrent DSNUTILU utilities, make sure to designate NO LIMIT on starting address spaces for that APPLENV in your WLM policy.

    It could be a slight delay when the utility is first invoked, as WLM starts the STC for it, but It certainly won't be any worse than utility batch jobs waiting to kick off.

    ------------------------------
    MarkWieczorkowski...
    ------------------------------



  • 3.  RE: DSNWLM_UTILS NUMTCB = 40

    Posted Oct 29, 2021 03:31 AM
    The reason for using NUMTCB=1 is that the utility SPs (DSNUTILU/V/S) actually attach
    DSNUTILB (just like JCL). Before doing so, they write the utility command string into
    DD=SYSIN.

    DSNUTILB then reads SYSIN to invoke whatever utility is required, and the output is written
    into DD=SYSPRINT. Depending on the actual utility, sorts and other processes read and
    write to fixed ddnames.

    When the utilities finish, the utility SP reads SYSPRINT, reformats the output and returns it to
    the original caller.

    Just imagine the fun (for some definition of "fun") that will happen when a call to a second
    utility SP overwrites SYSIN and the first utility now reads a different set of utility statements.
    Or when two utilities unload two different tables into a single SYSREC ddname dataset. Or
    ...

    If fixed output DDnames are required for a stored procedure, then NUMTCB=1 is required.

    James Campbell

    On 29 Oct 2021 at 1:11, Mark Wieczorkowski via Intern wrote:

    > I'm pretty sure NUMTCB=1 is recommended because utilities (DSNUTILS/UTILU) (if I recall correctly) allocate a lot of datasets, and if you have 40 utilities all running in the same address space they could end up stepping on each others' toes. Utilities also have to run APF-authorized and they have a special "intimate" relationship with Db2 storage, so you want to fence them as much as possible...not just keeping your code from clobbering them, but to keep them from clobbering each other. So yeah, keep them in their own APPLENV, and keep them to 1 TCB per address space.
    >
    > If you set NUMTCB=1, all that will happen is if you're running a utility using DSNUTILU, and kick off a second one, WLM will need to start a second APPLENV address space to handle the second invocation, a third one for a third utility, and so on until a utility wraps up and the address space can be re-used. If you're running a lot of concurrent DSNUTILU utilities, make sure to designate NO LIMIT on starting address spaces for that APPLENV in your WLM policy.
    >
    > It could be a slight delay when the utility is first invoked, as WLM starts the STC for it, but It certainly won't be any worse than utility batch jobs waiting to kick off.
    >
    > ------------------------------
    > MarkWieczorkowski...
    > ------------------------------
    > -------------------------------------------
    > Original Message:
    > Sent: Oct 28, 2021 02:11 PM
    > From: william giannelli
    > Subject: DSNWLM_UTILS NUMTCB = 40
    >
    > For our Utility WLM we have a proc with NUMTCB = 40. IBM recommended 1.
    > What affect might I see dropping it from 40 to 1?
    > thanks
    > Bill
    >
    > ------------------------------
    > williamgiannelliMe
    > ------------------------------
    >
    >

    --
    This email has been checked for viruses by AVG.
    https://www.avg.com




  • 4.  RE: DSNWLM_UTILS NUMTCB = 40

    Posted Oct 29, 2021 07:18 AM

    This is crazy helpful. Thank you, James.

     

     

    Philip Sevetson

     

    The reason for using NUMTCB=1 is that the utility SPs (DSNUTILU/V/S) actually attach DSNUTILB (just like JCL). Before doing so, they write the... -posted to the "Db2 - L" forum

    DB2 - L

    Post New Message

     

    Re: DSNWLM_UTILS NUMTCB = 40

    James Campbell

    Oct 29, 2021 3:31 AM

    James Campbell

    The reason for using NUMTCB=1 is that the utility SPs (DSNUTILU/V/S) actually attach
    DSNUTILB (just like JCL). Before doing so, they write the utility command string into
    DD=SYSIN.

    DSNUTILB then reads SYSIN to invoke whatever utility is required, and the output is written
    into DD=SYSPRINT. Depending on the actual utility, sorts and other processes read and
    write to fixed ddnames.

    When the utilities finish, the utility SP reads SYSPRINT, reformats the output and returns it to
    the original caller.

    Just imagine the fun (for some definition of "fun") that will happen when a call to a second
    utility SP overwrites SYSIN and the first utility now reads a different set of utility statements.
    Or when two utilities unload two different tables into a single SYSREC ddname dataset. Or
    ...

    If fixed output DDnames are required for a stored procedure, then NUMTCB=1 is required.

    James Campbell

    On 29 Oct 2021 at 1:11, Mark Wieczorkowski via Intern wrote:

    > I'm pretty sure NUMTCB=1 is recommended because utilities (DSNUTILS/UTILU) (if I recall correctly) allocate a lot of datasets, and if you have 40 utilities all running in the same address space they could end up stepping on each others' toes. Utilities also have to run APF-authorized and they have a special "intimate" relationship with Db2 storage, so you want to fence them as much as possible...not just keeping your code from clobbering them, but to keep them from clobbering each other. So yeah, keep them in their own APPLENV, and keep them to 1 TCB per address space.
    >
    > If you set NUMTCB=1, all that will happen is if you're running a utility using DSNUTILU, and kick off a second one, WLM will need to start a second APPLENV address space to handle the second invocation, a third one for a third utility, and so on until a utility wraps up and the address space can be re-used. If you're running a lot of concurrent DSNUTILU utilities, make sure to designate NO LIMIT on starting address spaces for that APPLENV in your WLM policy.
    >
    > It could be a slight delay when the utility is first invoked, as WLM starts the STC for it, but It certainly won't be any worse than utility batch jobs waiting to kick off.
    >
    > ------------------------------
    > MarkWieczorkowski...
    > ------------------------------
    >

      Reply to Group Online   View Thread   Recommend   Forward  

    -------------------------------------------
    > Original Message:
    > Sent: Oct 28, 2021 02:11 PM
    > From: william giannelli
    > Subject: DSNWLM_UTILS NUMTCB = 40
    >
    > For our Utility WLM we have a proc with NUMTCB = 40. IBM recommended 1.
    > What affect might I see dropping it from 40 to 1?
    > thanks
    > Bill
    >
    > ------------------------------
    > williamgiannelliMe
    > ------------------------------
    >
    >

    --
    This email has been checked for viruses by AVG.
    https://www.avg.com



     

     

    You are subscribed to "DB2 - L" as PSevetson@fisa-opa.nyc.gov. To change your subscriptions, go to My Subscriptions. To unsubscribe from this community discussion, go to Unsubscribe.

    **This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**





  • 5.  RE: DSNWLM_UTILS NUMTCB = 40

    Posted Oct 29, 2021 07:19 AM
    thank you both for all the information!
    Mark, when you say "NO LIMIT", are you referring to the "TIME" parameter?
    thanks
    Bill

    ------------------------------
    williamgiannelliMe
    ------------------------------



  • 6.  RE: DSNWLM_UTILS NUMTCB = 40

    Posted Oct 29, 2021 07:40 AM
    No, in your WLM policy when you define the actual APPLENV to WLM, you can specify how many servers WLM can start. (STC address spaces for the APPLENV) Specify "No Limit on starting".

    Good idea to specify TIME=NOLIMIT on the STC JCL as well, if that's not somehow a default.

    James, thanks for clarifying that...I hadn't looked into DSNUTILx for a while and wasn't sure if IBM had changed how those routines were managing datasets. Makes more sense to NOT re-invent the wheel and to tell people, "just set it up with NUMTCB=1". :)

    ------------------------------
    MarkWieczorkowski...
    ------------------------------



  • 7.  RE: DSNWLM_UTILS NUMTCB = 40

    Posted Oct 29, 2021 07:52 AM
    How do I look in WLM if the application environment was set to NO LIMIT?

    ------------------------------
    williamgiannelliMe
    ------------------------------



  • 8.  RE: DSNWLM_UTILS NUMTCB = 40

    Posted Oct 29, 2021 07:58 AM
    our application environment for UTILITIES says:
    Starting of server address spaces for a subsystem instance:
    Limited to a single address space per system

    The only options I see are:

    Starting of server address spaces for a subsystem instance:
    1. Managed by WLM
    2. Limited to a single address space per system
    3. Limited to a single address space per sysplex


    ------------------------------
    williamgiannelliMe
    ------------------------------



  • 9.  RE: DSNWLM_UTILS NUMTCB = 40

    Posted Oct 29, 2021 08:03 AM
    Edited by Mark Wieczorkowski Oct 29, 2021 08:04 AM
    "Managed by WLM" is the only one that doesn't talk about a "limit".

    I've never actually seen the panels...I usually just tell our Z guy, "no limit" and they know what to do. :)


    ------------------------------
    MarkWieczorkowski...
    ------------------------------