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
- 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)
- 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!
For virtual machines and for computers with alot of RAM (16GB and more) – MS best practice is Minimum=Maximum=RAM size.
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!
- 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.
- The role of the desktop in the operating system:
- 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 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.
- 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
- The Desktop has so much data on it that it has to use the Virtual memory
- The desktop is refreshing 3-25 times in a second
- The desktop has files in different sizes:
- Shortcuts of few bytes
- MP3 files of few megabytes
- Video files and high resolution images of 10’s of megabytes
- Movies of 500 megabytes
- 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.
Now, after this horror story, I would like to suggest a simple solution
When a user is complaining that “My Computer is slow”
- Open the user’s folder in file explorer
- Right click the desktop folder
- Select Properties.
If the folder is too full
- Create a new folder elsewhere:
- On drive C or D
- Under My Documents Folder
- Under My Pictures Folder
- I don’t really care where, just not on the desktop
- Call the folder “From Desktop – Guy said” …… lol ‘From Desktop’ will do it
- Open the desktop folder and the new folder side by side preferably the new folder on the side of the START MENU
- Drag And Drop all the heavy files and folders from the desktop to the new folder – as is.
- Minimize the Desktop folder window
- Select all the files that are now in the new folder
- Right Click (not left click!) one of them and drag to the desktop
- 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…..)
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
Leave a comment
Warning: Undefined variable $user_ID in /var/www/vhosts/u1366310.plsk.regruhosting.ru/httpdocs/wp-content/themes/wipi/comments.php on line 55
You must be logged in to post a comment.