Friday, May 24, 2013

SOP Friday: Managing Temporary Files

We all know that there are dozens of programs and processes that drop temporary files on your machine - and every machine at every client. These include the operating system, emails, Internet browsing, office documents, and more.

There are basically three ways to address these files: 1) Ignore them; 2) Clean them moderately; 3) Clean them aggressively. Every company needs to decide which of these is best - and implement it consistently across all machines.

As a general rule, we expect programs to clean up after themselves. Some don't, by design. Some don't because they're inefficient. Some clean up most but not all temp files. Some temp files you will never need, even if the program leaves them there in case you might. For example, Windows updates leave temporary files so you can un-install the updates and put old O.S. files back. But if you never plan to un-install the updates, you don't need the temp files.

Internet cache files can take up a lot of disc space, depending on the browser version and how many users have profiles on a given machine. Office files create all kinds of temp files and are notoriously bad at cleaning them all up. Exchange streaming media files are supposed to be self-maintaining, but success depends on the Server version, Exchange version, and the backup system (which may or may not successfully mark files for deletion after they've been committed to the database and the database has been backed up).

etc.

Excess temp files take up disc space. But they're like the laundry - you can never be rid of them. If you cleaned up every unnecessary temp file, more would appear instantly. Getting rid of *all* temp files is a futile effort. As a result, option three (clean them aggressively) is not worth the effort.

Too many temp files can eat up a lot of disc space. This affects performance and could eventually shut down your computer. To be honest, the only time I've actually seen this happen is with Exchange temp files. And back in the days of 2000 and 2003, I saw this more than once. So option one - ignore it - is also not an option.

We're left with option two. But option two has a very broad range of options.

I recommend that you do a general clean-up on machines from time to time. This includes servers and workstations. Two great opportunities are when you're cleaning up after a virus or when a client complains that their machine is slow.

I do *not* recommend that you do a regular (e.g., monthly) clean-up. This activity can take 15-30 minutes per machine and is 98% preventive maintenance. It will certainly speed up a machine and prevent problems, but if you put this much time into every machine every month, you will have a hard time staying profitable.

That means you should clean up a machine when it seems necessary or when there's an opportunity that is convenient while doing another task on that machine.

Here are a few things to put on your standard "PC Clean-Up Process" for client machines:


Temporary Internet Files
For each browser,
- Delete Cookies
- Delete Temporary Internet Files
- In older Internet Explorer, make the file usage small: like 50 MB or 100 MB. If this is huge (1,000 Mb), it just takes more time to go get a page

Temporary Files and Folders
There are lots of places where Windows hides files “temporarily,” but sometimes forgets to go back and delete them. These actions will help. Reboot before you start this process and you will have more success.
- Search your hard drives (C: or C: and D:) for *.tmp
 - - Delete everything it finds
- Go to c:\temp and c:\windows\temp and delete everything the computer will let you delete
- If you have Windows XP, go to the c:\windows\prefetch directory and delete everything you find there.
- Empty the recycle bin

Note: Don't waste a second trying to delete temp files that don't delete easily the first time. They might be locked by a program or limited by permissions. Don't fret it. Remember: Aggressive clean is not worth the effort.

Delete Acrobat temp files in:
"c:\documents and settings\yourusername\local settings\temp" directory.

Acrobat can create up to 65,535 temporary files (0 KB each) named "Acr0000" through "AcrFFFF". Acrobat uses a 16 bit counter for the temporary file names and that this counter overflows, which causes the application to hang.

Disc Cleanup
Windows has a great little tune-up utility built in, called “Disk Cleanup.” To access it, go to Windows Explorer. Right-click on the C: drive and select Properties. On the properties page, click the Disk Cleanup button. Delete whatever it recommends.

Manage Restore Points
To create a restore point, go to Start | Programs | Accessories | System Tools | System Restore.  More importantly, to manage the amount of disc space used by the System Restore application, go to Computer Properties | System Properties | Configure. Adjust the disc space usage to 10 GB or less. That should give you at least three restore points.

Databases and Line of Business Applications
Many databases and LOBs create temporary files. As a rule, you should learn the "documented" way to clean these up and don't just start deleting things. Run the approved maintenance process.

Disc Cleanup
Windows has a great little tune-up utility built in, called “Disk Cleanup.” To access it, go to Windows Explorer. Right-click on the C: drive and select Properties. On the properties page, click the Disk Cleanup button. Delete whatever it recommends.

Manage Restore Points
To create a restore point, go to Start | Programs | Accessories | System Tools | System Restore.  More importantly, to manage the amount of disc space used by the System Restore application, go to Computer Properties | System Properties | Configure. Adjust the disc space usage to 10 GB or less. That should give you at least three restore points.

Empty Recycle Bin

Reboot


Of course you need to determine the best cleanup process for your clients and the machines you manage. And don't forget - you need to do enough cleanup to keep machines from getting bogged down, but not so much that you're spending so much time on the task that you become unprofitable.

Comments welcome!


- - - - -



About this Series

SOP Friday - or Standard Operating System Friday - is a series dedicated to helping small computer consulting firms develop the right processes and procedures to create a successful and profitable consulting business.

Find out more about the series, and view the complete "table of contents" for SOP Friday at SmallBizThoughts.com.

- - - - -

Next week's topic:  Casual Fridays (and Dress Codes Generally)
:-)

Now Shipping: 



Just Released: 2nd Edition - Updated for Cloud Migrations, SBS 2011, SBS Essentials
Over 175 pages of NEW material, plus a comprehensive checklist for all versions of SBS.

3 comments:

  1. Anonymous7:44 AM

    Hey Karl,

    I'm curious to hear your thoughts on System Restore because it's one of the things we now disable for our clients. I don't think I have ever heard you talk about it. I have not had success with System Restore resolving an issue (YMMV). Since it can take up a lot of space and runs in the background it gets disabled. I'm just not sure if there is anything I'm missing.

    ReplyDelete
  2. Anonymous10:51 AM

    Juan,
    I hate to disagree with you but I think that Karl is correct in stating that you need to keep a few Restore Points. We have "repaired" many clients' PCs using both System Restore and Last Known Good Configuration. No these tools do no work all the time but they are just two more tools in our bag of tricks. I've seen a lot of techs diss these tools but the only tool that probably works every time is re-partition and format a hard drive but then the client loses all the data (and everybody knows how good the average user is on backups). This is just my two cents.
    Greg

    ReplyDelete
  3. I have solved many problems with System Restore Points. In some cases we even know what the problem is and simply save labor by doing a system restore instead of a long fix-it process.

    Just remember to re-patch machines that you run this on.

    ReplyDelete

Feedback Welcome

Please note, however, that spam will be deleted, as will abusive posts.

Disagreements welcome!