Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!utastro!bigtex!james From: james@bigtex.cactus.org (James Van Artsdalen) Newsgroups: comp.sys.ibm.pc Subject: Re: File creation error Keywords: 224 File(s) copied; slow; Compaq; MS-DOS 3.3 Message-ID: <14520@bigtex.cactus.org> Date: 3 Mar 89 14:14:12 GMT References: <7852@ihlpf.ATT.COM> Reply-To: james@bigtex.cactus.org (James Van Artsdalen) Distribution: usa Organization: Institute of Applied Cosmology, Austin TX Lines: 31 In <7852@ihlpf.ATT.COM>, pcl@ihlpf.UUCP (pcl) wrote: > I encountered the following error when trying to copy 300 files (small size) > from harddisk to A: (1.2 meg floppy drive): > [...] > Also, why the copying process is VERY slow (over 5 minutes)? Several people pointed out that the root directory on a hard or floppy disk is of a fixed and limited size, whereas a subdirectory could have grown. But no one pointed out a potential cause of slowness: lack of buffers. Mess-DOS uses the config.sys BUFFERS= mainly for directory sectors so it doesn't have to re-read them constantly. pcl's 224 files constitutes 14 sectors worth of directory. Towards the end, every file added meant that all preceding N sectors of directory had to be read linearly. Once N exceeds the number of buffers, each and every directory sector must be physically read. In this case we would want the config.sys BUFFERS= entry to be at least 2*N, so that we could hold the source and destination directories entirely within RAM. Another part of the problem is this: If 300 files were indeed intended to fit in a 1.2meg disk, then the average file size was 4K or less. But for files residing on the 8th directory block or later, DOS had to read more than 4K of directory entries. Hence the mere size of the directory made the disk access very much slower, because the amount of directory reading could exceed the amount of file reading. -- James R. Van Artsdalen james@bigtex.cactus.org "Live Free or Die" DCC Corporation 9505 Arboretum Blvd Austin TX 78759 512-338-8789