ReOrg V1.1 Shareware disk optimizer English documentation (C) 1992 Holger Kruse Contents -------1. Conditions, Disclaimer 2. What is ReOrg ? - Short introduction 3. Hardware, Software needed; Installation 4. Usage 5. Technical details 6. Option file format 7. Program version, update info 8. Acknowledgements 1. Conditions, Disclaimer ------------------------ReOrg is shareware. The program may be freely distributed and copied, as long as the following conditions are fulfilled: - The sales price must not be higher than the cost of an (empty) disk plus a nominal copying fee plus costs for shipping. The total price must not be higher than 6 US$ or 10 DM. - All parts of the program and the documentation must be complete. The distribution of single parts is not allowed. - ReOrg or parts of it must not be sold in combination with or as part of commercial software. - Program and documentation must not be changed in any way. Exception (this means: acceptable is:) the use of archivers such as LHArc and packers like "Imploder" or "Powerpacker", as long as it is possible to retrieve the original program/data. I want to ask everybody, who uses ReOrg (except for one or two test runs), to send the amount of 10 US$ or 15 DM to the following address: Holger Kruse Ulzburger Str. 387-389 2000 Norderstedt Germany Please send only cash or eurocheques, do not send stamps, american bank checks, disks etc. Thank you very much in advance ! I will try and inform everybody, who as registered with me as described above, when a new version of ReOrg becomes available. Until the start of july '92, you can also reach me via electronic mail. My (Internet-)address is: hkr@mcshh.hanse.de I explicitly do not guarantee for the correct functioning of ReOrg. When you optimize disks, you always run the risk of a data loss, of a change of your data or of the destruction of your data. I explicitly reject any responsibility for these or any other consequences from the use of ReOrg whatsoever. This includes, but is not limited to, secondary consequences, personal injuries or other kinds on side effects. I hereby explicitly warn each user: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!! Optimizing a disk is always risky. !!! !!! I strongly recommend each user to backup !!! !!! or copy his disk completely before !!! !!! optimizing it. It is the user's !!! !!! responsibility to check his data for !!! !!! completeness and correctness after !!! !!! optimizing it. I explicitly reject any !!! !!! responsibility for damages or changes. !!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2. What is ReOrg ? - Short introduction --------------------------------------ReOrg is a disk optimizer, i.e. a program that improves the physical data layout on a floppy disk or harddisk, in order to speed up file and directory accesses. ReOrg removes some problems that are caused by AmigaDOS: - file fragmentation: When new files are created, it is possible that AmigaDOS can not store the file contents in one single consecutive block, because there is no such block available on the disk. In this case AmigaDOS sometimes scatters the file contents over the whole disk. ReOrg removes this problem by placing the contents of each file in a single consecutive block. - directory fragmentation: In contrary to other operating systems (e.g. MSDOS), AmigaDOS does not store directory data in a single consecutive block. This leads to weak performance for directory listings. ReOrg tries to store directory data as closely together as possible. This considerably speeds up commands like "dir" and "lists" and the directory display within file requesters. - differences in disk format: When you use disks under Kick1.2/1.3, which have been formatted under Kick2.04, directory accesses are often even much slower than usual. The reason for this is, that placement of "FileList"-blocks has been changed from Kick1.2/1.3 to Kick2.04. ReOrg has an option where to place "FileList"-blocks. This means you can optimize Kick2.04-disks for use with Kick1.2/1.3. ReOrg can be used with the following disk formats: - all currently available AmigaDOS filesystems, including - OldFileSystem (OFS: "DOS\0") - FastFileSystem (FFS: "DOS\1") - new (Kick2.0)-FileSystem (includes OFS and FFS) - International FileSystem (has been in ROM at least since Kick2.04 and will (possibly ?) be supported from the Shell in WB2.1: "DOS\2", "DOS\3") - All floppy disk and hard disk sizes are supported. However, to optimizer large hard disk partitions, you need a lot of memory. There is also another ReOrg Version (V2.1) available, that needs considerably less memory, but that can only be used under Kick2.04. - ReOrg supports "hard links" and "soft links"; however, "soft links" are not wholely supported by Commodore yet. Therefore, ReOrg only supports the (possibly preliminary) "soft link" implementation of Kick2.04. I can not guarantee that this version of ReOrg correctly handles "soft link" implementation of future AmigaDOS versions. - CAUTION: DYNAMIC Ram disks, like "VD0:" ((C) ASDG) must NOT be optimized by ReOrg. Optimizing such disks may lead to data loss ! - Of course, ReOrg can not optimize "RAM:". Anyway, this would not make much sense. - You CAN use ReOrg to optimize your resident, non-dynamical RAM-Disk "RAD:" ((C) by Commodore). - ReOrg has a one-disk-mode (optimize a single disk) and a two-disk-mode (optimize one disk while copying it to a different disk) In comparison to other disk optimizers available on the Amiga market, ReOrg is quite fast. Optimizing a 880 kB disk on a standard 68000 Amiga with 1 MB of free memory usually takes about 1:30 to 1:40 minutes. On a 68030 Amiga it takes only 1:20 to 1:30 minutes. Optimizing a 40 MB harddisk on a 68000 Amiga usually takes around 10 to 15 minutes, but this time depends very much on the amount of free memory, type of controller type of processor and the degree of disk fragmentation. If you use a 68030 Amiga and have enough memory available, the optimization time can be reduced to about 4 minutes. 3. Hardware, software needed; Installation -----------------------------------------To use ReOrg, you need an Amiga, Kickstart 1.2 or above and enough memory. If you have Kickstart 2.04, you should use ReOrg Version V2.1, because ReOrg V1.1 does not correctly support some of the new features of Kickstart 2.04 (e.g. High-Density disk drives). ReOrg V1.1 is only meant to be a temporary solution for those who do not have Kickstart 2.04 yet. The amount of memory you need is approximately: 220 + 17 + 5 + 150 kB (needed for the program itself) kB for each MB of disk size * tracksize of your disk kB which are usually not used by ReOrg, but must be left to avoid low-memory situations. (For large partition sizes and much memory available, this number may become higher) Examples: 1) 880 kB floppy disk: (11 sectors/track) 220 kB + 15 kB + 28 kB + 150 kB --------413 kB (17 kB * 880/1024) (11/2 kB * 5) 40 MB harddisk: (32 sectors/track) 220 kB + 680 kB + 80 kB + 150 kB --------1130 kB (17 kB * 40) (32/2 kb * 5) 200 MB hard disk: (32 sectors/track) 220 kB + 3400 kB + 80 kB + 150 kB --------3850 kB (17 kB * 200) (32/2 kB * 5) These numbers are only rough approximations to give you an idea how much memory you need. Actually for large partition sizes, ReOrg allocates most of your memory as a cache. This cache is the main reason why ReOrg is so fast. For optimum speeds, the cache should have at least 2 percent of the size of your partition. There is no installation required for ReOrg. In addition to the program file "ReOrg", you do not need any libraries, fonts etc. 4. Usage -------ReOrg can be started only from Shell. Valid options are: - "-f" This option specifies if the destination disk is to be formatted. - "-f0" Do not format the destination disk. For all disk writes CMD_WRITE is used. (This only works if the destination disk has been formatted previously; default in one-disk-mode) - "-f1" Only used tracks are formatted on the first write access. - "-f2" All tracks of the destination disk are formatted (necessary, if the destination disk has not been formatted before; default in two-disk-mode) - "-v1" / "-v0" If option "-v1" is used, ReOrg checks if data is written correctly (verify). This slows down the optimization. - "-w1" / "-w0" "-w0" deactivates Workbench mode. If Workbench mode is activated, Workbench icons will appear faster after optimization. - "-ofilename" You can specify the name of an option file with this option. Option files allow the user to specify, that certain files should be treated by ReOrg in a different way. The format of the option file is described below. - "-e" Specifies where FileExt blocks are stored. For a detailed description: See "5. Technical details" - "-p" Specifies where file contents are stored. For a detailed description: See "5. Technical details" - "-d1" / "-d0" Normally, ReOrg increments the disk creation data during optimization. This is necessary to prevent ReOrg from mixing up the old disk with the new, optimized disk. If option "-d0" is used, ReOrg does not change the disk creation date. Caution: If you use option "-d0", under certain circumstances your Amiga might crash after the optimization ! - "-NOWRITE" If you use this option, ReOrg does not write the optimized data back to disk. This means, the optimization is only "simulated". This is useful to find out if ReOrg will issue error messages during the actual optimization. - "-m" You can use this option to specify the amount memory that ReOrg should NOT use as cache. Default is 150000 Bytes, but you can reduce this value to 50000. Or you can increase the value as high as you wish, if you want to spare some of your memory for other programs. Values smaller than 50000 are not allowed, because otherwise there might not be enough memory left when an error occurs. - "-s" ReOrg stores large files in a seperate area on your disk to speed up the access to directory data. However, small files are usually stored within the directory area to speed up the access to those files. This does not affect the speed of directory accesses very much. With the "-s" option you can specify the maximum size of files (in blocks), that should be stored within the directory area (default=2). Large values slow down the directory access ("dir", "list"); small values slow down the access to small files. When you optimize boot disks (e.g. for games), larger values can be useful. - Drive [ TO Drive ] You can specify one drive or two drives. If one drive is specified, ReOrg uses one-disk mode. If two drives are specified, ReOrg uses two-disk-mode. When the optimization is started, ReOrg first prompts the user to insert the disk(s). After that, a status window appears and ReOrg starts reading and processing the disk directory. During this phase (status = "scanning disk"), ReOrg may be interrupted at any time even in one-disk-mode by pressing Ctrl-C. At the end of this phase, ReOrg once again asks the user to confirm that the disk should be optimized. You must type "yes" to start the optimization. A simple "return" is not enough. That way, you do not accidentally start an unwanted optimization. In one-disk-mode, ReOrg must not be interrupted or canceled after this message, or your disk will be corrupt. During the actual optimization (status = "moving blocks") ReOrg shows how much time the optimization will approximately need. This display is regularly updated. After this phase has been finished, in two-disk-mode ReOrg may format unused tracks on the destination disk and copy reserved sectors to the destination disk. After that, ReOrg asks the user to remove the disk(s). Finally, ReOrg shows some statistical information about the disk and the optimization. During the optimization, the status window show the following information: - The number of directories and files, which ReOrg has already processed ("done") and which ReOrg has queued for later processing ("queued"). - The current cache usage. If this value reaches 100% at any time during the optimization, this means that more memory could speed up the optimization. - The current status of ReOrg. Possible states are: - checking disk Before the actual optimization starts, ReOrg checks if your disk is a valid AmigaDOS disk. - scanning disk ReOrg is reading the disk directory and is calculating the layout of the destination disk. - awaiting user ReOrg is waiting for the user to response confirm the start of the optimization. - moving blocks ReOrg is optimizing the disk. - writing bitmap ReOrg is writing the new disk bitmap. - formatting empty If the user selected option "-f2", tracks ReOrg formats all unused tracks on the destination disk. - copying reserved ReOrg is copying reserved blocks blocks (boot blocks etc.). - The remaining time needed for the optimization (only during the phase "moving blocks"). This value is only an approximation of the remaining time needed. If source and destination devices have a very different speed, (e.g. "RAD:" to "DF0:"), the estimation is very inaccurate. - The percentage of disk blocks that have already been moved. This percentage also corresponds to the percentage of time needed for the optimization. 5. Technical details -------------------- Option "-e" Files larger than 34.3 kB (OFS) or 36 kB (FFS) require "FileExt blocks" (also called FileList blocks). ReOrg offers three models where to place these blocks on the output disk: 1) "-e0" : All FileExt blocks are placed immediately behind the header block. This is the default under Kickstart 1.2/1.3. 2) "-e2" : All FileExt blocks are placed behind the first sequence of data blocks. This is the default under Kickstart 2.0. 3) "-e1" : FileExt blocks are scattered among the data blocks. Recommended Settings: - If you want to be able to display the directory contents of your disk under Kickstart 1.2/1.3: BE SURE TO use the setting "-e0". Otherwise the "dir"-command gets even slower than it already is. - Otherwise: usually "-e2" is best for disks that are ONLY used under Kickstart 2.0. Sometimes, "-e1" can be useful, if large files are read only sequentially using small program buffers (most C-programs use very small buffers (512 bytes)). For those programs sequential file access gets faster, if you choose the setting "-e1". - Exception: When you reorganize Boot disks, for which you NEVER read the directory under Kickstart 1.2/1.3 (e.g. Game boot disks), the setting "-e1" often gives the best results - under Kickstart 1.2/1.3 as well as under Kickstart 2.0. - Another Exception: When the disk contains large files which are accessed in relative mode (using Seek()), you should NOT use the setting "-e1". - Partition half (option "-p") It is possible to store file data mainly in the - Upper ("-p0") or - Lower ("-p1") partition half. Usually there is not much difference between both settings. The decision which setting is better usually depends on the amount of data on the partition. - Options "-w" and "-s" For each file, ReOrg decides whether to store the file contents behind the header block or in the data area. - data stored after the header block: - File access gets faster - Directory access gets slower (particularly for large files) - data stored in data area: - File access gets slower - Directory access may get faster When you use the option "-w1" (default), ReOrg stores all "#?.info" and ".backdrop" files after the header block. This makes Workbench icons appear faster. However, directory access from the shell may become slower. The option "-w0" switches this behaviour off. The option "-s" makes ReOrg store the contents of small files (default: up to 2 blocks size) after the header block, to increase file access speed. This does not slow down directory accesses considerably, but file access to small files gets much faster. If you only want to have fast directory access, you can set this option to "0". Directory accesses get fastest, if you use options "-w0" and "-s0". Some details about the technical process of optimization: - The "bitmap" of the source disk is not needed by ReOrg. Therefore it is not necessary to "validate" your disk before optimizing it. - Before ReOrg changes anything on your disk, it first checks the structure of your disk. However, this check is not complete, i.e. ReOrg does not detect all possible structural defects (btw, even the AmigaDOS Disk-Validator does not detect and correct all defects !). When ReOrg reports an error in the first phase, it has not destroyed or changed your disk yet in any way. But when the phase "moving blocks" starts, ReOrg must not be interrupted any more, because in this phase ReOrg rearranges the disk layout. - Anyway I STRONGLY RECOMMEND to THOROUGHLY check your disk for structural defects before optimizing it. Otherwise ReOrg might report an error in the "moving blocks" phase and might even destroy your disk (although this is very unlikely). - If ReOrg stops or is interrupted in the "moving blocks" phase, the following things happen: - Your disk is displayed on Workbench as "DF0:REOR" (DF0 being the drive that contains your disk). - When you try to access your disk, AmigaDOS reports "Not a DOS disk". - The contents of your disk are TOTALLY UNUSABLE AND COMPLETELY DESTROYED. In this situation there is only one thing you can do: !!! Reformat your disk ("format ... quick") and !!! !!! restore your backup. !!! Do not trust "hints" from computer magazines telling you, you could still repair parts of your disk. I explicitly warn you: !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! Do not try to repair your disk using tools like "disksalv", "fixdisk", "diskdoctor" or any commercial disk tools ! Although you might by coincidence really restore some of your files, you will most certainly "restore" a lot of corrupt files, but you will not get an error message from your disk recovery tool. This is especially true if your disk has the FFS format. "Repairing" corrupt program files may very well lead to MASSIVE computer crashes in the future. So: Always restore your backup when ReOrg does not complete the "moving blocks" phase ! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! 7. Option file format --------------------Most users will probably not needed option files. However, option files are useful to make some "final" optimizations, e.g. before disks are distributed. Especially when you optimize game boot disks, a "perfect" optimization using option files may save you some seconds when you boot from your disk. Option files allow you to change the settings of the "-e" option and to specify the placement of data blocks for individual files. These settings override the global settings for single files. Example: You want to optimize a game boot disk, that contains a lot of files. You therefore used the global setting "-e1". (An explanation, why this makes sense, can be found in the section "5. Technical details"). The disadvantage of this setting is, that relative accesses to large files become slower. When you know, that your game often accesses a single large file in relative mode (let's say the name of this file is "graphics/dungeon.gfx"), you should change the setting of "-e" to "0" for this single file only. This kind of settings can be specified in option files. Option files are ordinary ASCII text files. You can use any ASCII text editor to create and edit them (e.g. MEmacs). Format: 1st line: $1 (A dollar sign ("$") and the digit One ("1") in the first two columns of the line) all other lines: options:file name:comment valid options are: I0 Data blocks of this file are not placed near the header block (default) I1 Data blocks of this file are placed near the header block (file access gets faster, directory E0 E1 E2 access gets The same as The same as The same as slower) "-e0" "-e1" "-e2" You can combine several options in a single line (e.g.: E0I1:file name:comment) The above example: $1 E0:graphics/dungeon.gfx:any comment Some more notes about the file format - The file name must be specified relative to the root of the disk, i.e. please do not write "/test/name.doc", "sys:test/name.doc" or "diskname:test/name.doc", but only "test/name.doc" - Spaces and other special characters may occur in the file name. You need not (and must not) use quotation marks to surround the file name ! - Patterns (e,g, "*.txt" or "#?.txt") are not allowed ! 8. Program version, update info ------------------------------The current program version (shareware) is V1.1 If somebody still has ReOrg versions V0.9, V0.99 or V1.0, please DELETE them ! ReOrg versions with those version numbers are beta-test versions. Some of them still contain severe bugs. Do not distribute those old versions ! Besides ReOrg V1.1, there is another current ReOrg version, that only runs under Kickstart 2.04. The current version number of this ReOrg version is V2.1. If you have ReOrg version V2.0, please DELETE it. It is a beta-test version, too. I will probably not improve ReOrg V1.1 any more, but only the Kick2.04-compatible ReOrg V2.1 Registered users will get a notification when new versions of ReOrg V2.1 get available, that contain significant changes or enhancements. Besides ReOrg V2.1 contains some improvements that have not been implemented in ReOrg V1.1. One of them is: ReOrg V2.1 needs much less memory to optimize large hard disk partitions than ReOrg V1.1. In order to be able to improve / correct ReOrg, I would like to ask every user to do the following things: - send me the registration fee - send me bug reports, if you find any bugs - give me hints how to improve ReOrg Thank you very much in advance ! My personal future plans for ReOrg V2.1, if I have time for them: - Implement an option to convert disks between the "ordinary" disk formats to/from the International FileSystem format (i.e. DOS\0 <--> DOS\2, and DOS\1 <--> DOS\3) - Support for "locale.library" to adapt ReOrg to different languages I will be thankful for other ideas. 9. Acknowledgements ------------------Thank you to all beta-testers of ReOrg ! These are: Thomas Esser, Oliver Kasper, Carsten Lechte, Holger Lubitz, Michael Rohrdrommel, Kai Siering, Christian Soltenborn, Christian Wolf and Michael Zielinski. Thank you to Christian Wolf for distributing ReOrg via FTP ! ... last but not least many thanks in advance to all ReOrg users who send me the registration fee ! Holger Kruse