home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 19997 < prev    next >
Encoding:
Text File  |  1992-12-29  |  5.2 KB  |  105 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!ucbvax!lrw.com!leichter
  2. From: leichter@lrw.com (Jerry Leichter)
  3. Newsgroups: comp.os.vms
  4. Subject: re: How do I use more memory?
  5. Message-ID: <9212282032.AA07085@uu3.psi.com>
  6. Date: 28 Dec 92 19:31:28 GMT
  7. Sender: usenet@ucbvax.BERKELEY.EDU
  8. Organization: The Internet
  9. Lines: 94
  10.  
  11.  
  12.     I've recently acquired a VAXstation with 80 Mbytes of physical memory,
  13.     and I would like to use the memory almost exclusively to run really
  14.     big (large arrays) scientific computational code. I'm more than
  15.     willing  to sacrifice other management concerns.  
  16.  
  17.     Unfortunately, my limited knowledge of VMS os management has prevented
  18.     me from taking full advatage of the memory; whenever I run large
  19.     executables the CPU spends about half its time in kernel mode, and the
  20.     system also page faults an extraordinary amount considering there
  21.     appears to be plenty of free  memory as indicated by $show mem.  I'd
  22.     like my code to use all the memory available  without resorting to
  23.     faulting.
  24.  
  25.     Currently I've set:
  26.          MIN_WSMAX=119531
  27.          MIN_WSINC=1000
  28.  
  29. (This one is going to have to be an "is it plugged in?" question, since what
  30. you've done basically makes sense.)
  31.  
  32. The MIN_ values are not system parameters - they are inputs to AUTOGEN in
  33. MODPARAMS.DAT.  Did you run AUTOGEN after adding these lines?  What value is
  34. WSMAX set to?  (BTW, how did you come up with 119531?  Was it 80 meg less
  35. SHOW MEMORY's "pages permanently in use by VMS", but any chance?  There's no
  36. point in trying to calibrate things so finely - the number of pages that VMS
  37. uses will vary with almost any parameter change, and in any case there's no
  38. hope of a single process getting ALL the rest of memory; it's used for too
  39. many different things.  The difference between 119531 and 120000 is of no
  40. importance.)
  41.  
  42. I'm not sure why you are setting WSINC so high - the cost of growing your
  43. memory in smaller chunks is pretty minor, since you only pay it once, at
  44. image startup.  Making it this large may decrease the overall stability of
  45. the system, as working sets for processes oscillate widely.  I'd leave this
  46. one alone.
  47.  
  48.     and boosted up my user authorizations to:
  49.  
  50.        WSdef:          150     
  51.        WSquo:       163840    
  52.        WSextent:    163840
  53.  
  54. This will work, but I would recomment making WSQUOTA smaller - perhaps 40000
  55. or so at most.  When the system has plenty of free memory (as it should for
  56. what you are trying to do to make any sense) WSQUOTA will be pretty much
  57. irrelevant, as a process that needs memory will be limited by WSEXTENT.  But
  58. there are going to be times when you want to run a couple of big, but not
  59. really huge processes, and it's nice to have the WSQUOTA control in effect.
  60.  
  61.        Pgflquo:     163840
  62.  
  63. You've clearly chosen the last three values from the total amount of physical
  64. memory in the system.  That makes some sense for the working set values -
  65. the number of physical pages is certainly an upper bound on how big a working
  66. set can get, though there is even less point in trying to calculate this one
  67. than in trying to calculate WSMAX:  It costs absolutely nothing if WSEXTENT is
  68. larger than WSMAX, and setting it to something huge - like 500000 - means that
  69. if you ever DO get more physical memory, you only have to change WSMAX, not
  70. individual process limits.
  71.  
  72. As for PGFLQUOTA, though:  This places a limit on the maximum VIRTUAL size
  73. (indirectly), and has nothing to do with the number of physical pages of
  74. memory.  PGFLQUOTA can, in theory, be much smaller, much larger, or the same
  75. as the amount of physical memory.  Since most process memory in a large
  76. program is likely to be backed by the page file, it makes little sense for it
  77. to be smaller than the working set limits, and on most systems it will be
  78. quite a bit larger.
  79.  
  80. But here may be the crux of your problem:  It's fine to give a process a lot
  81. of PGFLQUOTA, but do you have the page file space to back it up?  VMS is able
  82. to overcommit the page file - with recent versions, you don't really need a
  83. page of pagefile space for every page of real memory you are using - but there
  84. are limits to this.  If your pagefile isn't large enough, your process's
  85. ability to expand its virtual address space will be limited.  (It might also
  86. be limited by the SYSGEN VIRTUALPAGECNT parameter.)
  87.  
  88. Here, however, we run into a lack of information.  "Too little working set"
  89. is invisible to an application; it just gets more page faults.  "Too little
  90. virtual memory" IS visible, as memory allocation attempts fail.  Most programs
  91. do not even attempt to recover from running out of virtual memory.  However,
  92. it is quite possible to write a program that allocates as much VM as it can,
  93. then runs with that.  There's no way of knowing if your application is in that
  94. catagory.
  95.  
  96. Finally, we don't have any idea how big your "large arrays" really are.  Sure,
  97. 120,000-odd pages of memory SOUNDS like a great deal, but it's amazing how
  98. quickly something like a 3-d mesh of double-precision values can chew that up,
  99. and more.  If the algorithms you are running aren't configured properly for a
  100. virtual memory environment - (e.g., running through arrays along the "wrong"
  101. dimension") you only have to exceed available physical memory by one page
  102. before you begin thrashing.
  103.                             -- Jerry
  104.  
  105.