QUESTION ON RS/6000 USING AIX 3.2.3 AND DISK

ITEM: RTA000027791



QUESTION:                                                                       
Can you reclarify disk caching for me, for example how                          
is this set, what is the maximum disk cache I can set.                          
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
A: The RISC SYSTEM/6000 does not use disk caching, but the similar              
function is performed by the virtual memory manager.  A memory-mapped           
file is either fully or partly in real memory.  The Real memory access          
times are much faster than disk access files, so a memory mapped file           
will provide higher performance than a file stored entirely on disk.            
I will describe disk caching, then point out how AIX memory mapping of          
files differs from this.                                                        
                                                                                
   DISK CACHES                                                                  
    * A disk cache normally uses a fixed amount of memory.  Some disk          
      caches use memory that comes on the disk itself, and the disk             
      or the disk's controller board have processors which manage this          
      cache.  This frees the computer's CPU from having to manage the           
      cache.  In contrast, some disk caches use the computer's memory,          
      and usually this kind of cache requires the computer's CPU to             
      manage it( this is software cache).  They key issue is that if            
      you have X amount of total memory, then you have                          
         X - SIZEOF(cache)                                                      
      memory left for other things.  Even if you are hardly using the           
      cache at a given period of time, the cache size remains fixed.            
      Even if for a period of time you need a bigger cache, the cache           
      size remains fixed.                                                       
                                                                                
   AIX AUTOMATIC MEMORY MAPPING OF FILES                                        
    * AIX automatically memory maps files.  It does this using                 
      the same virtual memory manager that manages all other                    
      RISC System/6000 memory.  So when you access a file, the                  
      area you access is read into real memory.  If you access                  
      that area of the file frequently, then that part of the                   
      file will remain in real memory (just like with a cache).                 
      On the other hand, if you do not access any files                         
      frequently, then AIX will use real memory for other things                
      (an improvement over disk caches).                                        
                                                                                
      Furthermore, the AIX virtual memory manager classifies                    
      memory into file memory and computational memory, and in                  
      this way manages to give higher priority to computational                 
      memory.  Sometimes recently accessed memory must be paged                 
      out to disk due to memory limitations.  If some of this                   
      memory must be paged back in (this is called a repage                    
      fault), then AIX records this event and records whether the               
      memory is file or computational memory.  If the frequency                 
      of recent computational repage faults exceeds the frequency               
      of file repage faults, the virtual memory manger will only                
      page out file memory to disk.  On the other hand, if file                 
      repage faults are occurring more frequently, then the                     
      virtual memory manager will page out whichever memory was                 
      least recently accessed, regardless of whether it is file                 
      or computational memory.  In this way, AIX gives a sort of                
      higher priority to computational memory.                                  
                                                                                
      This differs from caching because a disk cache cannot                     
      determine whether memory is computational or file.  A                     
      plain disk cache, in a sense, gives equal priority to                     
      reading a file as it gives to running programs.  Clearly                 
      programs need to be able to run for any work to get done                  
      on the system.                                                            
                                                                                
   In summary:                                                                  
    * Memory mapped files offer performance improvement by storing              
      files in memory, which is much faster than disks.                         
    * AIX memory mapping of files is just a normal function of its              
      virtual memory manager, thereby allowing memory to be                     
      allocated more intelligently than with cache.                             
                                                                                
    A good analogy is AIX makes all of the RISC's real memory a                 
    disk cache, and it controls this cache intelligently, mapping               
    files, data, and code to memory as needed.                                  
                                                                                
---------- ---------- ---------- --------- ---------- ----------               
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
This item was created from library item Q612899      BWQTK                      
                                                                                
Additional search words:                                                        
AIX ALTERNATE BWQTK CACHE CACHING DASD DISC DISKETTE INDEX IX JAN93             
MAIN MAP MEASURE MEMORY OP PERFORMANCE QUESTION RISCPERF RISCSYSTEM             
SOFTWARE STORAGE SYS TUNE 3.2.3                                                 
                                                                                
                                                                                
                                                                                
                                                                               


WWQA: ITEM: RTA000027791 ITEM: RTA000027791
Dated: 03/1996 Category: RISCPERF
This HTML file was generated 99/06/24~12:43:10
Comments or suggestions? Contact us