OS/2 eZine - http://www.os2ezine.com
Spacer
June 16, 2003
 
Bas Heijermans has been using computers for 24 years - since he was 12. Bas lives in Belgium and has used OS/2 since version 1.1. He ran The OS/2 BBS and was the Belgium OS/2 Fido moderator. IBM awarded him Official OS/2 Ambassidor in 1992 for his support efforts. Today he repairs computers for a living.

If you have a comment about the content of this article, please feel free to vent in the OS/2 eZine discussion forums.

There is also a Printer Friendly version of this page.



Spacer
Previous Article
Home
Next Article


Do you have an OS/2 product or service you'd like to advertise?


OS/2 is Boring, Number 11

This month I want to talk about filesystems and in particular HPFS386. I have tried about all of them, FAT, FAT32, HPFS, HPFS386, JFS, EXT2, you name it.


FAT was original designed for floppy, and it shows as it has many speed problems. In the beginning of DOS people only used floppies and the filesystem was FAT12, as harddisks appeared in time, they needed a filesystem to use on it, so they started with FAT12 on them. But drives got bigger, so they needed to extend it to FAT16 to get above the first 30MB drive size. So FAT16 was introduced but again a new barrier arise 2GB and they introduced FAT32.

FAT32 is able to use very big harddisks but is still the very old floppy filesystem. The biggest problem with FAT is fragmentation, as this gives you a big speed slowdown, the harddisk head needs to look all over the drive to find pieces of files, with heavy fragmentation this needs to be done a lot and costs too much time.

Another problem is the cluster size that grows with enlarging the partition, e.g. a 1 byte file would take e.g. 16KB on the disk if you have a clustersize of 16KB. This means you lose a lot of space on the harddisk for nothing.

Then IBM and Microsoft invented a new filesystem, HPFS! This filesystem has the directory in the middle of the disk and is as fragmentation proof as it can be. I won't go into too much detail, but the distance to get to a file is always less then 1/2 of the disk, this gives a speed gain over FAT of about 5 times as fast.

I have tested JFS, looks a nice filesystem, but beware, I tried to defrag it after a while and it crashed and costed me 15GB of data. And the speed isn't much better then HPFS. So I switched back to HPFS after this happened, but I wanted more speed, as both JFS and HPFS seemed a bit slow on 64GB partitions. Then I decided to give HPFS386 another go, I tried it in the past, but it wasn't (at that time) stable enough, for me that is. I want 100% stability and don't like to shutdown my server for any reason.

I ripped the files from my Warp Server 4 SMP and started to install it in WSeB. Once you have HPFS386, The first thing you need to do is edit the config.sys and add this:

IFS=c:\IBM386FS\HPFS386.IFS /A:*
RUN=c:\ibm386fs\cache386.exe

You add the C:\IBM386FS to your path, libpath and dpath. Remove the Earlymeminit statement from your config.sys if you have set that one, if you don't, the system will crash! Leave the original HPFS.IFS line just after the HPFS386 lines, just in case you made a mistake and it doesn't load, then it will still load the original driver. After it runs just fine, you can REM the HPFS.IFS line. :-) Then put all the HPFS386 files in the IBM386FS directory, you don't need all, but putting them all there should work just fine.

Then edit the HPFS386.INI to something like this:

