Short: Linux' buffer-cache v3.4 Author: MartinTauchmann@bigfoot.com (Martin Tauchmann) Uploader: MartinTauchmann bigfoot com (Martin Tauchmann) Type: disk/cache Version: 3.4 Replaces: disk/cache/fda.lha Requires: OS 2.0+, 2MB FastMemory Architecture: m68k-amigaos Kurz: Nutzt den freien Speicher als Cache für FestPlatte, CD, FD et cetera Date: 31.09.01 Url: http://MartinTauchmann.home.pages.de Version 3.4 of Future Drive Accelerator which is running out of date in middle of November 2002, to give pirates no chance, New features figured out: * 'FDA' give you also more CPU-time, because it's just about 15 times faster, than the scsi.device (IDE-Controller). * UAE-JIT2 and SCSI-drives are faster with it. * 'FDA' is 5 times cheaper and 4 times faster than 'PFS' with 'FFS' and all well tested disk-repair/reorg-tools with full compatibility to all existing programs, it's faster to install, and updates are free. * 'FDA' is so fast, that with "Protect cache with checksums" it's faster than a "naked" Amiga. And the data in memory (cache), are safer than in any other program (excepting Enforcer/MuForce). I.e. A texteditor holds the text in memory less safe, than 'FDA'. 'FDA' is protected like, MungWall or MuGuardianAngel which detect illegal freememory access, but it doesn't need an MMU. By this, it detect damaged memorychips also. Damaged cache will be recovered from disk. And damaged write-cache will be not written back to disk. english documentation: o `fda_DviPS.lha` DVI (TeX) and PostScript (GhostScript) formarts, o `fda.lha` AmigaGuide and HTML formats. german documentation: o `fda_d_DviPS.lha` DVI (TeX) and PostScript (GhostScript) formarts, o `fda_d_GuidHTML.lha` AmigaGuide and HTML formats. `Future Drive Accelerator' V1.4 documentation and newer ******************************************************* Uses the `*free memory*' as a `*cache*' , the program reacts automatically on changes in memory resources, so that you will always get the maximum speed for your drives. Even "resources-hungry" programs will get enough memory. The concepts behind `Future Drive Accelerator' ********************************************** `Future Drive Accelerator' is a disk-cache program. A cache buffers all data which is written or read from the drive (hard disks, floppy disks, Compact-Disk, removable disk, ZIP...). If requested data is already in the cache, it doesn't need to be loaded from the slow disk. So far nothing new! Memory is, as we all know, always short. So you better think twice before you give it to programs. No matter how you set it up, you can never make it suitable for all programs. One program runs (thanks to the cache) faster than ever before, another one stops working (due to the lack of RAM). With all other cache programs, you had to adjust the memory usage. Of course, the more memory a cache can use, the faster it will work. So with old cache programs the memory usage had been set quite high, but because other programs stopped working this was stopped rather quickly. Now the cache is commonly set to an average size, so that all "memory-eating" programs run. Or you always had to change the cache-size manually to fit the current situation. But this is not a very satisfactory solution. And this is where `Future Drive Accelerator' comes in. `*The whole free memory*', whose size is changing all the time, `*is used as cache.*' With this technique, an `Amiga' with a 68030 50Mhz processor and 16 MByte FastMemory (Blizzard IV) averages a *factor 4* speed up. See Benchmarks. Write accesses are buffered, and later, while *writing back* to the drive, the head is moved from the highest to the lowest address. Another improvement is built-in for people who use exchangable media like disks, CDs, MagnetOptical-disks and ZIPs. When inserting the media again, the still filled cache is used. The media doesn't need to be accessed again. Who used a lot of dos-buffers? (1) for the file system, you can now even `save' this memory. Not to mention that you `*help protecting the environment*'. The motor and the electronics of the drive is used less and thus, energy is saved. => the *nuclear power plants* can be shutted down earlier. You should also keep in mind that the *hardware* wears out less. ---------- Footnotes ---------- (1) A dos-buffer requires (per default) a half KiloByte. What is required to use `Future Drive Accelerator'? *************************************************** `Future Drive Accelerator' needs at least: "AmigaOS" 2.0 or better. "2 Megabyte memory", more memory is recommended. Additionally, the following software is supported: "DiskSafe" (http://de.aminet.net/pub/aminet/disk/salv/DiskSafe.lha) After a reset or system crash, the cache will be written back before restarting the system. Example installation for `s:Startup-Sequence': DiskSafe DF1: DF0: HD0: Store: Font: HD2: HD3: HD4: ... REBOOT QUICKKEY WAITVERIFY VERIFYREQ LOGFILE=Store:T/DiskSafe.log IGNORE If this shouldn't work, try adding `RESETKEY'. "CopyMemQuicker" See Speed up. "FileSystems", "Devices" See Features. What speed improvements can be achieved with `Future Drive Accelerator'? ************************************************************************ * Copies 850KB in *35 seconds* from hard to floppy disk, this equals the speed of formatting. This is possible because, minimizes the overall seek time required to read or write data from or to disk. Outstanding I/O requests are ordered such that they can all be performed "*with one sweep*" of the disk head assembly, from the highest to the lowest disk address (Elevator seeking). * *23 MB/s* while reading, (SysInfo V3.23) instead of 7 MB/s without cache, with an Amiga and following equiment: Zorro III, CyberStorm MKIII, 060/PPC 604 150Mhz, UltraWide SCSI HD, 64 MB FastMemory, CopyMemQuick 40+. * The booting can get twice as fast if there are a lot of small files to load and many files reside in the `WBStartup' directory. * Faster access to directories from Workbench. * Amiga MC68030 50MHz, 16MB FastMemory. - IDE-HardDisk (tested with `DiskSpeed') (1) read *6.8 times* faster. write *8.1 times* faster. - DD-FloppyDisk (tested with `DiskSpeed') read *488.0 times* faster. write *997.6 times* faster. - Copying from one partition to another. 44 Dirs, 561 Files = 2.3MB Size c:Copy MUI: ASWAP:MUI ALL CLONE QUIET Dos 457 Dos-Buffers 46 secs 253999 micros FDA 7 Dos-Buffers 11 secs 196642 micros (*4.13 times faster*) * Amiga PPC604 233MHz MC68060 50MHz, 96MB FastMemory. - IDE-HardDisk (tested with `DiskSpeed') read *19.5 times* faster. write *20.4 times* faster. - SCSI-HardDisk (tested with `DiskSpeed') read *3.8 times* faster. write *3.5 times* faster. ---------- Footnotes ---------- (1) DiskSpeed Reference: 262144 byte, MEMF_FAST, LONG-aligned buffer. Compatibility, Features of `Future Drive Accelerator' ***************************************************** * Accelerates all kind of media e.g.*: Harddisk-, Floppy-, Compact-, ZIP, MagnetOptical- or SyQuest-drives, almost like a RamDrive. * Uses the `*free memory*' as `*cache*' , the program reacts automatically on changes in memory resources, so that you will always get the maximum speed for your drives. Even "resources-hungry" programs will get enough memory. * Minimizes the overall seek time required to read or write data from or to disk. Outstanding I/O requests are ordered such that they can all be performed "*with one sweep*" of the disk head assembly, from the highest to the lowest disk address (Elevator seeking). * Gentle, parallel reading and writing in Multitasking. * Smart-Power-Technologie: Minimizes the number of disk-accesses. * SmartCache: Read-ahead of blocks. * When disks are removed, the cache is only removed if necessary. When disks are re-inserted, the cache will be used again. * No fragmentation of memory. (Opposite to DynamiCache.) * Can possibly save memory, because dos-buffers are not required anymore. * Power-LED flashes when accessing cache. * Verify is as fast as in a copy-program, because data is verified in the background while writing. (the processor isn't used much while writing anyway). * If `DiskSafe' is installed, the cache will be written before a reset or system-crash restarts the computer. See Requirements. * Supports `DiskExpander' (http://de.aminet.net/pub/aminet/util/pack/epu14.lha), `Virtual-Memory-Manger (VMM)', `XFH' (http://de.aminet.net/pub/aminet/util/pack/XFH.lha) `temporal files' and `World-Wide-Web browsers'. * Supported devices: (probably all - scsi (http://www.amiga.de/files/index.html), 2nd.scsi, NewStyleDevice, atapi (http://de.aminet.net/pub/aminet/disk/misc/IDEfix97.lha), cybscsi, - trackdisk, floppy (http://de.aminet.net/pub/aminet/disk/misc/floppy43.lha), diskspare (http://de.aminet.net/pub/aminet/disk/misc/Diskspr3.lha), hackdisk (http://de.aminet.net/pub/aminet/disk/misc/NewHackdisk.lha), mfm.device ((C)CrossDOS), messydisk (http://de.aminet.net/pub/aminet/misc/emu/msh-156.lha), - fmsdisk (http://de.aminet.net/pub/aminet/disk/misc/fmsdisk.lha), - xpkdisk (http://de.aminet.net/pub/aminet/util/pack/xpkDisk37_8c.lha), - cd. * Supported FileSystems: (All knownn) - FastFileSystem(FFS), V44.5 (http://de.aminet.net/pub/aminet/disk/misc/ffstd64.lha) V43.20 (ftp://ftp.amiga.com/pub/) - ProfiFileSystem1+2(PFS) (http://de.aminet.net/pub/aminet/disk/misc/pfs95.lha), HomePage (http://www.greed.nl) - AmiFileSafe(AFS) (http://de.aminet.net/pub/aminet/biz/demo/afsdemo159.lha), - SmartFileSystem(SFS) (http://www.xs4all.nl/~hjohn/SFS/), - MessyFileSystem(MSD) (http://de.aminet.net/pub/aminet/misc/emu/msh-156.lha), - CrossDOSFileSystem(MSD) ((C)CrossDOS), - Berkeley (NetBSD LinUX) Fast FileSystem (BFFS UNI\02) (http://de.aminet.net/pub/aminet/misc/emu/bffs1.3.lha). and compatible, furthermore all MultiUser-"clones". * Supports FileSystems with a variable block-size. * Supports harddisks with a capacity of 4 GigaByte or more. * Protects partitions beyond the 4 GigaByte "barrier" from faulty accesses. * Is the fastest cache program. Accelerates harddisks by the *factor 2*-*20*, floppy disks by the *factor 2*-*997*. * Please, enable "Protect cache with checksums" in preferences, first time you run 'FDA', to figure out whether you have installed programs which change foreign memory blocks (cache). If so, you should remove the "bad" programs. When there is no further "FDA Checksumme-error" request, your system is clean and stable and you should disable "Protect cache with checksums" to get maximum performance. Perhaps, the next version protect the cache with MMU for (relativ) "safety"; without slow down the performance. * It is *very recommend* to install 'StackAttack' (also for OS3.5) after SetPatch and before FDA in the 'S:Startup-Sequence', it make FDA and the whole Amiga more stable (fixes deadlocks, Guru $8000004 & $1000005) c:StackAttack ADDSTACK=512 ;Increase StackSize of every Programm * Please, don't install QuietTD from DiskSpare, i don't know why it hangs. Q: I have a Blizzard board, and the mulitasking doesn't sweep. A: Reuse the Chip-memory as cache; because only Fast-memory access confuse these boards. Q: I changed some files and after the reboot, the files are unmodified. A: Install DiskSafe. See manual-Requirements. Q: The internet-software crashes very often, and my new emails are not saved. A: I use "Async-delay" = 2 sec, for my partitions where i write while i'm online, it's good for 28k modems. When you have a faster, you should set it to 1 sec, to save the datas back to disk, while you are online. And not after a logout without Guru. If the datas aren't written back, because the write-traffic of your partition is to high (several writes while 1 sec); use "write sync". Q: Why FDA doesn't wait silently for mounting CD0: and then simply cache it? The same is for PC0:, if FDA is started BEFORE PC0: mounts itself from Devs/DosDrivers, FDA just complains that "Can't Find PC0:" and doesn't care if PC0: is started later... A: AmigaOS doesn't have a "simple" mount-notify function, but a hint: Insert in "S:Startup-Sequence" behind SetPatch, SaferPatches/PatchControl/SetMan/PatchLib's PatchSetFunc, StackAttack, PoolMem and FBlitNIL: Sys:System/FDA ENVARC:FDA-Boot.prefs QUIET and at bottom of "S:User-Startup": Sys:Prefs/FDAPref ENVARC:FDA-AfterBoot.prefs USE and save as with FDAPref the two new prefs. Q: I have 16 partitions, how can i enable it quickly? A: It's not 'HyperCache', it was difficult enough to detect partitions. Use SHIFT-KEY & LEFT-MOUSE. Q: I use the FAT95 (MSWindows95) FileSystem for ZIP drive. The "Size of Track" is not saved. A: Enter the Surfaces, BlocksPerTrack, LowCyl and HighCyl values in devs:DOSDrivers/devs:mountlist. Q: I use the FAT95 (MSWindows95) FileSystem for ZIP drive. While inserting a disk an Alert #0FDA0016 and Enforcer-hits popup. A: Enter the Surfaces, BlocksPerTrack, LowCyl and HighCyl values in devs:DOSDrivers/devs:mountlist. Q: I have 16MB RAM, and ADPro use the whole free memory. A: ADPro:ADPro MAXMEM=5000000 FASTMEMONLY Q: Since I installed OS v3.5 it's so slow. A: SetPatch install NSD 4GB support for: timer- input- keyboard- gameport- console- clipboard- trackdisk- ramdrive- and statram-device. They will call several times per second, and it's nonsense to run code for a architekture we will never credit (64-Bit CPU to access more than 4GB memory). Comment them in devs:NSDPatch.cfg out. Q: The cache doesn't work with all my drives connected to cybscsi.device. A: SetPatch doesn't check wheter devices already support NSD, and patch it still. And the patch doesn't work with WaitIO(). Comment cybscsi.device in devs:NSDPatch.cfg out, or SetPatch NONSD. Q: How to shutdown UAE safely to write the cache back to disk? A: Use keys LeftShift+RightShift+Tab instead of reset after you installed: DiskSafe REBOOT WAITVERIFY VERIFYREQ RESETKEY RESETSEQ=LShift+RShift+Tab DF0: DH0: DH1: DH2: and quit UAE (UAE-JIT2 quits after reboot). Tip: It's not recommended to have mounted AFFS Harddiskfiles while UAE is running on Linux. Write some shell scripts and save it i.e. at /amiga mount.sh: #! /bin/sh mount -t affs /data/Amiga/uae/HDF/sys.hdf /amiga/SYS -o auto,user,exec,verbose,loop umount.sh: #! /bin/sh umount /amiga/SYS It`s recommended to install an CopyMemQuick replacement (see Chapter Speedup). Choose your processor type: 68000 Aminet:util/boot/COPMQR28.lha 68020 Aminet:util/boot/CMQ030.lha 68040+ Aminet:util/boot/NewCMQ060.lha History V3.4 31-Sep-2001 * Nothing to mention. History V3.2 02-Nov-2000 * Fixed: Various Alerts #4 #6 of any program which call AllocMem(). This was since v3.0, or perhaps with OS2.0 and OS3.0 if FDA doesn't print during startup "Can't remove Dos-Patch of AllocMem" It uses now the the MEMF_NO_EXPUNGE flag for AllocMem, like it does previous, if FDA print "Can't remove Dos-Patch of AllocMem". This means ramlib (flush libraries). FDA work again with PoolMem, if PoolMem is before installed. I have no manuals wheter MEMF_NO_EXPUNGE also work in OS2.0. * Fixed: FlushLibs-Call decrease cache. * Fixed: "Can`t create Update-Task" * Check the mask wheter the controller work with whole memory. * Cache usage via Power-LED if "View color flash if track moved or deleted" is enabled. * Debug versions in fda.lha for memory and disk. FAQ addition: Setpatch OS35 or NSDPatch and cybscsi.device. History V3.0 20-Oct-2000 * Known bug fixed: Cache flushed sometimes, because private memorylist with Allocate() failed. ViNCEd (VNC:) is known to do it, some others too. The Cache is now bigger and therefore faster. Especially while booting. * Better finding the appropriate AllocMem() to skip ramlib (flush libraries), to decrease cache if the memory is really full. * Emulate undocumentated memoryfunctions features. * Call in OS3+ AllocPooled(). Faster with lot of memory, and fragmentates it less. CPU cache optimized. Faster cache initialization and startup. * Optimized: Allocate/AllocMem/AllocAbs/AvailMem. * Fixed: If "Protect cache with checksums" is enabled, and a program damage the cache, FDA determines itself, alerts and deadlocks the OS. * Perhaps work now for MorphOS (untested, results are welcome). FAQ addition: For ADPro and Setpatch OS35 or NSDPatch slow down. History V2.8 06-Oct-2000 * Fixed: Preferences failed to run, because statram.device patched with Setpatch OS35 or NSDPatch failed to open. * Open device with flags from Devs:DosDrivers. Very few program do it. * Faster: Doesn't open devices while Pref initialization. * Fixed: USE SAVE Argument writes corrupt preferences, if no GUI opens. * More error-reports for startup-failures. * Can now be started with project-icon from Sys:WBStartUp. FAQ addition: For FAT95 with ZIP-drives. History V2.6 06-Jul-2000 * Found the taskpriorities of PowerFlyer device; for an faster access in 'n sweep. * Fixed: QUIET prints still the first line. FAQ addition: For Blizzard boards. History V2.4 14-Apr-2000 * Found the taskpriorities of ExpSys.device & buddha_atapi.device; for an faster access in 'n sweep. * Demo uses whole free memory to speedup. History V2.2 16-Feb-2000 * Fixed, the preferences calculate sometimes unreal values of 'Size of Track'. * Checksumme calculation faster. * Fixed, can't create the update-task for IDEfix ATA[PI] (CD-drive & ZIP-drive). * Fixed, unclean termination and preferences-use if 'PatchControl' is installed. * Fixed, trackdisk capacity-change detection. * Fixed, hanging of messydisk.device v1.56. * Perhaps fixed, hanging of cd.device 3.6 (05.03.97) Georg Campana; because untested. * Fixed, "Verify error" while writing ½ trax. * Fixed, "write async" timer restarted while receiving update-command according read-command. New USA office address: ShareIt! Inc Suite 1800 Chapel Hill Professional Center GREENSBURG PA 15601-8019 USA Phone: 724-853-6618 Fax : 724-850-8187 Of course our old address with the PO Box is still available and can be used to send us checks and other mail. In future, you are welcome to use our new address instead. History V2.0 17-Dec-1999 * Fixed, hanging of mfm.device (CrossDos) v40.9 and fd.device (XFileSystem v2.14 ) v42.86; because they use SendIO() without WaitIO(). This was also the case for the hanging bug of FDAPref. * Fixed, capacity-change detection for XFileSystem v2.17 * trackdisk.device OS 3.0 doesn't work with ½ trax and format-command, and doesn't reply a error value. The update-task uses now the write-command. FAQ addition: * Please, don't install QuietTD from DiskSpare, i don't know why it hangs. * Please, don't use fd.device v42.86 from XFileSystem v2.14 together with "verify", use instead mfm.device it works. XFileSystem v2.16 do something but not bugfree. Copyright addition: Registration move to new user is free of charge. History V1.8 09-Nov-1999 * Fixed, "write-Async" not 100% working timer. * Added, PFS against FDA+FFS benchmark. History V1.6 30-Sep-1999 * Recognize capacity-change of removeable-medias. I.e. DD<->HD Disks * English translation of documentation Thanks to The Amiga Translators Organization [http://ato.vapor.com] Jens Neubauer for translate. Heiko Hayn for proof-read. * ESC-Key supported Other products ************** Aminet:gfx/edit/FCP.lha (Convert Pic -> CopperList (6BitPlane -> 0 BitPlane CopperList) - CopperListEditor - CopperListSearcher - Full Modula-2 SourceCode) Aminet:mods/slow/BrainBird.lha (Shaman drums to meditate and 14 Ambient NewAge Songs) Aminet:comm/misc/TelekomBill.lha (German Phone-Bill calculater for WG´s) Aminet:gfx/show/ActiveWinPic.lha (Picture on any window, special SHELL!) Aminet:util/boot/IsInserted.lha (StartUp-Check if a Disk inserted then start BootUte) Aminet:misc/unix/File2Partition.lha (Spare memory if LinUX install, stores files direct to HD, Disks or any LogicalDevice) Aminet:dev/asm/ExecDis.lha (A commented disassembly of the exec library 1.2) http://computer.freepages.de/tauchmann/PasTeX-SuperHighRes.lha (5.1MB) (SuperHighRes & Epson medium pk-fonts, other resolutions possible) (=> Display 9PinPrinter `Quality` on Screen) Optimized Oberon 2 Ansi-C preCompiler (Translate Oberon-2 Source Code to optimized ANSI-C (GCC) sourcecode. =>Oberon for PowerPC m68k... prozessors, requires GNU/Linux/Unix/AmigaOS) (Oberon-2 is nearly identical to ADA 95, Amiga E, Cluster, Pascal and Modula.) Garbage Collector (Replaces C malloc and C++ new;C string (cord) package that provides for fast concatenation and substring operations on long strings;Required by Optimized Oberon 2 C preCompiler, Sather and Java.) extended ixemul.library (changelog: CPU&OS independent, VNC:, cross-compile, Library IDString, flock(), Optimized &c. Required by Optimized Oberon 2 C preCompiler, Java and many others.) Aminet:dev/gcc/crossgcc_linux.tgz (5.3MB) (GNU C, C++ & Oberon cross-compiler for Linux which build m68k-binaries) http://home.pages.de/~MartinTauchmann/devel.html#Oberon http://home.pages.de/~MartinTauchmann/files/