home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / vmsnet / internal / 1191 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  6.4 KB

  1. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!deimos.cis.ksu.edu!mccall!infopiz!cmkrnl!jeh
  2. Newsgroups: vmsnet.internals
  3. Subject: re: VMS Tuning
  4. Message-ID: <1992Aug25.131514.646@cmkrnl.com>
  5. From: jeh@cmkrnl.com
  6. Date: 25 Aug 92 13:15:14 PDT
  7. References: <22200471_00057EE8.0095F9692000E6A0$6_1@UK.AC.KCL.PH.IPG>
  8. Organization: Kernel Mode Consulting, San Diego, CA
  9. Lines: 111
  10.  
  11. > Graham Evans writes
  12. >
  13. >> When I get involved in tuning VMS, one of the pieces of education I always do
  14. >> is to tell the system manager or whoever that pages of memory on the free list
  15. >> are not wasted or unused, but are performing a very useful function. I explain
  16. >> that they contain valid information, and can be made available to the relevant
  17. >> process at the modest cost of a soft fault. As a system wide cache, the pages
  18. >> are available to all processes and hence are flexibly available as different
  19. >> processes make their demands, which I see as preferable to an increase in
  20. >> working sets which will tie pages to specific processes.
  21. >>
  22. >> Now from time to time, too often for my liking, I see statements like the
  23. >> following in articles on VMS tuning:
  24. >>
  25. >> "... there are often tens of thousands of pages of memory left on the free
  26. >  page
  27. >> list with no way for the system or processes to get to it. The goal in tuning
  28. >> memory is to free up this unused memory and make it available for the system
  29. >> and processes which can make good use of it"
  30. >>
  31. >> If I am completely deluded in my view, will somebody please tell me!
  32. >
  33.  
  34. In article <22200471_00057EE8.0095F9692000E6A0$6_1@UK.AC.KCL.PH.IPG>,
  35.  SYSMGR@IPG.PH.KCL.AC.UK writes:
  36.  
  37. > Graham, IMHO you are 100% right. No. make that 200% right. or maybe 1000%.
  38.  
  39. but then goes on to say
  40.  
  41. > My experience so far has been that if your system is short of memory [...]
  42.  
  43. note the qualification:  IF the system is short of memory.
  44.  
  45. Let's define terms:  "Short of memory" means you don't have enough memory
  46. to give all processes a big enough WSQUOTA to let them all see the desired
  47. performance at the same time.
  48.  
  49. In this situation, yes, the best strategy is to keep the WSQUOTAs small
  50. (enough for "adequate" performance), let the WSEXTENTs be large (so that during
  51. times when only a few people are on the system, they can each have bigger
  52. working sets), and allow the FPL and MPL to act as a system-wide cache.
  53.  
  54. Another poster was absolutely correct in stating that the FPL needs to be big
  55. enough (say, a few thousand pages) to allow for rapid allocation of large
  56. numbers of pages at process- and image-startup time.
  57.  
  58. Let's take the opposite scenario:  A memory-rich production system which
  59. typically runs a few large batch jobs with some light interactive query users.
  60. Both the batch jobs and the interactive users tend to get into one image and
  61. stay there for hours at a time.  Now, if there's enough memory to give them all
  62. WSQUOTAs large enough to reduce even soft faulting to a bare minimum, while
  63. maintaining an adequate reserve for image startup, *why not*????  Why force
  64. them to go to the FPL if they don't need to?
  65.  
  66. How can you determine if this is your situation?  Simple.  MONITOR PAGE. If you
  67. don't see any hard page faults (except those associated with image
  68. activation)... in other words, if all of the pages released by processes are
  69. still on the MPL or FPL when the processes need them again... there is no point
  70. in forcing those pages to be pushed out to the page caches only to be faulted
  71. back in again.
  72.  
  73. Think about it this way:  the benefit of using the FPL and MPL as page caches
  74. applies only when you're short on memory.  You keep the WSQUOTAs small enough
  75. so that everybody is forced to put some of their pages out on the FPL and MPL.
  76. Then the pages that are referenced often get faulted back in from the lists
  77. before they're reassigned to someone else, while those that aren't referenced
  78. again soon after being released get released to other processes.  But if you
  79. have enough pages on the lists so that nearly all faults can be resolved to
  80. them... plus enough to allow for image startup... you're keeping too many pages
  81. there!
  82.  
  83. In other words, it pays to force the processes to use these lists as a cache
  84. only if you don't have enough memory to give to all process working sets in the
  85. first place.  If you have a memory-rich system, you should be following
  86. completely different guidelines.
  87.  
  88. > If only, IF ONLY, people would understand the difference between soft
  89. > and hard page faults! Soft ones take a fraction of a millisecond of CPU
  90. > time (even on a uv-II), hard ones take many milliseconds and a disk IO.
  91.  
  92. However, an instruction that generates a soft fault will nevertheless take, oh,
  93. perhaps thirty times as long to execute as one that generates no faults. (I
  94. haven't measured this; I'm guesstimating based on the amount of code that's
  95. involved in working set replacement.)  Consider that a simple two-operand
  96. ADDLong instruction could generate *six* soft faults (two for the instruction
  97. if it happens to straddle a page boundary, two each for the operands if they're
  98. in memory and similarly straddle page boundaries).  If you have the memory
  99. available to reduce soft faults for all processes, while still maintaining an
  100. adequate FPL to support image startup, there is no reason to not allow the
  101. processes to keep those pages in their working sets.
  102.  
  103. The joker in all of this is that the proper tuning strategy depends on the job
  104. mix, and the job mix changes from moment to moment.  What may be a memory-rich
  105. system at one moment can quickly become a memory-starved system. This is why
  106. using small WSQUOTAs and large WSEXTENTs is a good general strategy:  It allows
  107. the system to let processes have large working sets if the memory is available,
  108. but also allows the working sets to be cut back to the smaller WSQUOTA if more
  109. processes show up.  However, getting BORROWLIM and GROWLIM set to the right
  110. values so that this works properly is non-trivial.  If you have a memory-rich
  111. system it is easier to simply set the WSQUOTAs high and be done with it.
  112.  
  113. So who's wrong and who's right?  It depends on your situation.  But almost any
  114. advice that gives absolute rules to follow, without regard for your particular
  115. system configuration and load, is best taken with a large grain of salt.
  116.  
  117.     --- Jamie Hanrahan, Kernel Mode Consulting, San Diego CA
  118. uucp 'g' protocol guru and release coordinator, VMSnet (DECUS uucp) W.G., and
  119. Chair, VMS Programming and Internals Working Group, U.S. DECUS VAX Systems SIG
  120. Internet:  jeh@cmkrnl.com, hanrahan@eisner.decus.org, or jeh@crash.cts.com
  121. Uucp:  ...{crash,eisner,uunet}!cmkrnl!jeh
  122.