;==============================================================================
; This file contains the initialization parameters for the 386 HPFS. The
; parameters are grouped into components. The component groups start with the
; component name enclosed in square brackets. Each component name appears on
; a line by itself (a comment is allowed). The components include the
; following:
;
; [filesystem] ; General file system parameters
; [lazywriter] ; Lazy writer parameters
; [DASD_Limits] ; DASD Limits parameters
; [UltiMedia] ; UltiMedia parameters (added when LAN Server Ultimedia
; ; is installed)
;
; General rules:
; - The component names and parameters are not case-sensitive. They can be
; entered in upper case, lower case, or a mixture of upper and lower case.
; - Wherever a blank appears in the syntax for a parameter, it can be left out
; or additional blanks can be added. For example, the following syntaxes
; are all valid:
; parameter = yes
; parameter=yes
; parameter= yes
; - Any text after a semicolon (;) up to the end of the line is treated as a
; comment.
; - All components and parameters are optional. If you do not specify a
; parameter, the 386 HPFS uses a default setting for the parameter.
;==============================================================================
[filesystem]
useallmem = YES
lanroot = C:\IBMLAN
cachesize = 16384
;------------------------------------------------------------------------------
; The [filesystem] section specifies general file system parameters. If you
; make any changes to these parameters, they do not take effect until you
; reboot the system.
;
; useallmem = [yes|no]
; This parameter specifies whether the 386 HPFS should use memory above the
; 16M boundary, provided this system is configured with more than 16M.
; Some adapters, for example the IBM Token Ring Busmaster Server/A, cannot
; do direct memory access (DMA) to memory above the 16M boundary. If you
; have a LAN or disk adapter that cannot do DMA to memory above the 16M
; boundary, the 386 HPFS must use only memory below 16M so that the adapter
; can put data into the file system buffers. Set useallmem to yes if all
; of your adapters can access memory above the 16M boundary. Set useallmem
; to no if any of your LAN or disk adapters cannot access memory above the
; 16M boundary. If useallmem is not specified, the default setting is no
;
; cachesize = nnnn
; This parameter specifies how many kilobytes of memory the 386 HPFS should
; claim for its cache. The cache size must be a minimum of 256KB. The
; maximum value is determined by the size of available memory. If
; cachesize is not specified, the default is to use 20% of available
; memory, if the amount of available memory is below 20MB, or 60% of
; available memory, if the amount of available memory is 20MB or more.
;
; maxheap = nnnn
; This parameter sets a limit on the size of the heap. nnnn is the maximum
; number of kilobytes to which the heap can grow. The 386 HPFS allocates
; heap memory as needed. If this parameter is used, the 386 HPFS only
; allocates memory for the heap up to the amount specified. If this
; parameter is not used, there is no limit on the heap size. Use this
; parameter only if you need to reserve memory on the system for other
; applications that may be running. The minimum value is 64KB. The
; maximum value is determined by the size of available memory minus the
; size of the cache. If maxheap is not specified, the default is to have
; no limit on the heap size.
;
; lanroot = d:\path
; This parameter specifies the drive and path of the directory for the LAN
; Server software. The installation program fills in this parameter for
; you. You do not need to change this parameter.
;
; fsprealloc = nn
; This parameter specifies how many big buffers to allocate when the file
; system is initialized. If neither fsprealloc nor srvprealloc are used,
; the file system allocates big buffers as needed. The allocation of big
; buffers can take a little time. Allocating the big buffers at
; initialization improves the performance of the first requests that need
; big buffers. The buffers are not freed until the system is shut down.
; The minimum value for fsprealloc is 2. The maximum is 64. If both
; fsprealloc and srvprealloc are specified in this file, fsprealloc is used
; and srvprealloc is ignored.
;
; srvprealloc = nn
; This parameter specifies how many big buffers to allocate when the server
; is started rather than when the file system is initialized. This
; parameter, like the fsprealloc parameter, can improve the performance of
; the first requests that need big buffers. The buffers are freed when
; the server is stopped. The minimum value for srvprealloc is 2. The
; maximum is 64. If both fsprealloc and srvprealloc are specified in this
; file, fsprealloc is used and srvprealloc is ignored.
;------------------------------------------------------------------------------
[lazywriter]
lazy = *: ON
maxage = *: 5000
bufferidle = *: 500
;------------------------------------------------------------------------------
; The [lazywriter] section specifies settings for the lazy writer. If you
; make any changes to these parameters, they do not take effect until you
; reboot the system. You can use the CACHE386 program to change the internal
; setting of these parameters while the system is running. When you reboot
; the system, the parameters are set to the values in this file.
;
; lazy = [drives:] on|off
; This parameter specifies whether the lazy writer is to be turned on or
; off for the specified drives. The [drives:] can be a series of drive
; letters. For example, "lazy = cdfg: on" would turn on the lazy writer
; on drives c:, d:, f:, and g:. It would not change the settings for drive
; e: or h:. An asterisk (*) can be used for the drive letter to indicate
; that all drives are to have the setting. This line can be used multiple
; times to achieve the settings you want for your drives. If lazy is not
; specified, the default value is to turn the lazy writer off for all
; drives.
;
; maxage = [drives:] nnnn
; This parameter specifies the maximum number of milliseconds that can pass
; before the lazy writer writes the contents of a buffer to the disk. The
; [drives:] can be a series of drive letters. For example,
; "maxage = cdfg: 5000" would set the maximum buffer age to 5000ms on
; drives c:, d:, f:, and g:. It would not change the settings for drive e:
; or h:. An asterisk (*) can be used for the drive letter to indicate that
; all drives are to have the setting. This line can be used multiple times
; to achieve the settings you want for your drives. The minimum value is
; 0. The maximum value is 1000000. If maxage is not specified, the
; default value is 10000 for all drives.
;
; bufferidle = [drives:] nnnn
; This parameter specifies the maximum number of milliseconds during which
; a buffer is not used before the lazy writer writes the buffer contents to
; the disk. The [drives:] can be a series of drive letters. For example
; "bufferidle = cdfg: 500" would set the buffer idle time to 500ms on
; drives c:, d:, f:, and g:. It would not change the settings for drive e:
; or h:. An asterisk (*) can be used for the drive letter to indicate that
; all drives are to have the setting. This line can be used multiple times
; to achieve the settings you want for your drives. The minimum value is
; 0. The maximum value is 500000. If bufferidle is not specified, the
; default value is 1000 for all drives.
;------------------------------------------------------------------------------
[DASD_Limits]
ThreshAlertNames = *: ADMINS
ThreshAlertDelay = *: 10
ThreshAlertUser = *: yes
DirFullAlertNames = *: ADMINS
DirFullAlertDelay = *: 10
DirFullAlertUser = *: yes
;------------------------------------------------------------------------------
; The [DASD_Limits] section specifies settings of parameters for the DASD
; Limits function. If you make any changes to these parameters they do not
; take effect until you restart the server. (To stop and restart the server
; at an OS/2 command prompt, enter the command "net stop server" and then the
; command "net start server".)
;
; ThreshAlertNames = [drives:] [user1] [user2] [group1] [group2] ...
; This parameter lists the users or groups that are to be notified when a
; DASD Limits threshold is crossed on the specified drives. Any mixture of
; user names or group names can be used. All of the names must appear on
; one line. This line can be used multiple times to achieve the settings
; you want for your drives. If ThreshAlertNames is not specified, the
; default is to have no user or group names.
;
; ThreshAlertDelay = [drives:] nn
; This parameter specifies how many minutes to wait before sending another
; alert for a threshold that was previously crossed on the specified
; drives. If a threshold is crossed more than once within the delay
; period, an alert is sent only for the first occurrence. An alert is sent
; if a higher threshold is crossed during the delay period. This parameter
; is used to cut down on the number of alerts that can be generated when
; there is a lot of disk activity and the disk size is within the
; threshold. This line can be used multiple times to achieve the settings
; you want for your drives. If ThreshAlertDelay is not specified, the
; default is 10 minutes on all drives.
;
; ThreshAlertUser = [drives:] yes|no
; This parameter specifies whether to send an alert to the user whose disk
; usage caused a threshold to be crossed on the specified drives. This
; line can be used multiple times to achieve the settings you want for your
; drives. If ThreshAlertUser is not specified, the default is yes for all
; drives.
;
; DirFullAlertNames = [drives:] [user1] [user2] [user3] ...
; This parameter lists the users or groups that are to be notified when a
; DASD limit is reached. Any mixture of user names or group names can be
; used. All of the names must appear on one line. This line can be used
; multiple times to achieve the settings you want for your drives. If
; DirFullAlertNames is not specified, the default is to have no user or
; group names.
;
; DirFullAlertDelay = [drives:] nn
; This parameter specifies how many minutes to wait before sending another
; alert for a DASD limit that was previously reached. If a DASD limit is
; reached more than once within the delay period, an alert is sent only for
; the first occurrence. This parameter is used to cut down on the number
; of alerts that can be generated when there is a lot of disk activity and
; the DASD limit is reached several times. This line can be used multiple
; times to achieve the settings you want for your drives. If
; DirFullAlertDelay is not specified, the default is 10 minutes on all
; drives.
;
; DirFullAlertUser = [drives:] yes|no
; This parameter specifies whether to send an alert to the user whose
; request failed because a DASD limit was reached. This line can be used
; multiple times to achieve the settings you want for your drives. If
; DirFullAlertUser is not specified, the default is yes for all drives.
;------------------------------------------------------------------------------

It's pretty much self explaining. The really cool part of HPFS386 is that it runs in Ring 0 !!! and not any higher ring like the others. And this shows, as it's way faster then JFS or HPFS. Another cool thing is that it speeds NetBIOS to unseen levels in speed, where JFS doesn't show anything that HPFS didn't show already.

Defragging is unheard of under HPFS, unlike JFS that does need it. I don't know if most know it, but the difference between Warp Server Entry (100 user) and Warp Server Advanced (1000 user) is only this driver!!!!!! (Speed wise:-)

HPFS386 is also able to use 16TB partitions just like JFS can. Try it, it's the fastest filesystem you can use, as your desktop will load a lot faster and your applications will also.

That's it from me this time, give it a shot, you will like it:-)

P.S. if you need more info, just type HPFS386 into Google and many helpful pages will show up. :-)

Previous Article
Home
Next Article

Copyright (C) 2003. All Rights Reserved.