CASE HISTORY # 10 (CONCLUSION) by the Disk Doctor -------------------------------------------- Copyright (C) 1988, the Disk Doctor. First published in the Rochester (PC)^3 News: Picture City PC Programming Club PO BOX 20342 Rochester, NY 14602 The Disk Doctor may be contacted at this address, or via CIS [73147,414]. This material may be reproduced for internal use by other not-for-profit groups, provided this copyright notice is included. ---------------------------------------------- 4:30pm (later that same day) I walked up to N.'s desk. "Well, are you ready to run the disk optimizer on your hard disk?" "Yes, I'm all set." she answered. "Just as the doctor ordered: I erased all my unnecessary files, I cleaned up any lost chains, and uninstalled my copy-protected software." "Okay. I brought the optimizer program over with me," I said, setting the disk down on her table. "But first, I'd like to check out what one thing. You told me yesterday you didn't see any improvement with BUFFERS. Can I look and see what you've got?" "By all means, " N. said as she stepped aside. 4:31pm I TYPEd \CONFIG.SYS and got the message: 'File not found'. "N., what happened to your CONFIG.SYS file? I thought you said you tried it out. Did you erase it already?" "No. I didn't touch it." "Well, it must have gotten erased. I can't find it on your disk." It should be right where..." N. leaned over the keyboard and changed directories to \DBASE. She entered a DIR command and sure enough, "There it is." "Why did you put there?" I asked in a puzzled tone of voice. "I don't know. You told me to type it in using EDLIN. I must have working in the \DBASE directory when I did it." She shrugged her shoulders. "You said it would primarily benefit my database program, so that's where it ought to do the most good, right? I don't know." "Okay, okay. Now I understand what happened. Let me explain it to you. DOS reads in the CONFIG.SYS file (if there is one) first thing, even before the AUTOEXEC.BAT. DOS only looks for this file in one place, so unless it's in the root directory, CONFIG.SYS won't take effect." "Oh, I didn't know that." "I guess I didn't make that clear. Let's run a test now and see whether BUFFERS gives you any improvement." I started the dBASE program. "Give me the name of one your database files, a good sized one." "All right. Ummm, VENDORS is probably the biggest file..." "Okay, I'll use that one. Let me time it as I load it in." I pressed the Enter key on the PC and the start button on my wristwatch at the same time. We both watched until the record counter stopped. "1 minute, 34 seconds," I read off my stopwatch. I wrote that time down and reset the watch to zero. "Now I'm going to run a SORT, and time that." I entered the command and started my stopwatch." 4:43pm "5 minutes and 17 seconds. Now let's do it again. This time with BUFFERS." I COPYed CONFIG.SYS to the root directory and rebooted her computer. Then I changed to \DBASE and repeated the process. "1 minute, 24 seconds," I clocked the initial loading of the VENDORS file. "Well, that's a little faster," N. said disappointedly. "But it's nothing to get really excited about." "That's right, N.," I told her, "I didn't expect to see much improvement initially. That's because it still takes the same amount of time to read in the file the first time. It's on subsequent accesses that the cache comes in to play. Now watch as we sort." I reset my watch and started the sort. 4:52pm "Wow! 3 minutes and 54 seconds!" N. read the time off my watch. "That's a lot faster. What, about 20% faster? I can't believe what a difference that one little command makes." "That's right. A disk cache saves you time, as well as wear and tear on your hard drive." I picked up my diskette and placed in the drive. "And now, if it's okay with you, I will go ahead with the optimizing process." "Will that speed things up another 20%?" "No, maybe not that much. But you'll probably see a slight improvement. There are some other benefits, though. By cutting down head travel, optimizing will also reduce wear on your drive." I turned to face her. "The other advantage is that contiguous files are a LOT easier to unerase, should you accidentally delete a bunch a files at the same time. Otherwises, you have to search through all the sectors manually and examine them, to decide which pieces go together." N. considered this for a moment. "Yeah, I can see how that would help. "Straightening out your files periodically is definitely a good idea. I run a program like this once a month or so. You can buy this one program for under $50. And a lot of the disk utility packages, like Norton and PCTOOLS, now include a disk optimizer. In fact, there are a couple of public domain optimizer programs out there now." 5:01pm "So, are we all ready to go? You're done with your computer for today?" "That's right." I started up the optimizer program. "There. Let's just leave it running overnight. Be sure you don't forget and accidently turn it off or kill the power on your way out." "You mean I might lose everything?" "No, the program is written so you can't lose any data. But if the process is interrupted in the middle, you have to take some extra steps to put the pieces back together again." "Well, it's time for me to go home. If I have any more problems, I'll come and get you tomorrow." She pulled on her coat, and waved as she started for the door. "Fine. And if I don't see you, then I'm assume everything turned out all right. Goodnight."