home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / bit / listserv / sasl / 5364 < prev    next >
Encoding:
Text File  |  1992-12-14  |  11.5 KB  |  238 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!usc!howland.reston.ans.net!paladin.american.edu!auvm!UNC.BITNET!UNCSM1
  3. Message-ID: <SAS-L%92121410474642@VTVM2.CC.VT.EDU>
  4. Newsgroups: bit.listserv.sas-l
  5. Date:         Mon, 14 Dec 1992 09:22:00 EST
  6. Reply-To:     Sally Muller <UNCSM1@UNC.BITNET>
  7. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  8. From:         Sally Muller <UNCSM1@UNC.BITNET>
  9. Subject:      Memory under MVS/ESA summary of responses
  10. Lines: 226
  11.  
  12. ----------------------------------------------------------------------
  13. SUMMARY:  Summarizing Responses Memory under MVS/ESA
  14. E-ADDR:   uncsm1@unc.bitnet
  15. PLATFORM: MVS/ESA SAS 6.07
  16. NAME:     Sally Muller
  17. PH/ADDR:  919-962-6501  OIT CB#3455, UNC, Chapel Hill NC 27514
  18. ----------------------------------------------------------------------
  19. Hi SAS-Lsters!
  20. Many *THANKS* to:
  21.                   Melvin Klassen      Ben Conner
  22.                   David Ehresman      Tim Berryhill
  23.                   Lee Herman          "Horse's mouth" from SI
  24. for answering 1) what is the difference between REGION and MEMSIZE?
  25. 2) is there any reason not to specify REGION=0M and MEMSIZE=0M?
  26. and also for their tips on memory in general (attached to bottom of
  27. this).
  28.  
  29.                 REGION VS. MEMSIZE
  30. and you thought PC expanded memory was confusing!  Some of the
  31. responses conflicted.... seems IBM has managed to confuse alot of us
  32. :-).
  33.  
  34. Ben Conner offered an historical perspective explaining that IBM
  35. mainframe memory is structured and has evolved much like memory
  36. on IBM PC clones.  Initially IBM mainframe memory had 24 bit
  37. addressing scheme and was limited to 16 meg (analogous to DOS
  38. 640K limit).  JCL was invented during this time so REGION= parm
  39. in your JCL refers to memory "below the line."  When 16 meg
  40. wasn't enough IBM went to a 31 bit addressing scheme and created
  41. "above the line" memory which takes a different set of
  42. instructions to access and programs have to be specifically
  43. written to access it.  Therefore the MVS memory above 16 meg is
  44. analagous to DOS "above the line" which is anything above 1 meg
  45. boundary.  To repeat, the JCL REGION= refers to "below the line"
  46. memory and there IS NO JCL parameter now defined to control
  47. "above the line" memory usage.
  48.  
  49. Lee posted his response to SAS-L.  To summarize, "REGION is a JCL
  50. parameter to tell MVS (the operating system) how much memory the
  51. batch job should be given to use. In our case, SAS is the program
  52. which will be run in the batch job address space (or region).
  53. MVS will note the parameter as a limit on how much memory to give
  54. the batch job but not allocate actual memory to the job until it
  55. is used or explicitly requested by the running program (in our
  56. case the SAS run time system).
  57.  
  58. The SI person said that Lee's response was correct but that one
  59. could delve alot deeper......  "One nitpicky detail: REGION=
  60. specfies the amount of storage that MVS will return in a SINGLE
  61. VARIABLE-LENGTH GETMAIN REQUEST.  It is NOT a total limit on
  62. memory; the actual limit is 64K greater (see below).
  63.  
  64. Another extraordinarily confusing thing about REGION= is the way it
  65. works vis-a-vis extended storage (ie, > 16meg).  The confusion is
  66. compounded in that each site CAN change the defaults, but as IBM
  67. ships it:
  68.  
  69.     if REGION= is less than 16Meg,
  70.     the maximum storage available below the line is REGION= + 64K,
  71. AND the maximum storage available above the line is 32meg.
  72.  
  73.     if REGION= is greater than 16Meg,
  74.     the maximum storage available below the line is everything,
  75. AND the maximum storage available above the line is REGION=.    "
  76.  
  77. It was because of this default 32meg of available storage above
  78. the line that we added the MEMSIZE= SAS option, which limits the
  79. total amount of storage that SAS uses.  Otherwise, a job running
  80. with a REGION=4M could in fact use up to 36Meg, resulting in huge
  81. impacts on system performance!"
  82.  
  83. David's posted note on REGION conflicted somewhat with what SI
  84. source said.  David agreed with what happens with below the line
  85. and above the line (he calls "extended region") when you request
  86. region < 16M.  But David says:
  87.     if REGION= is between 16Meg and 32Meg,
  88.     the maximum storage available below the line is everything
  89. and the maximum storage available above the line is REGION=32M.
  90. The SI source had said that the latter (max storage available
  91. above the line) would amount to the number specified in REGION=.)
  92.  
  93. Melvin offered a SAS perspective of REGION and referred to page
  94. 485 of the MVS Companion, "In order to speed execution, the SAS
  95. System has been designed to keep as much of the program and data
  96. in memory as possible."
  97.  
  98. REGION according to Tim is JCL, "and you can code it on both
  99. your job and step cards.  Like TIME, if you code REGION in both
  100. places you get the smaller value.  Assuming you have a cataloged
  101. procedure (//DOITTOIT EXEC OURSAS6 ), the proc may include a
  102. REGION specification (check your job log, maybe set
  103. MSGLEVEL=(1,0) to get more).  If you do not specify REGION on
  104. your job card or your step card, and it is not specified in your
  105. cataloged proc, you get the installation default region size.  If
  106. you specify REGION=0, or the installation default is REGION=0,
  107. then your job is authorized for all available memory.  The memory
  108. is not allocated to you yet, just (sorta) available.  As the job
  109. requires memory, it will issue GETMAINs.  If the memory is no
  110. longer available (someone else, also authorized, got it first),
  111. you will get a GETMAIN FAILED message in the log."
  112.  
  113.                      MEMSIZE
  114.  
  115. Compared to REGION, MEMSIZE is a piece of cake.  In his posted
  116. note, Lee said  MEMSIZE is a SAS parameter to tell the SAS run
  117. time system how much memory within the amount specified in REGION
  118. it can/should use.   As Ben and SI source note, REGION currently
  119. is defined to control below the line memory and it is the "wild
  120. west" as far as memory above the line is concerned which may
  121. result in huge impacts on system performance.  "Ergo the
  122. MEMSIZE= option, it tells SAS when to quit being greedy."
  123.  
  124.               REGION=0 and MEMSIZE=0
  125.  
  126. SI source was vehemently opposed -- "Specifying REGION=0 IS A
  127. VERY VERY BAD IDEA!  For the same reason, specifying REGION= >
  128. 16M  IS A VERY VERY BAD IDEA!  In both situations, SAS may use up
  129. ALL the available private area storage below the line, resulting
  130. in memory failures when MVS tries to allocate some LSQA (which
  131. grows from the top of the region down).  This was more important
  132. with V5 and earlier, which did not used extended storage, and
  133. which tried to manage the layout of storage by frequently
  134. allocating all that was available.  With V6, we no longer try to
  135. manage the layout, plus we preferentially allocate extended
  136. private storage, using storage below the line only when we must,
  137. or when we run out of extended storage."
  138.  
  139. Ben seconds SI:  "The drawbacks to using MEMSIZE=0?  A couple--if
  140. several jobs running concurrently allocate it, you may run out.
  141. Secondly, I've found that SAS, like children, doesn't do well
  142. when given no limits <grin>."
  143.  
  144. Melvin calls it a double-edged sword.  "The good news is that
  145. specifying an adequate REGION avoids extra I/O, e.g.,
  146.    DATA; ...;
  147.    PROC PRINT;
  148.    DATA STEP2; SET; ... ;
  149.    PROC PRINT;  /* SAS will **not** need to read the 'PRINT' procedure */
  150.    RUN;         /* from disk for the **second** time. */
  151.  
  152. The  ***potential*** bad news is:
  153.  
  154.  - what if you specify REGION=32M, and the **real**
  155.    computer-hardware has only 24M of storage?  MVS will spend a
  156.    lot of CPU time doing paging, because not everything SAS is
  157.    loading into **virtual** storage will fit into **real**
  158.    storage at the **same** time.
  159.  - what if you specify REGION=32M, and 7 other users also specify
  160.    it, and all 8 of you submit a SAS job at the **same** time?
  161.    MVS will see that the 8 of you are using 256M of virtual
  162.    storage.  Hopefully, the real hardware will have 256M of real
  163.    storage available.  If not, then MVS will have to do "paging".
  164.    Is any paging bad?  Not necessarily, especially with an IBM
  165.    3090 or ES/9000, when "expanded storage" is an available
  166.    option on the machine.
  167.  
  168. Tim sees dangers but also advantages, "As nearly as I can tell,
  169. an individual user never suffers from setting REGION=2047M (or
  170. however much main memory their system has, 2047M is the IBM
  171. limit) and MEMSIZE=0.  The problem is, SAS does not release
  172. allocated memory until it approaches the MEMSIZE limit (it may
  173. release memory when a GETMAIN fails due to the REGION limit).
  174. Each procedure you invoke (MEANS, REG, UNIVARIATE) stays in
  175. memory and some buffers remain allocated.  Rather than free
  176. memory SAS is finished with, it allocates more.  Thus a job which
  177. could run just fine in 8M may occupy 80M, and other jobs will
  178. suffer GETMAIN failures. However, if your system programmer said
  179. it was OK, and you do not get many GETMAIN failures, why worry? "
  180.  
  181. Lee says it can be done with careful monitoring, "With REGION=0M,
  182. you give users what they need without limit other than the
  183. absolute maximum address space configured by your MVS systems
  184. person. If a SAS job keeps gobbling memory due to imprudent
  185. coding of a DATA or PROC step used with large numbers of
  186. observations, the potential for affecting other users is
  187. increased. If your systems and performance people are comfortable
  188. with the SAS workloads, your users will certainly appreciate
  189. having two less parameters to be aware of and maybe your life
  190. will be simpler as a result. If you are running MVS on a small
  191. and/or heavily loaded machine, careful monitoring of real and
  192. expanded storage use and paging should accompany the change over.
  193. So the only down side I know of is possible physical memory
  194. shortages. You apparently haven't had these so far so it sounds
  195. like it's working as it should!"
  196.  
  197.                 TIPS
  198.  
  199. Tim says, "these considerations are not unique to MVS - any
  200. multi-tasking, virtual memory computer and operating system can
  201. encounter these issues - VAXes, super computers, large
  202. workstations and servers with multiple users".
  203.  
  204. Melvin says "Perhaps, adjusting the SYSLEAVE and PROCLEAVE
  205. parameters will prevent these aborts, i.e., tell SAS to
  206. "grab-it-all", but then give 100K back to MVS, so that MVS can
  207. open files, talk to RACF, etc."
  208.  
  209. Tim points out a documentation error on page 486 of MVS Companion
  210. -- "the default value MEMSIZE=0 limits the memory to 8Mb".
  211. Earlier, page 293, same manual correctly states, "A value of 0
  212. indicates that there is no limit, except the operating system
  213. limit. "
  214.  
  215. MINSTG option for avoiding GETMAIN failures (i.e memory
  216. shortage).  Tim says, "the MINSTG option will prevent this
  217. (GETMAIN failures) but that has performance implications,
  218. particularly if you call the same proc repeatedly."  Ben says.
  219. "if my job bumps up against the system defined default (or flat
  220. runs out), it sometimes abends.  I then have to code MINSTG to
  221. try to avoid that condition (MINSTG says chuck anything you're
  222. not using and brush between meals...I mean procs). "
  223.  
  224. Hiperspace:  Ben says, "The term hiperspace--that refers to a
  225. different (and cheaper) kind of memory that IBM developed.
  226. (Documented on pgs. 9-11 SAS Technical Report 218 - Changes and
  227. Enhancements to MVS.)  Rather than being able to point to 1 byte
  228. with a single address, hiperspace points to a 4K block.  Not too
  229. great for program instructions, but wonderful for putting blocks
  230. of data away safe that can be retrieved (again with special
  231. instructions ).  Version 6.07 of SAS can now allocate files, etc.
  232. using hiperspace.  Again, much faster than disk access.  It is
  233. not unusual to find large IBM systems with 1 or more gigabytes of
  234. hiperspace memory.  Some of the systems here have 3 gig
  235. installed(!).  SAS can use it, the IBM SORT can use it, and a few
  236. other utilities.  This also has a crude parallel in the PC
  237. world--expanded memory."
  238.