Image Map Image Map
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27

Thread: DOS DIR Command is super slow on a large drive

  1. #11
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    31,202
    Blog Entries
    20

    Default

    True, but then you don't get file sizes, either--just the bare file names.

  2. #12

    Default

    Quote Originally Posted by Shadow Lord View Post
    That makes since.
    Should of course be sense.

    Quote Originally Posted by KC9UDX View Post
    I thought this issue was due to the free space calculation, and that there was a way to turn it off.
    Quote Originally Posted by krebizfan View Post
    DIR /b will skip the free space calculation.

    Thanks guys. Yes that is what it was. It was pretty well discussed/known years back when HDD sizes started getting real big and people still had slower systems but now trying to find it on the web is impossible. It is like old MS KB articles. The purge of knowledge is almost complete.

    Quote Originally Posted by Krille View Post
    The problem is that DIR calculates the amount of free space on the drive by reading the file allocation table and adding up all clusters marked as free. The only solution is to reduce the size of the FAT, which means reduce the number of clusters on the drive. There are two ways to do this;
    I am having the same issue with 4DOS so I am guessing all the command processors do the calculation the same way.

    Quote Originally Posted by Krille View Post
    1. Increase the cluster size.

    2. Reduce the size of the partition so you're just over the power of 2 boundary.
    Thanks for the very informative reply. Looking at those solutions they both have down sides:

    1. Going to bigger cluster sizes = massive slack space waste (i.e. storing 2K DOS .com file in a 64K cluster)
    2. That would lead to partitioning the drive and multiple drive letters which is what I was trying to avoid in the first place.

    Although if I am understanding it correctly the problem should resolve itself as time goes on. That is, as the HDD fills up there are less free clusters to be added up so DIR gets faster.

    Quote Originally Posted by Krille View Post
    10 seconds sounds excessive. Make sure you have a sufficient number of BUFFERS in config.sys and/or that you have some disk cache like SmartDrive loaded. If the drive is formatted to use the minimum cluster size (1 sector per cluster) then that could also explain the slowness.
    I have my buffers set to minimum. My rudimentary understanding of buffers leads me to believe that they are unnecessary with a cache loaded. The one place I am not sure if buffers would help with is in the MS Client redirector. The setup program recommends increasing buffers (I think to 20). I am not sure if cache would also help in the case of MS Client or you actually need to allocate the buffers for better performance.
    Current Wish List: 1. IBM 7531 Industrial Series PC 2. NEC MultiSync XL (JC-2001) Monitor 3. Copy II PC Enhanced Option Board (the one with the toggle switch on the back) 4. MicroSolutions MatchPoint AND/OR UniDOS card 5. Compaq 14" VGA CRT Monitor (the one that came with the SystemPro). If you have any of the above for sale please PM me. Thank you!

  3. #13
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    31,202
    Blog Entries
    20

    Default

    FAT32 has other interesting quirks under real-mode DOS. For example, I often discover that a newly-created file isn't listed the first time I do a DIR, but appears on the second one... It doesn't seem to hurt anything, but I keep this in mind.

  4. #14

    Default

    Easiest solution: Use drive and partition sizes that are appropriate to the age of the machine. A 2 GB partition on a 4.77 MHz PC or XT is ludicrous, since you'd never come close to filling it up even if you copied onto it every piece of software you ever wanted to run on it. Formatting a couple of 40 or 80 MB partitions and leaving the rest of the drive or card unused will still give you an amount of drive capacity that was considered enormous (and terribly expensive) when the machine was new, and will make counting up the free space much quicker.

  5. #15
    Join Date
    Mar 2012
    Location
    Augusta, Georgia, USA
    Posts
    607

    Default

    I seem to recall a replacement dir command that fixed this issue, since it skipped the space calc.

  6. #16

    Default

    Me too. I wrote one. It still displayed file sizes, and even free space, but not by default.

    Heh history has forgotten this too; unless someone somewhere has the old Exec-PC BBS archives around somewhere...
    Last edited by KC9UDX; May 12th, 2019 at 05:57 PM.

  7. #17

    Default

    Quote Originally Posted by vwestlife View Post
    Easiest solution: Use drive and partition sizes that are appropriate to the age of the machine. A 2 GB partition on a 4.77 MHz PC or XT is ludicrous, since you'd never come close to filling it up even if you copied onto it every piece of software you ever wanted to run on it. Formatting a couple of 40 or 80 MB partitions and leaving the rest of the drive or card unused will still give you an amount of drive capacity that was considered enormous (and terribly expensive) when the machine was new, and will make counting up the free space much quicker.
    Yes but this is a 4GB drive on a 486-50. Its not like I have a 32GB CF card in there.
    Current Wish List: 1. IBM 7531 Industrial Series PC 2. NEC MultiSync XL (JC-2001) Monitor 3. Copy II PC Enhanced Option Board (the one with the toggle switch on the back) 4. MicroSolutions MatchPoint AND/OR UniDOS card 5. Compaq 14" VGA CRT Monitor (the one that came with the SystemPro). If you have any of the above for sale please PM me. Thank you!

  8. #18
    Join Date
    Aug 2006
    Location
    Chicagoland, Illinois, USA
    Posts
    5,773
    Blog Entries
    1

    Default

    My advice: Make 2G partitions until you run out of space. Don't worry about slack. 10 seconds is easy (consider 17 seconds for a 5150, or 50 (!) seconds for a PCjr). Also, it only happens once -- build "DIR C:" into your AUTOEXEC.BAT if you don't want to ever wait on-demand.

    There was a utility created and shared on this forum (somewhere) that saved the free-space allocation calc to disk on demand, and could be restored on boot-up. The obvious downside is that if that ever gets out of sync, you will have problems. I don't personally recommend it.
    Offering a bounty for:
    - The software "Overhead Express" (doesn't have to be original, can be a copy)
    - A working Sanyo MBC-775, Olivetti M24, or Logabax 1600
    - Documentation and original disks for: Panasonic Sr. Partner, Zenith Z-160 series
    - Music Construction Set, IBM Music Feature edition (has red sticker on front stating IBM Music Feature)

  9. #19
    Join Date
    Mar 2017
    Location
    New Jersey, USA
    Posts
    444

    Default

    Quote Originally Posted by Shadow Lord View Post
    Yes but this is a 4GB drive on a 486-50. Its not like I have a 32GB CF card in there.
    4GB seems big to me for a 486. The Compaq Deskpro 486/33M system commonly shipped with a 120MB drive, and the Deskpro 66M commonly had a 240MB drive. The later Compaq Deskpro XL line (which ranged from 486/66 to Pentium Pro) had storage ranging from 500MB to 2GB.

    I think the sweet spot for DOS is 500MB (assuming you're not running something so old you're limited to 32MB partitions). Beyond that the expectation would have been that you're running Windows 95 or later.

  10. #20

    Default

    Quote Originally Posted by Trixter View Post
    There was a utility created and shared on this forum (somewhere) that saved the free-space allocation calc to disk on demand, and could be restored on boot-up. The obvious downside is that if that ever gets out of sync, you will have problems. I don't personally recommend it.
    Interesting. Would this feed the DIR command or would you need to run DIR once and then the utility would store the information in memory to disk for restore later? I like your idea of DIR in autoexec. One could run dir > nul and while getting coffee as the machine is booting.
    Current Wish List: 1. IBM 7531 Industrial Series PC 2. NEC MultiSync XL (JC-2001) Monitor 3. Copy II PC Enhanced Option Board (the one with the toggle switch on the back) 4. MicroSolutions MatchPoint AND/OR UniDOS card 5. Compaq 14" VGA CRT Monitor (the one that came with the SystemPro). If you have any of the above for sale please PM me. Thank you!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •