home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / warpst04.zip / WarpPerf.TXT < prev    next >
Text File  |  1995-05-25  |  44KB  |  792 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9. Performance Tuning OS/2 Warp
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38. Ron Cadima
  39. ISV Development Assistance
  40. IBM
  41. Boca Raton, FL
  42.  
  43.  
  44.  
  45. About This Document:
  46.  
  47. This paper makes the assumption that the reader is familiar with OS/2 Warp and many 
  48. of the technical terms in use by the computer industry. It presents general and specific 
  49. tuning information for a computer that will have or has had OS/2 Warp installed. It  
  50. starts by taking the reader through some general system setup considerations with 
  51. regard to processor type, disk type and the amount of memory in your system. Next it 
  52. goes into detail with respect to CONFIG.SYS statements that should never be 
  53. modified and those that can be modified to help improve system performance. System 
  54. Settings and Desktop Settings are covered next. Finally Appendix A presents 
  55. measurement information about how much memory is used for different functions and 
  56. products.
  57.  
  58. Some terms and phrases that will be used in this document are as follows:
  59.  
  60. Warp     - OS/2 Warp Version 3.0 both the version that is used with Windows already 
  61. installed on your machine and the version that includes the WIN-OS/2 support.
  62.  
  63. OS/2      - Refers to the OS/2 Warp Version 3.0 product and its capabilities.
  64.         
  65. System - a generic term that refers to computer with an operating system and    
  66. application programs installed on it.
  67.  
  68. Memory - The amount of physical memory or RAM ( Random Access Memory) that is 
  69. installed in the computer or used by a particular function.
  70.  
  71. Working Set - Is the amount of physical memory used by the operating system or a 
  72. program to perform a specific function or group of functions. It includes all code 
  73. and data.
  74.  
  75. FAT       - File Access Table file system.
  76.  
  77. HPFS    - High Performance File System.
  78.  
  79. Desktop- Sometimes referred to as the Workplace, this means the Workplace Shell 
  80.         feature of OS/2. The Workplace Shell is the part of OS/2 which controls how you 
  81.         OS/2 systems appears on your computers video screen.
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88. Trademarks:
  89.  
  90. IBM Corporation:                                  
  91. OS/2 Warp Version 3.0           
  92. DB/2                    
  93. LAN Server 4.0                  
  94. Personal Communications/3270
  95. BonusPak
  96.  
  97. Microsoft Corporation:
  98. Windows 3.1                     Excel
  99. Windows 3.11                    Word For Windows
  100. Windows for Workgroups 3.11
  101.  
  102.  
  103. General Setup Considerations:
  104.  
  105. There are some basic considerations that need to be made about the computer that 
  106. you will  install Warp on. They break down into 3 elements: processor , memory and 
  107. disk.
  108.  
  109. In most cases the processor that you have in your system has a minimal impact on 
  110. performance compared to the amount of memory and the speed of the disk. The only 
  111. real considerations to make with respect to processor are its age. You should avoid 
  112. 386 and 386SX processors. You want processors that can be upgraded and those 
  113. that support instruction caching sometimes referred to as Level 1 or Level 2 cache.  
  114. There really is no optimum level instruction cache size. More instruction cache is 
  115. usually better than less. The only real determinant should be costs.
  116.  
  117. Memory, also called RAM,  is a different story. Without enough memory your system 
  118. will run slow.  If you cannot afford to buy memory for your system, then you must 
  119. manage the things you install. You should only install fonts, device drivers, objects 
  120. and applications that you will actually use. You may think that just because you have 
  121. not started an installed application, it is not using any memory. This is not always the 
  122. case. Many newer OS/2 applications will register classes and objects with the 
  123. Workplace Shell or add items into path statements, set statements and the like. Many 
  124. of these things will cause memory to be used even when the program is not running. 
  125. In some cases, the program will require special device drivers be installed which will 
  126. also use up memory.
  127.  
  128. Other things that affect memory usage are disk caches, CD-ROM caches, multimedia 
  129. support and buffers. The important factor to consider for the disk cache, is that it is 
  130. designed for general use. Since most systems are not general use, the disk cache 
  131. should be tuned to the specific system environment to optimize memory usage. We 
  132. will discuss the disk cache considerations in more detail when we look at the file 
  133. system options.
  134.  
  135. Probably the most important piece of hardware on your system is the hard disk.  It will 
  136. affect the performance of starting your system, loading applications, the speed of 
  137. applications,  and the general performance of your system.
  138.  
  139. It is best to have a disk subsystem which uses a bus-mastering type of adapter. Many 
  140. SCSI devices and some of the PCI devices have this capability. These types of 
  141. devices allow for multiple requests to be sent to the disk device to be processed rather 
  142. than just one command or function at a time. They also allow what is called scatter / 
  143. gather capabilities. Without bus mastering, data that is transferred between the 
  144. computer's memory and the disk must be in contiguous memory, one byte after the 
  145. other. With bus mastering, the data does not have to be contiguous and does not have 
  146. to be on a 64K byte boundary. Bus-mastering relieves the system of a lot of overhead 
  147. and therefore performs faster in actual usage , although  you will see little or no 
  148. difference when running benchmarks. When benchmarks are being run, they tend to 
  149. be the only thing running in the system and therefore are not competing for memory or 
  150. other systems resources. Also, buffers, data and code tend to be in contiguous 
  151. memory and therefore do not require the capabilities that Bus-mastering has to offer.
  152.  
  153. When the memory in your system is over committed, that is, the operating system and 
  154. the programs you are running need more memory than is physically available in your 
  155. computer, Warp will page, or swap, executable portions of the operating system and 
  156. programs, and data that has not been accessed for a while to the disk in order to 
  157. make room for the needed code and data. In this instance, the disk is the single most 
  158. important factor in your system with respect to performance.
  159.  
  160. Another consideration with regard to the disk is whether or not it has its own caching. 
  161. If it does and your applications perform mainly sequential disk access, then you can 
  162. reduce the size of your software disk cache.  Hardware disk cache will have little or no 
  163. effect when the programs perform random disk operations. The hardware cache will 
  164. improve the performance of starting the Warp operating system and the applications.
  165.  
  166.  
  167. File Systems:  
  168.  
  169. OS/2 supports two file systems for use on your hard disks: FAT and HPFS. No matter 
  170. which file system is used, there are some basic considerations. You need to install the 
  171. file system depending on which operating systems will access the data. If you plan to 
  172. boot  a DOS or Windows system natively, then any data that will be accessed must 
  173. exist on a FAT disk partition. If you will only be running DOS and Windows 
  174. applications in a Warp VDM ( Virtual DOS Machine ), then the file system can be 
  175. HPFS or FAT.  Also, when accessing a file on a server, and the server file system is 
  176. HPFS, you do not need to install HPFS on your local client machine. HPFS only needs 
  177. to be installed on a computer when a partition on a local hard disk is formatted as 
  178. HPFS.
  179.  
  180. The amount of memory you have in your machine should affect the decision about 
  181. which file system to use. When HPFS is installed, it requires a minimum 200 to 250k 
  182. of working set, plus the space allocated for its cache. That is is, it reduces the amount 
  183. of physical memory that is available to programs by 200 to 250K. This is a large 
  184. amount of memory and is the main reason why FAT is used when Warp is installed on 
  185. a  system that contains 4 MB of physical memory..
  186.  
  187. Regardless of which file system you select, you need to plan for future requirements: 
  188. How will maintenance and fixes be applied? Where will applications be installed? 
  189. Where will data reside? etc. I recommend that when you set up your hard disk, you 
  190. create a minimum of 3 partitions. One will be for the operating system(s), one for your 
  191. applications and static data files, and another for dynamic data files and temporary 
  192. files.  Decide whether you want to use Boot Manager or Dual Boot. If you select Dual 
  193. Boot, then OS/2 must be installed with the FAT file system.     
  194.  
  195. For temporary files, it is better to have them preallocated and reuse them rather than 
  196. create and destroy them every time. Extending a file can be almost twice as slow as 
  197. just writing to a file. Also, if you reuse files, it will definitely reduce the fragmentation in 
  198. your disk directories. These types of files can be the ones allocated by programs that 
  199. you run, or can be files you create to pass information between systems, or processes 
  200. in your local system.
  201.  
  202. Now let's look at some specifics with regards to the two file systems.
  203.  
  204. FAT: 
  205.  
  206. FAT is best suited for disk partitions that are 80 MB or less in size or that have a 
  207. limited number of files installed. Usually, 256 files is a good target, with up to 500 
  208. acceptable.  The number of files become important because FAT files are allocated 
  209. based on a cluster size. The cluster size is determined by the size of the disk partition 
  210. and can be 2K, 4K, 8K or higher. Since most file sizes are not an exact multiple of the 
  211. cluster size, disk space gets wasted. For example, installing DOS, Windows and Warp 
  212. on a 100MB partition resulted in 2.2 MB of disk space being wasted. A 100MB 
  213. partition will use a 2K cluster size. If you were to use a 540MB partition size, then your 
  214. cluster size would be increased to 16K and a significantly greater amount of disk 
  215. space will be lost.
  216.  
  217. When Warp is allocating space for a file in a FAT partition, it will look for the largest 
  218. available free space area to write the data or create the file. If lots of files were created 
  219. and deleted, or expanded, these free space areas become smaller and smaller and 
  220. are spread out over the disk. This is referred to as fragmentation. When a file is stored 
  221. in many areas on the disk, it takes longer to read that data simply because the disk 
  222. head has to do more seeking. 
  223.  
  224. The FAT file system disk cache is defined by the DISKCACHE= statement in the 
  225. CONFIG.SYS file. New in Warp is the "D" designation for the size of the disk cache. 
  226. Each time Warp is booted, it will allocate space for the disk cache based on the 
  227. amount of physical memory that is installed in the system. If more than 8 MB is 
  228. installed, 10% of the physical memory will be used for the disk cache up to a 
  229. maximum of 4 MB. Based on what applications and support you install in your system, 
  230. this may be too high and cause you to over commit your memory. If there is not a lot of 
  231. disk work done on your system, or you are using DB/2 or HPFS, then you should 
  232. reduce the size of your disk cache. A number between 128 and 256K is sufficient for 
  233. most systems. On a 4 MB system, we set the disk cache to 48K.
  234.  
  235. The minimum cache size that can allocated is 32K while the largest is 14.4MB. Even if 
  236. you only use HPFS on your system's disk drives, the FAT cache, along with lazy 
  237. writing will be used for diskette drives. In this case, you would want to set the minimum 
  238. FAT cache size of 32K.
  239.  
  240. In conjunction with the cache size, you should also set the cache threshold. This 
  241. determines which records being written or read will be placed in the cache. The default 
  242. is a record size of 2K. What this means is that a record whose size is greater than 2K 
  243. will not be placed in the cache and will have to be read from the disk device if it is 
  244. accessed again. The 2K default is good for cache sizes that are less than 128K.  If 
  245. your cache size is 128K or larger, increase this value to at least 16 and preferably 32. 
  246. More detail about this parameter and the DISKCACHE= statement will be given in the 
  247. section on CONFIG.SYS.
  248.  
  249.  
  250. Some additional items for improving performance using FAT are:
  251.  
  252. * Group files by usage, the most used files first, and least used files last.
  253. * Group files based on whether they are static or dynamic. All dynamic and temporary 
  254.         files should be placed in a separate partition. 
  255. * If possible, place all temporary files in a single directory.
  256. * If possible, permanently create temporary files and reuse them.
  257. * Only create directories that are really needed. The fewer number of directories you 
  258.         have to search, the faster your search will be.
  259. * Defragment your partitions after installing new applications, deleting files or applying 
  260. maintenance and fixes. Most DOS defragmentation programs that are aware of 
  261. hidden files can be used.  You may also wish to look at J&J Utilities for OS/2 
  262. produced by J&J Computer Consulting, and the different GammaTech utilities 
  263. produced be SofTouch Systems, Inc. These utilities are aware of EA files and tend 
  264. to be saver to use.
  265.  
  266.  
  267. HPFS:
  268.  
  269. HPFS does away with some of the concerns that are prevalent with FAT. Files are 
  270. allocated based on a 512byte granularity instead of a cluster size, therefore 
  271. fragmentation is greatly reduced. Also HPFS is especially efficient when handling 
  272. large partition sizes, > 100 MB, and large numbers of files, > 500.  One thing you 
  273. should look out for is to not allocate more than 5000 files in a sub-directory or 
  274. directory. When you exceed 5000 files, you will start to degrade performance. The 
  275. HPFS file system shipped with the Warp product has a cache limit of 2 MB. There is 
  276. no such limit when using the HPFS386 file system that comes with the LAN Server 
  277. products. 
  278.  
  279. With HPFS, you specify the cache size and the caching record threshold size in the 
  280. IFS statement in the CONFIG.SYS file. As with FAT, you should specify the size of the 
  281. largest record that can be placed in the cache (cache threshold value). The /CRECL 
  282. parameter is used to define this by specifying a number in terms of K bytes.  32K is 
  283. usually a good starting value. The range can be from a low of 2K to a maximum of 64K 
  284. and must be expressed in increments of 2K. If it is not, the value will be rounded up to 
  285. the nearest 2K boundary.
  286.  
  287. As mentioned earlier, the big drawback to HPFS is the amount of extra memory that it 
  288. requires. Even if there is no HPFS partition on your system, it will cost between 200 
  289. and 250K in working set memory, as well as the space for the HPFS cache.  If you are 
  290. installing Warp on an existing DOS and or Windows system, you should not install 
  291. HPFS. When your system is up and running, you can check the working set of your 
  292. system. If there is enough free memory and you wish to create a HPFS partition, then 
  293. you can use selective reinstall to install the HPFS support. Remember that any data 
  294. stored in the HPFS partition can not be accessed if you boot your machine under DOS.
  295.  
  296. Another advantage of HPFS over FAT is in the area of extended attributes (EAs).  EAs 
  297. are data attached to a file and used to provide information about the file they are 
  298. attached to.  For example, the name of an object that appears in an OS/2 folder or on 
  299. the OS/2 Desktop is stored in EAs. In HPFS, EAs are part of the HPFS file control 
  300. block which is read when the file is open. In FAT, EAs are stored in a separate file in 
  301. separate clusters and require additional I/O to access them, and are therefore slower.
  302.  
  303.  
  304. System Tuning:  
  305.  
  306. Before covering OS/2 system tuning let's  review the concept of threads and how they 
  307. are used in OS/2. Every program that you run on an OS/2 system will process as one 
  308. or more threads. All programs, DOS, Windows and OS/2 use a minimum of one 
  309. thread. Each thread executes at a given priority.  The priority is used by OS/2 to 
  310. determine which thread gets to run when more than one thread is ready to run. The 
  311. highest-priority thread that is ready to run will be the one dispatched by the system 
  312. and given time to run. It is given what is referred to a "time slice". This is a set period 
  313. of time during which a thread is allowed to run. After this time has expired, the 
  314. highest-priority thread that is ready to run will be given it's own time slice in which to 
  315. run. If the same thread still wanted to run, and it was the highest-priority thread, it 
  316. would receive another time slice to run in.
  317.  
  318. OS/2 programs usually run at normal priority, which is 200. Under program control, the 
  319. program can change its priority to be server class, 300, or time-critical, 800.  It can 
  320. also change its subclass priority between 0 and 31. A thread that has priority 200 and 
  321. a subclass of 15 has a higher effective priority than a thread with priority 200 and 
  322. subclass 0, and therefore runs first. All DOS and Windows applications always run at 
  323. priority 200.  In OS/2 Warp, we have added the capability to define the subclass 
  324. priority for DOS and Windows applications.  Care should be taken when using this 
  325. subclass priority since it may cause other programs to run slower or generate errors in 
  326. the case of communication applications that do not get the subclass boost.
  327.  
  328. Warp will give OS/2 threads a priority boost for specific types of functions and states.  
  329. A  priority boost means that the priority of the thread is changed for a given time slice 
  330. to give it higher priority than other threads. This allows these threads to process more 
  331. quickly and therefore improve their responsiveness to the user.  Following is a list of 
  332. priority boosts that can be given to a thread. They appear in descending order.  
  333.  
  334. Disk I/O: 
  335. When an interrupt is received stating that a disk operation has completed, the 
  336. thread that processes this state will receive a priority boost for one time slice to 
  337. process this interrupt. This applies to threads whose process has foreground 
  338. focus. Foreground focus means the process that owns the window that is 
  339. highlighted on the computer screen.
  340.  
  341. Starved:  
  342. In the CONFIG.SYS file, there is a statement MAXWAIT=3. The number 3    
  343. specifies how many seconds a thread can be in the ready-to-run state without 
  344. having received time to run. If a thread had been waiting to run for 3 seconds, or 
  345. whatever value is specified in the MAXWAIT statement, its priority would be raised 
  346. to give it an opportunity to run.
  347.  
  348. Keyboard:
  349.         This is a boost in priority given to a thread when it is interacting with the system 
  350.         keyboard.  Basically, it is for accepting typed in data.  
  351.  
  352. Foreground:
  353.         This is a priority boost given to all threads of the program that owns the active       
  354.         window on the OS/2 screen, the one that is highlighted.
  355.  
  356. Windowed:
  357.         Threads which have windows showing on the display will also receive a priority 
  358.         boost when drawing or writing into that window.  
  359.  
  360. When a thread is in more than one of these states, the system will combine the states 
  361. and give a priority based on the combined states.  
  362.  
  363. For DOS and Windows applications, the Foreground, Windowed, and keyboard states 
  364. do not apply. The routine that handles the mouse or keyboard interrupt will receive a 
  365. boost in priority to handle the interrupt, but the application does not receive a priority 
  366. boost. If the DOS Setting INT_DURING_IO is specified, a second thread is used to 
  367. handle the I/O interrupt, and that thread is given an interrupt boost.   
  368.  
  369. Idle class is the other priority class that exists in OS/2. This priority level runs only 
  370. when nothing else in the system wants to run. Threads in this class will not receive 
  371. any of the state boosts. If DOS and/or Windows applications are being run, then you 
  372. should avoid the use of threads that run in idle class because they may never run but 
  373. will take up system space.
  374.  
  375. Now let's look at specific things in the CONFIG.SYS file that you can change to affect 
  376. the performance of your system. First we cover those statements that you should NOT 
  377. modify unless you have a system which has a special use, such as a process control 
  378. system. An example would be a system used to monitor a manufacturing machine or 
  379. chemical process, where timing and response time are critical factors.  
  380.  
  381. PRIORITY_DISK_IO=YES 
  382.         This allows the application that has screen focus to receive a priority boost when 
  383.         it's disk operation is complete. This applies to the first time slice given to the thread 
  384.         after the disk operation is complete. After the time slice, the state is reset for the 
  385.         thread and the priority boost removed.
  386.  
  387. MEMMAN=SWAP,PROTECT
  388. Allows OS/2 to swap program instructions and data to disk when more memory is 
  389. needed than is physically available in your computer. If you do not specify SWAP, 
  390. you will need enough physical memory in you computer to hold all the program 
  391. instructions and data that OS/2 and your application needs to run. You do not pay 
  392. a penalty by specifying SWAP and then not needing to use it.  
  393.  
  394.         The PROTECT parameter allows Dynamic Link Libraries ( DLL) to allocate  
  395.         protected memory. Protected memory is memory that is protected from being       
  396.         accessed by unauthorized programs.  
  397.  
  398. You can also specify a COMMIT parameter. This forces the system to ensure that 
  399. enough physical memory or swap file disk space is available for a memory object 
  400. when it is created. Normally, OS/2 commits physical and disk memory when the 
  401. page of memory is actually touched. Specifying this parameter can significantly 
  402. increase the amount space your swap file uses on disk. You would usually only 
  403. specify COMMIT if you were developing applications or systems and wanted to 
  404. see what the maximum amount of memory and disk space that could be required 
  405. for your system.  
  406.  
  407. TIMESLICE=X,Y
  408.         This statement is not found in the CONFIG.SYS file after you install OS/2 but is 
  409.         sometimes recommended to be added. This was okay to add for OS/2 2.0, 2.1 or 
  410.         2.11 systems, but not for OS/2 Warp. In Warp, we dynamically modify a threads 
  411.         time slice based on actions that have occurred. For instance, if a thread took a 
  412.         page fault during it's time slice, we give it an extra time slice to process what is 
  413.         contained in the faulted page. We also give applications doing disk I/O extra time 
  414.         slices if the data they are reading is in the disk cache. When the TIMESLICE=   
  415.         parameter is used, none of these actions will occur. Instead, each thread will be 
  416.         given the minimum time slice of X, and its time slice will not be allowed to go 
  417.         beyond value Y. 
  418.  
  419. PRIORITY=DYNAMIC
  420. If DYNAMIC is not specified, then each thread will only run at the priority that has 
  421. been assigned to it by the developer of the code. None of the priority state boosts 
  422. described earlier will be applied.
  423.  
  424. DEVICE=C:\OS2\BOOT\VDISK.SYS
  425.         This statement allocates a virtual disk in your computers physical memory. It is 
  426.         used for quick access to often-used files and programs. This was good for a DOS 
  427.         environment where the extra memory in your computer was not used by DOS, but 
  428.         OS/2 uses this memory, and your performance can be adversely affected if a      
  429.         VDISK is used.  It is much better to increase the size of the disk cache if you have 
  430.         unused physical memory than it is to use VDISK.  
  431.  
  432. Now let us look at statements in CONFIG.SYS which you should change to help 
  433. improve the performance of your Warp system.  
  434.  
  435.  
  436.  
  437. LIBPATH= 
  438.         
  439. This tells the system where to find DLL files and printer device drivers that Warp 
  440. and applications use. Place the directory names in order of usage. The most 
  441. accessed directory should be first, the least used last.  If possible,  place the DLL 
  442. used by a program in the same directory as the working directory when the 
  443. program is running. Then, you do not need to add that directory to the LIBPATH 
  444. statement.  Also, place all directories that are on a network at the end of your 
  445. LIBPATH  statement in case the network goes down and they cannot be accessed. 
  446. When you try to access a network drive that is not active, you will have to wait for 
  447. an error time to occur before processing can continue. This can be as much as 15 
  448. seconds or longer. See the discussion of dynamic LIBPATH support later on in this 
  449. paper for additional considerations when accessing network drives.  
  450.  
  451. SET PATH=
  452.         
  453. PATH is used to specify where Warp searches for executable program files, EXE, 
  454. COM, CMD, BAT, etc.  Place the directories in order of most used first, least used 
  455. last. If programs will be executed from an object on your desktop or folder, specify 
  456. the path there and not in the PATH statement. Only place directories in the PATH 
  457. statement for executable files that will be called from other programs, commands 
  458. interpreters or command line interfaces..  
  459.  
  460. SET DPATH= 
  461. The same principle applies to DPATH as PATH and LIBPATH.  For resources that 
  462. applications use, place the most used directories first and the least used last. 
  463. DPATH is used to define the search path for finding data files.  
  464.  
  465. BUFFERS=90
  466.         Buffers are physical memory used to support partial sector reads and writes in a 
  467.         FAT file system environment.  They are also used to cache FAT directory entries 
  468.         and for swap file disk I/O.  Because BUFFERS are used to cache FAT directory 
  469.         entries, this number should not be reduced below 60, unless you are not using the 
  470.         FAT file system on your disks.  Reducing this number will increase the number of 
  471.         disk reads that are done to the FAT directory entries and therefore slow down your 
  472.         system.
  473.  
  474. MAXWAIT=3
  475.         This specifies the maximum amount of time that a thread will be in a ready-to-run 
  476.         state without receiving a time slice to run in.  After this time expires, the thread 
  477.         will be given a boost in priority so it gets a chance to run.  Reducing this value to 2 
  478.         may help in systems where there are a lot of programs running, or multiple      
  479.         separate DOS/Windows programs running. Reducing it to 1 on systems where 
  480.         there is swap activity taking place can slow down the system.  
  481.  
  482.  
  483.  
  484.  
  485. DISKCACHE=D,LW,t,AC: 
  486. This is used to specify the amount of physical memory set aside to cache data that 
  487. is being read from or written to disk partitioned that are formatted for FAT. When 
  488. Warp see "D"  specified in the DISKCACHE statement it will allocate a disk cache 
  489. size from 48K to 4MB, based on the amount of physical memory you have in your 
  490. system.  If you have more than 8 MB in your system, D will cause 10% of your 
  491. system's physical memory to be used for the FAT disk cache. Instead of specifying 
  492. D in the DISKCACHE statement, you should change it to the actual amount of disk 
  493. cache space you require. If you have a system where your programs do not do 
  494. much disk I/O or where your memory is being used up by your applications, you 
  495. may want to set this value to 128.  Also, reduce this value if you are using the DB/2 
  496. product or any other product that provides its own disk data caching.  If you have 
  497. system that has lots of memory, then you can specify a number bigger than 4MB. 
  498. The maximum allowed is 14.4 MB. 
  499.  
  500. The t parameter is not defined in the default CONFIG.SYS file. It defines the   
  501. cache threshold for records that go into the cache.  The default value is 4. This 
  502. means that any record that is 4 sectors or less will go into the cache, while those 
  503. greater than 4 sectors will not. If your disk cache size is 128K or larger, add this 
  504. parameter to the disk cache statement.  If known, set this value to the largest 
  505. record size used. Otherwise, set the value to 32. The range can be from 2K ( 4 
  506. sectors) up to 64K. I chose 32 because it is a good starting point and is big enough 
  507. to handle most applications and program executable files.  
  508.  
  509. The LW parameter activates the Lazy Write or write behind feature. This allows the 
  510. application to get control back before the data is actually written to disk.  A 
  511. separate thread will write the data from the cache to the disk when necessary or 
  512. opportune to do so.  You should always use this option, and code your applications 
  513. to open files with a cache bypass option if disk data security is imperative. 
  514.  
  515. The AC: parameter is used to specify which FAT directories should be checked at 
  516. system boot time to see if they were left in a unpredictable state when the system 
  517. was last powered off. This usually occurs when the power is lost to your machine 
  518. and you had not done a Shutdown or Ctrl-Alt-Del key sequence prior to losing 
  519. power. The disk directories specified here will have CHKDSK run against them to 
  520. clean up any lost files or abandoned clusters. 
  521.  
  522. SWAPPATH=d,r,s
  523. SWAPPATH specifies where code and data pages are swapped to on disk when 
  524. more physical memory is needed than is available in your system.  The d 
  525. parameter represents the path where your SWAPPER.DAT file is located.  For 
  526. systems which have multiple partitions or multiple disks, this should be placed on 
  527. the most used directory of the least used disk.  Also, try to physically locate the 
  528. swap file on the disk based on its usage. If you are doing a lot of swap activity, 
  529. place the swap file at the start of the disk.  If is it rarely used, place it at the end.  
  530.  
  531. The s parameter specified the size that the swap file is initialized to when you start 
  532. your Warp system.  Make this large enough so that it does not have to grow in size 
  533. while you are running your programs. You should perform your normal computer 
  534. functions and look at the size of the swap file when you have the most activity. 
  535. Then set the value of the s to this size in the CONFIG.SYS file.  If you are using 
  536. the FAT file system, IPL your system under DOS, delete the SWAPPER.DAT file, 
  537. defragment the disk partition where the swap file will be located, and then  IPL your 
  538. OS/2 system. This should keep your swap file from getting fragmented.  
  539.  
  540. The r parameter specifies the amount of free space that must be in the swap file's 
  541. drive. The default for this value is adequate and only needs to be changed if you 
  542. want to be warned earlier about a possible out-of-memory situation.  
  543.  
  544. THREADS=
  545. THREADS defines how many threads the system will be able to use.  One page of 
  546. resident memory is need for approximately every 32 threads that are defined. This 
  547. memory will be allocated at the time the system is booted.  As a minimum, you will 
  548. need 80 threads to support the base Warp system and 3 or 4 OS/2, DOS and or 
  549. Windows applications.  The system will support up to 64000 threads, but typically 
  550. you will not have enough memory in your system to support more than 300 to 500 
  551. threads.  18 threads are required for LAN Server 4.0, and 12 for Personal 
  552. Communications/3270.  You will need an additional 2 threads for each Personal 
  553. Communications/3270 session that is started.  
  554.  
  555.         To calculate the number of threads that you will need in your system, use the   
  556.         formula 54+(2xN)+10 where N is the number of programs that you will run 
  557.         together. If the program requires more than 2 threads, add in the additional    
  558.         threads.  This will insure that you have enough threads in most cases.
  559.  
  560. To determine how many threads you are using at any given time, run the PSTAT 
  561. command from an OS/2 command line. This will show all of the processes that are 
  562. running on your system, as well as how many threads each process is using. The 
  563. output is quite long, so you may want to redirect it to file. 
  564.  
  565. Additional CONFIG.SYS Considerations
  566.  
  567. You should only install the devices drivers that your programs actually need to run.  
  568. Do not install extra communication, printer, video or device drivers if they will not be 
  569. used.  Below are a list of device drivers and virtual device drivers that are normally 
  570. found in CONFIG.SYS and that may not be needed.  ( Virtual device drivers are used 
  571. to support DOS and Windows applications and usually have a V at the beginning of 
  572. their name.) 
  573.  
  574. VEMM.SYS Used to support Expanded Memory use in DOS and Windows programs.  
  575.  
  576. VXMS.SYS Supports Extended Memory in DOS and Windows applications.  
  577.  
  578. VDPMI.SYS Supports the DPMI memory access and is required to support all        
  579.         Windows applications.  
  580.  
  581. VW32S.SYS Supplies support for the WIN32S Windows APIs.  Not needed for 
  582.          Windows programs that do not use WIN32S APIs.  
  583.  
  584. IBMxFLPY.ADD x will be either a 1 or a 2. 1 is used for family 1 machines and 2 is 
  585.         for MCA ( Micro-Channel Architecture ) machines.  You do not need both.  
  586.  
  587. XDFLOPPY.FLT This is required for reading diskettes which are written using  the 
  588.         XDF ( Extended Disk Format ) format.  These are usually OS/2  and PCDOS 7 
  589.         installation diskettes, printer and video driver diskettes and possibly CSD diskettes. 
  590.         The Warp Install and Disk 1 diskettes do not use the XDF format.  
  591.  
  592. COM.SYS and VCOM.SYS are only required if you will be doing serial or async      
  593.         communications.  
  594.  
  595. If you use the selectable CONFIG.SYS option in the Archive and Retrieve feature of 
  596. Warp, it is possible to create multiple CONFIG.SYS files which will contain different 
  597. device drivers based on your needs.  For example, you could create one 
  598. CONFIG.SYS file that is used for maintenance and installation.  This one would 
  599. include the XDFLOPPY.FLT and both IBMxFLPY.ADD drivers plus additional threads.  
  600. Another CONFIG.SYS used for normal processing could have these device drivers 
  601. removed and a lower number of threads.  When maintenance has to be applied to the 
  602. system, or some additional new products installed, you could boot the machine with 
  603. the Archive and Retrieval menu active and select the proper CONFIG.SYS to be used. 
  604. An extension of this would be to archive the CONFIG.SYS and the OS/2 INI files and 
  605. select those to apply maintenance.  
  606.  
  607. System Settings  
  608.  
  609. Let's look at some of the System Settings and Desktop settings that can be tuned to 
  610. improve a system's performance.  In the System Setup Folder there are many utilities 
  611. that are available. 
  612.  
  613. Spooler: 
  614. The drop-down menu of the Spooler Icon in the System Setup folder,  provides an 
  615. option to disable the spooler. This can be done without problems when only one job 
  616. will be active on your printer at a time. This will save a little bit of memory and one 
  617. process and thread in your system. If you have a dedicated print spool machine, then 
  618. you should raise the priority of the spooler to it's highest point. For non-dedicated print 
  619. spool systems, the priority should remain at the default. You would only increase this if 
  620. (for example) you raised the subpriority of a DOS session and wanted to print 
  621. documents while running the DOS session.  In this case, you would want to make the 
  622. priority of the print spooler the same as the DOS session.  
  623.  
  624. Schemes and Color Pallet:
  625. You should use solid colors and  avoid the use of bitmaps for desktop and folder 
  626. backgrounds. These particular options use more memory and require more processing 
  627. time to display them.  
  628.  
  629. Sounds:
  630. Deselect the System Sounds options, unless you like the noises when opening and 
  631. closing your folders. It costs between 250 and 300K in working set just to hear the 
  632. noise.  An additional 40K or so of working set can be saved by executing 
  633. DINSTSND.CMD in an OS/2 command session.  This will unhook the system sounds 
  634. from the OS/2 desktop. To get them back, you would execute INSTSND.CMD.  
  635.  
  636. Font Palette: 
  637. Only install the fonts that you will actually use in your system.  Also, try not to mix fonts 
  638. in folders or on the OS/2 Desktop.  If you do, you will be using extra memory. Outline 
  639. fonts tend to be a little smaller in terms of memory than bitmap fonts and once they 
  640. are in the cache, they perform just as fast.  
  641.  
  642. WIN-OS/2: 
  643. When defining a Windows program, select common sessions and make DDE and 
  644. Clipboard support both private.  If floating-point is used in your Windows applications, 
  645. use the enhanced run mode for Windows. This can give as much as a 20% gain in 
  646. performance.  Also, if you have a Windows application that you always run, it  is better 
  647. to start it via the Startup Folder than to use the Fast Load option and start it from the 
  648. Desktop.  When you migrate windows applications, install or add Windows programs 
  649. to you system, ensure that the run mode for these is the same as the common session 
  650. run mode.  If run modes are different, then you will have two separate Windows 
  651. sessions running even though you stated that a common session is to be used.  If you 
  652. get errors such as unable to allocate buffers or other resources when using a common 
  653. session, try using enhanced run mode for that session if is standard. This will usually 
  654. clear up these when there is enough system memory available.
  655.  
  656. System Setup: 
  657. Disabling the Animation and Print Screen option can save a little in code path, number 
  658. of program instructions executed,  and memory.  Setting the System Logo option to 
  659. none can save some time when loading applications that check this parameter to see 
  660. how long to display their applications logo.  The type-ahead option will use a little more 
  661. memory.  When selecting screen resolutions, remember that the higher the resolution, 
  662. the more memory that is used.  Very high resolution and color support can require 100 
  663. to 200K of physical memory.  
  664.  
  665. Mouse 
  666. Mouse pointers are basically bitmaps. The amount of memory used will be affected by 
  667. which mouse pointer style you choose. If you activate the comet cursor, this will cost 
  668. additional memory and processing time whenever the mouse is being used.  
  669.  
  670. Desktop Settings: 
  671. Desktop settings are selected by choosing the Settings option on the Desktop menu.  
  672. Choosing Automatic Lockup will cause extra code path and processing time to occur.  
  673. Normally this is very minimal, until the timeout value expires.  Then you are looking at 
  674. about 40 to 50K of working set.  
  675.  
  676. If you select Create Archive on system restarts, this will slow down your system's boot 
  677. time.  You want to set this option only when you have changed your desktop and/or 
  678. configuration and want to save it.  Once it has been saved, turn this option off.  You 
  679. can get to the Archive Retrieve menu screen when you boot your machine by using 
  680. the ALT+F1 key sequence.  
  681.  
  682.  
  683. Conclusion
  684.  
  685. All the bells and whistles, neat features, applications and devices come at a cost. 
  686. They all cost disk space, they all use memory, and they all have the potential for 
  687. slowing your system down.  To minimize this, plan ahead.  Decide what the system 
  688. will be used for and what your future uses will be. Then, set up the system 
  689. accordingly. Install only the things that you are actually going to use and need. Ensure 
  690. that there is a match between the software you install and the hardware you install it 
  691. on. If an application or feature cost more memory than you have, either don't install the 
  692. feature, or get more memory for your system. Finally be creative and logical. You can 
  693. set the system up with different configurations and different support, defined to 
  694. optimize performance based on the particular functions you perform and applications 
  695. you use. Become aware of what Warp has to offer and use it to your advantage.
  696. Appendix A:
  697.  
  698. The memory measurements results presented here are for planning purposes only. 
  699. There is no guarantee, implied or otherwise, that you will reproduce these numbers 
  700. exactly on any other system.  Measured results will change based on the hardware 
  701. configuration of your computer, and what software is installed in the system. If the 
  702. hardware or software configuration changes, the results will also change. 
  703.  
  704. All numbers are presented in megabytes of memory unless otherwise noted and 
  705. indicate all  the physical memory that is used to execute a given function. This 
  706. includes data, the Warp operating system and programs..
  707.  
  708. All measurements were made on a PS/2 A21, with 26MB of memory, VGA video, 
  709. ESDI disk, mouse, keyboard and 16/4 Token Ring adapter.  HPFS and Multimedia 
  710. support were not installed in the base system.  The CONFIG.SYS file was modified to 
  711. be equivalent to how it would look on a 4 MB system. DISKCACHE=48, 
  712. THREADS=96, and no IFS statement for HPFS.
  713.  
  714. Memory Requirements:
  715.  
  716.   Function                      OS/2 Warp               OS/2 Warp
  717.                         For WIndows     With WIN-OS/2
  718.  
  719. Open System Folder           3.6 MB                    3.7 MB
  720. Open Command Prompts         3.5               3.6
  721. Start a DOS Session          4.5               4.6
  722. Exit the DOS Session         4.3               4.3
  723. Start a Windows Session      6.3               6.0
  724. Exit the Windows Session     5.3               5.3
  725. Open Productivity Folder     3.5               3.6
  726. Start Enhanced Editor        4.5               4.6              
  727.  
  728.  
  729. The numbers for DOS and Windows sessions are for full-screen sessions and 
  730. therefore include the working set memory for switching back to the Warp Desktop to 
  731. stop the measurement process.  Following are numbers for starting a DOS session in 
  732. a window and the Windows PROGMAN support in a window, also referred to as a 
  733. seamless session.  
  734.  
  735.   Function                      OS/2 Warp               OS/2 Warp
  736.                         For WIndows     With WIN-OS/2
  737.  
  738. Open DOS Window Session              4.16 MB                  4.15 MB
  739. DIR Command in DOS Window            3.00                     3.00 
  740.  
  741. Windows Session with Standard Run Mode and Public DDE and Clipboard Support
  742.  
  743. Start PROGMAN        6.17 MB                  5.84 MB
  744. Open Folder Main     3.51                     3.50 
  745.  
  746. Windows Session with Enhanced Run Mode and Private DDE and Clipboard Support
  747.  
  748. Start PROGMAN        5.86 MB                  5.69 MB
  749. Open Folder Main     3.39                     3.35
  750.  
  751. The above numbers show that how you set up your session can have a significant 
  752. impact on the amount of memory used.
  753.  
  754. All above numbers are the amount of total memory used for the particular function.
  755.         
  756.  
  757. The next series of numbers shows how much memory is required when the particular 
  758. support is is installed or activated on your system. These number are presented as 
  759. Kilobytes ( KB ) in size.  For example, Save Desktop costs 300KB in working set 
  760. memory. So, if the desktop was being saved while the System folder was being 
  761. opened, 3.9 MB of memory would be required instead of 3.6. The numbers below are 
  762. in addition to those above.
  763.  
  764. Support         Additional Working Set Memory
  765.  
  766. Multimedia
  767.                 Device Drivers           50 KB
  768.                 Desktop Folder and Objects      100 
  769.                 System Sounds           40 - 300   ( Inactive - Active )
  770.  
  771. Save Desktop                    300 
  772.  
  773. HPFS                    200 - 400  ( No HPFS Partition  
  774.                                                   Defined, and 64 K cache )
  775. XDF Support                      50 
  776. Personnel Communications 3270
  777.                 Support not started     <20 
  778.                 Support active
  779.                       Minimum           300  ( Single session and does not
  780.                       Maximum           450     include connection protocol )
  781. TCP/IP                  500  ( Base support )
  782.         This is for the Device Drivers that are installed with the BonusPak.
  783.  
  784. Lan Requester 4.0               1 MB
  785.                 Device Driver and Setup 700 KB 
  786.                 Requester Active300 
  787.  
  788.                 Default install for Token Ring including LAN Messaging support.
  789.  
  790. STACKER 4.0                     150 KB
  791.  ( Stack Storage and Communications, San Diego, Ca.)
  792.