Clean The Desktop for smoother experience

This article will try to explain not only how to make the windows computer run faster,
but also to explain the way windows works behind the scenes and how its handling files

The terms I will throw to this article are:

  • Files in Hard-Drive
  • Virtual memory management
  • Desktop folder
  • Fragmentation and DeFragmentation 

Once covered, I will try to connect them all to a big picture, showing what it does to Windows
Finally, if still needed, i will specify my very simple solution to fix and avoid similar problem.

The files on your Hard-Drive

Mechanical Hard Disk (HDD)
  • By definition, when we save a file to the hard-drive:
    • Windows goes to the Hard-Drive’s File Allocation Table (FAT)
    • Looking for the first available place in the HDD for the file
    • Once found place, writing the details of the file in the FAT
    • Moving the file that stayed all this time in a special place (discussed later) to the destination in the Hard-Drive
  • When windows wants to read (Open/Execute/Refresh) a file:
    • Windows goes to the FAT
    • Collects the exact location of the file
    • Moves it to the special place (said, discussed really soon…..)

That’s actually all the work of windows with the hard-Drive (well, its much more sophisticated and complicated but that’s enough for this article)

Windows Virtual Memory

The internal memory of the computer (RAM) is much faster than the Hard-Drive but more expensive per size.
When operating systems started appearing widely, RAM was hundreds times more expensive than storage
Therefore, the creators of operating systems had to create a Virtual Memory, a kind of cheap substitute to the expensive RAM, that will be on the hard drive of the computer.
The virtual memory is helping the RAM to handle all the activities of the operating system.
In windows (since windows XP) Virtual Memory is a vital configuration for the smooth activity.
Since Windows 7, windows says it can manage the Virtual Memory usage automatically – and never seems to really do it efficiently.
Windows Virtual Memory is configured through system properties (see the image)

File:WinVMMarked.jpg

My Preference/recommendations:

  • Manage Manually
  • Set Hard Drive (fastest is best)
  • Set Minimum size (MS best practice – RAM * 1.5)
  • Set Maximum size (MS best practice – RAM * 3)
  • Click SET

And you’re done!

Important Remark

For virtual machines and for computers with alot of RAM (16GB and more) – MS best practice is Minimum=Maximum=RAM size.

Test It

Try to disable temporary select No Paging File from the same configuration window
and you will understand the need of the Virtual Memory!
No need to remind you to revert, you will do it anyway….

P.S. – the Special Location I referred to earlier is actually the RAM and/or the Virtual Memory!

Desktop Folder

  • The Desktop first appeared in windows in the way we know it today in windows 95 / Windows NT4.
    • The role of the desktop in the operating system:
      Shortcuts environment for easier access.
  • Although the desktop folder seems like any other folder in Windows (under the user profile by default) it is not!!
    • Since the desktop needs to respond to every action performed by the user, the desktop “Refreshes” constantly!
    • Every action the user makes on the desktop refresh and to the content of the folder to refresh with it:
      • Clicking a shortcut
      • Moving a shortcut
      • Opening, moving resizing, maximizing, minimizing of an open window.
      • Creating a folder
      • Creating a shortcut
      • Deleting a shortcut
  • I can continue like that forever, but i guess you understood……
    Every refresh of the desktop means “Handling” the content of the Desktop Folder.
    Handling“: Taking the file from the regular storage space to the Virtual Memory, and then returning it to the regular storage space

This is the stage for a very important remark about the first section “The files on the Hard-Drive”

  • When a file leave it’s location and moves to the Virtual Memory, it does not have lease-time, it will return to a new place.
  • In a simple world when the activity of the operating system with files was one-by-one there was no problem.
  • But since:
    • Files are moved in mass from the HDD to the Virtual Memory and back
    • Bigger files take more time to return to the hard-drive than small files
    • Many actions are performed on many parts of the system simultaneously
    • Many files are created and changed elsewhere in the operating system.

Some of the files will return to different place than the one they have left just few microseconds ago.

When the file returns to the hard-drive , if the location it has “found” is not big enough (say part of the original place the file has left was taken by another file), it will split to the size of the free location and the remaining will go somewhere else.

This is ……

Fragmentation!!

caption

Fragmentation by definition is a situation when a file is divided to multiple parts along hard drive.

  • The FAT will tell the operating system where the beginning of the file is.
  • Every end of part will contain a pointer to the next part of the file.

The operating system will

  • Collect the file from all the places.
  • Merge it.

and

  • Place it in the Virtual Memory.

Its not about 2 parts, you will find big files (hundreds of megabytes) that are fragmented to thousands of parts.

Put It All Together

Put It All Together

Just imagine:

  1. The Desktop has so much data on it that it has to use the Virtual memory
  2. The desktop is refreshing 3-25 times in a second
  3. The desktop has files in different sizes:
    1. Shortcuts of few bytes
    2. MP3 files of few megabytes
    3. Video files and high resolution images of 10’s of megabytes
    4. Movies of 500 megabytes
  4. That’s exactly how a perfect working computer can make 50% of his files fragmented, with an average of 25 fragments each….

Use you imagination to understand what it takes from your computer to open MS Word.

Solution

Now, after this horror story, I would like to suggest a simple solution

Re-Arrange

When a user is complaining that “My Computer is slow”

  1. Open the user’s folder in file explorer
  2. Right click the desktop folder
  3. Select Properties.

If the folder is too full

  1. Create a new folder elsewhere:
    1. On drive C or D
    2. Under My Documents Folder
    3. Under My Pictures Folder
    4. I don’t really care where, just not on the desktop
  2. Call the folder “From Desktop – Guy said” …… lol ‘From Desktop’ will do it
  3. Open the desktop folder and the new folder side by side preferably the new folder on the side of the START MENU
  4. Drag And Drop all the heavy files and folders from the desktop to the new folder – as is.
  5. Minimize the Desktop folder window
  6. Select all the files that are now in the new folder
  7. Right Click (not left click!) one of them and drag to the desktop
  8. Release the mouse button and from the menu – select “Create Shortcut Here”.

You have actually moved all the files from the desktop to a new location
But the user will see (almost) the exact same things on his desktop (just need to sort them again…..)

Defragment

Now, the most important thing – Defragmentation

  • From windows explorer right click drive C (or D if the Desktop is there)
  • Select properties
  • Go To Tools tab
  • Select Defragment
  • Start the action

Seriously fragmented bug Hard-Drives can take hours to Defragment

That’s it!

Leave a Comment