您(Are)是否想了解什么是碎片整理和碎片整理(Fragmentation and Defragmentation)?那么您来对地方了,因为今天我们将了解这些术语的确切含义。以及需要进行碎片整理和碎片整理(fragmentation and defragmentation)时。
在计算机出现的早期,我们拥有现在古老的存储介质,例如磁带、穿孔卡片、穿孔磁带、磁性软盘等等。这些存储和速度(storage and speed)都非常低。除此之外,它们不可靠,因为它们很容易被破坏。这些问题一直困扰着计算机行业(computer industry)创新更新的存储技术。结果,出现了传说中的旋转磁盘(spinning disk)驱动器,它使用磁铁来存储和检索数据。所有这些类型的存储之间的一个共同点是,为了读取一条特定信息,必须按顺序读取整个介质
它们比前面提到的古代存储介质要快得多,但它们也有自己的缺陷。磁性硬盘驱动器的问题之一称为碎片。
什么是碎片和碎片整理?(What are Fragmentation and Defragmentation?)
您可能听说过碎片化和碎片整理(fragmentation and defragmentation)这两个术语。你有没有想过它们是什么意思?或者系统如何执行这些操作?让我们了解有关这些术语的所有信息。
什么是分片?
在探索碎片世界之前,了解硬盘驱动器的工作原理非常重要。(disk drive)硬盘驱动器(disk drive)由几个部分组成,但我们只需要知道两个主要部分,第一个是“盘片(platter)”,这与您想象的金属板完全一样,但小到足以容纳磁盘。
有几个这样的金属盘(metal discs),上面有一层微小(microscopic layer)的磁性材料,这些金属盘(metal discs)存储了我们所有的数据。该盘片以非常高的速度旋转,但通常以 5400 RPM(每分钟(Revolutions Per Minute)转数)或 7200 RPM的一致速度旋转。
旋转磁盘的RPM越快,(RPM)data read/write时间就越快。第二个是放置在这些磁盘上的称为磁盘(Disk)读/写磁头或只是“旋转磁头(spinner head)”的组件,该磁头拾取并更改来自盘片的磁信号。数据以称为扇区的小批量存储。
因此,每次处理新任务或文件时,都会创建新的内存扇区。但是,为了更有效地利用磁盘空间(disk space),系统会尝试填充以前未使用的扇区或扇区(sector or sectors)。这就是碎片化的主要问题所在。由于数据以碎片形式存储在整个硬盘驱动器(disk drive)中,每次我们需要访问特定数据时,系统都必须遍历所有这些碎片,这使得整个过程以及整个系统都非常缓慢.
在计算世界(computing world)之外,什么是碎片化?碎片是事物的一小部分,当它们放在一起时,就形成了整个实体。这与这里使用的概念相同。一个系统存储多个文件。这些文件中的每一个都被再次打开、附加、保存和存储。当文件的大小超过系统获取文件进行编辑之前的大小时,就需要进行碎片整理。文件被分解成多个部分,这些部分存储在存储区域(storage area)的不同位置。这些部分也称为“片段”。文件分配表 (FAT)(File Allocation Table (FAT))等工具(Tools)用于跟踪存储中不同片段的位置。
这对你来说是不可见的,用户。无论(Irrespective)文件如何存储,您都会在系统上保存文件的位置看到整个文件。但在硬盘驱动器中,情况就大不相同了。文件的各种片段分散在存储设备(storage device)中。当用户再次点击文件打开时,硬盘迅速将所有碎片拼凑起来,整体呈现给你。
另请阅读:(Also Read:)Windows 10中的管理工具(Tools)是什么?
理解碎片化的适当类比是纸牌游戏。让我们假设您需要一副牌才能玩。如果卡片分散在各处,您将不得不从不同的部分收集它们以获得整个甲板。分散的卡片可以被认为是文件的碎片。收集卡片类似于在获取文件时硬盘组装碎片。
碎片化背后的原因 (The reason behind fragmentation )
现在我们对碎片有了一些清晰的了解,让我们了解为什么会发生碎片。文件系统(file system)的结构是产生碎片的主要原因。比方说,一个文件被用户删除了。现在,它占据的地方是免费的。但是,这个空间可能不足以容纳整个新文件。如果是这种情况,则新文件是碎片化的,并且这些部分存储在可用空间的各个位置。有时,文件系统(file system)为文件保留的空间比需要的多,从而在存储中留下空间。
有些操作系统可以存储文件而不实施碎片。但是,在Windows中,碎片是文件的存储方式。
碎片化导致的潜在问题是什么?(What are the potential problems resulting from fragmentation?)
当文件以有组织的方式存储时,硬盘驱动器检索文件所需的时间会更少。如果文件存储在碎片中,则硬盘在检索文件时必须覆盖更多区域。最终,随着越来越多的文件以片段的形式存储,您的系统将因为在检索过程中挑选和组装各种片段所花费的时间而变慢。
一个恰当的类比来理解这一点——考虑一个以糟糕的服务而闻名的图书馆。图书馆员不会更换各自书架上归还的书籍。他们反而把书放在离办公桌最近的架子上。(shelf closest)尽管以这种方式存储书籍似乎节省了很多时间,但真正的问题是当客户想要借用这些书籍中的一本时。图书管理员在以随机顺序存储的书籍中进行搜索需要很长时间。
这就是为什么分裂被称为“必要之恶”。以这种方式存储文件更快,但最终会减慢系统速度。
如何检测碎片驱动器?(How to detect a fragmented drive?)
过多的碎片会影响系统的性能。因此,如果您观察到性能下降,很容易判断您的驱动器是否碎片化。打开和保存文件的时间明显增加。有时,其他应用程序也会变慢。随着时间的推移,您的系统将永远启动。
除了碎片化导致的明显问题外,还有其他严重的问题。一个例子是您的防病毒应用程序(Antivirus application)的性能下降。防病毒应用程序(Antivirus application)用于扫描硬盘驱动器上的所有文件。如果您的大部分文件都存储为片段,应用程序将需要很长时间来扫描您的文件。
数据备份也受到影响。它需要比预期更长的时间。当问题达到顶峰时,您的系统可能会在没有警告的情况下冻结或崩溃。有时,它无法启动。
为了处理这些问题,控制碎片很重要。否则,您的系统效率将受到严重影响。
如何解决问题?(How to fix the issue?)
虽然碎片是不可避免的,但需要处理它,以保持您的系统正常运行。要解决此问题,必须执行另一个称为碎片整理的过程。什么是碎片整理?如何进行碎片整理?
什么是碎片整理?
本质上,硬盘就像我们电脑的一个文件柜(filing cabinet),里面所有需要的文件都散落在这个文件柜里(filing cabinet),杂乱无章。因此,每次有新项目到来时,我们都会花费很长时间来寻找所需的文件,而如果我们有一个组织者按字母顺序组织这些文件,我们会更容易快速轻松地找到所需的文件。
碎片整理收集文件的所有碎片部分并将(file and stores)它们存储在连续的存储位置。简单(Simply)来说,就是碎片化的反面。它不能手动完成。您需要使用为此目的而设计的工具。这确实是一个耗时的过程。但是有必要提高系统的性能。
这就是磁盘碎片整理(disk defragmentation)过程的发生方式,操作系统中(operating system)内置的存储算法(storage algorithm)应该自动执行。在碎片整理期间,系统通过移动数据块将所有分散的数据整合到紧密的扇区中,将所有分散的部分聚集在一起,形成一个有凝聚力的数据流。
发布后,碎片整理可以体验到相当大的速度提升,例如更快的(speed increase)PC 性能(PC performance)、更短的启动时间(boot time)以及更少的死机频率。请注意,碎片整理是一个非常耗时的过程,因为必须逐个扇区读取和组织整个磁盘。
大多数现代操作系统(Operating) 都带有内置于系统中的(Systems)碎片整理过程。(defragmentation process)但是,在以前的Windows 版本(Windows version)中,情况并非如此,即使确实如此,该算法的效率也不足以完全缓解潜在问题。
因此(Hence),碎片整理软件(defragmentation software)应运而生。在复制或移动文件的过程中,我们可能会看到正在进行的读写操作,因为进度条(progress bar)清楚地显示了该过程。但是,操作系统(Operating system)运行的大多数读/写进程是不可见的。因此,用户无法对此进行跟踪并系统地对其硬盘进行碎片整理。
另请阅读:(Also Read:)重启和重启(Reboot and Restart)有什么区别(Difference)?
因此,Windows 操作系统(Windows Operating system)预装了默认的碎片整理工具(default defragmentation tool),但由于缺乏有效的技术,其他各种第三方软件(party software)开发商推出了自己的版本来解决碎片问题。
还有一些第三方工具,它们比 Windows 的内置工具执行得更好。下面列出了一些最好的免费碎片整理工具:
- 碎片整理程序
- 智能碎片整理
- Auslogics 磁盘碎片整理
- Puran碎片整理
- 磁盘加速
最好的工具之一是“碎片整理(Defraggler)程序”。您可以设置一个时间表,该工具将根据设置的时间表(set schedule)自动执行碎片整理。您可以选择要包含的特定文件和文件夹。或者您也可以排除某些数据。它有一个便携式版本。它执行有用的操作,例如将较少使用的碎片移动到磁盘末尾以增强磁盘访问(disk access),并在碎片整理之前清空回收站。(recycle bin)
大多数工具或多或少都有类似的界面。使用该工具的方法是不言自明的。用户选择他们想要进行碎片整理的驱动器,然后单击按钮开始该过程。预计该过程至少需要一个小时左右。建议每年或至少每 2-3 年进行一次,具体取决于使用情况。既然使用这些工具既简单又免费,为什么不利用它来保持系统的效率稳定呢?
固态硬盘和碎片
固态硬盘 ( SSD ) 是最新的存储技术(storage technology),已在大多数面向消费者的设备(如智能手机、平板电脑、笔记本电脑、计算机等)中普遍使用。固态硬盘是使用基于闪存的内存制造的,这正是我们的闪存或拇指驱动器中使用的内存技术。(memory technology)
如果您使用的是带有固态硬盘驱动器的系统,您应该执行碎片整理吗?SSD与硬盘驱动器的不同之处在于其所有部件都是静态的。如果没有移动部件,则收集文件的不同片段不会浪费太多时间。因此,在这种情况下访问文件会更快。
但是,由于文件系统(file system)仍然相同,因此在使用SSD的系统中也会出现碎片。不过好在性能几乎没有受到影响,所以不需要进行碎片整理。
在SSD(SSD)上执行碎片整理甚至可能是有害的。固态硬盘驱动器允许固定的有限数量的写入。重复执行碎片整理将涉及将文件从当前位置移动并将它们写入新位置。这将导致SSD在其生命周期的早期磨损。
因此,对SSD(SSDs)执行碎片整理会产生破坏性影响。事实上,如果有SSD ,许多系统都会禁用(SSD)碎片整理选项(defrag option)。其他系统会发出警告,以便您了解后果。
推荐:(Recommended:)在Windows 10中检查您的驱动器(Drive)是SSD 还是 HDD(SSD or HDD)
结论
好吧,我们确信您现在已经更好地理解了碎片和碎片整理的概念。(fragmentation and defragmentation)
需要牢记的几点建议:(A couple of pointers to keep in mind:)
1. 由于磁盘驱动器的碎片整理在硬盘使用(drive usage)方面是一个昂贵的过程,因此最好将其限制为仅在必要时执行
2.不仅限制驱动器的碎片整理,而且在使用固态驱动器时,没有必要执行碎片整理,原因有两个,
- 首先,SSD(SSDs)的默认读写速度非常快,因此较小的碎片不会(fragmentation doesn)对速度产生太大影响
- 其次,SSD(SSDs)也有有限的读写周期,所以最好避免在SSD(SSDs)上进行这种碎片整理以避免使用这些周期
3. 碎片整理是一个简单的过程,用于组织由于在硬盘驱动器上添加和删除文件而导致的孤立文件的所有位。
What is Fragmentation and Defragmentation
Are yоu looking to understand what is Fragmentation and Defragmentation? Then you havе come to the right place, as today we will understand what these terms exactly mean. And whеn fragmentation and defragmentation is rеquired.
In the early days of computers, we had, now ancient storage media such as magnetic tapes, punch cards, punch tapes, magnetic floppy disks, and a couple of others. These were extremely low on storage and speed. In addition to that, they were unreliable as they would easily get corrupted. These issues plagued the computer industry to innovate newer storage technologies. As a result, came the legendary spinning disk drives that used magnets to store and retrieve data. A common thread among all of these types of storages was that in order to read a piece of specific information, the entire media had to to be read sequentially
They were significantly faster than the aforementioned ancient storage media but they came with their own kinks. One of the issues with magnetic hard disk drives was called fragmentation.
What are Fragmentation and Defragmentation?
You might have heard the terms fragmentation and defragmentation. Have you ever wondered what they mean? Or how the system performs these operations? Let us learn everything about these terms.
What is Fragmentation?
It is important that we learn how a hard disk drive works before we explore the world of fragmentation. A hard disk drive is made up of several parts, but there are just two major parts we need to know the first one being the “platter”, this is exactly like what you might imagine a metal plate but small enough to fit the disk.
There are a couple of these metal discs that have a microscopic layer of magnetic material on them and these metal discs store all of our data. This platter spins at a very high speed but usually at a consistent speed of 5400 RPM (Revolutions Per Minute) or 7200 RPM.
The faster the RPM of the spinning disk the faster the data read/write times. The second one is a component called the Disk read/write head or just “spinner head” that are placed on these disks, this head picks up and makes changes to the magnetic signals that come from the platter. The data is stored in small batches called sectors.
So every time a new task or a file is processed new sectors of memory are created. However, to be more efficient with the disk space, the system tries to fill up the previously unused sector or sectors. This is where the major issue of fragmentation stems from. Since the data is stored in fragments all over the hard disk drive, every time we need to access a particular data the system has to go through all of those fragments, and this makes the entire process as well as the system as a whole extremely slow.
Outside the computing world, what is fragmentation? Fragments are small portions of something that when put together, form the whole entity. It is the same concept that is used here. A system stores several files. Each of these files is opened, appended, saved and stored again. When the size of the file is more than what it was before the system fetched the file for editing, there is a need for fragmentation. The file is broken down into parts and the parts are stored in different locations of the storage area. These parts are also referred to as ‘fragments.’ Tools such as the File Allocation Table (FAT) are used to track the location of different fragments in storage.
This is not visible to you, the user. Irrespective of how a file is stored, you will see the whole file in the place where you saved it on your system. But in the hard drive, things are quite different. The various fragments of the file are scattered across the storage device. When the user clicks on the file to open it again, the hard disk quickly assembles all the fragments, so it is presented to you as a whole.
Also Read: What are Administrative Tools in Windows 10?
An appropriate analogy to understand fragmentation would be a card game. Let us suppose that you need a whole deck of cards to play. If the cards are scattered across the place, you will have to collect them from different parts to get the whole deck. The scattered cards can be thought of as the fragments of a file. Collecting the cards is analogous to the hard disk assembling the fragments when the file is fetched.
The reason behind fragmentation
Now that we have some clarity on fragmentation, let us understand why fragmentation occurs. The structure of the file system is the primary reason behind fragmentation. Let us say, a file is deleted by a user. Now, the place it occupied is free. However, this space may not be large enough to accommodate a new file as a whole. If this is the case, the new file is fragmented, and the parts are stored in various locations where space is available. Sometimes, the file system reserves more space for a file than needed, leaving spaces in the storage.
There are operating systems that store files without implementing fragmentation. However, with Windows, fragmentation is how files are stored.
What are the potential problems resulting from fragmentation?
When files are stored in an organized manner, it would take less time for the hard drive to retrieve a file. If files are stored in fragments, the hard disk has to cover more area while retrieving a file. Eventually, as more and more files are stored as fragments, your system will slow down because of the time taken to pick & assemble the various fragments during retrieval.
An appropriate analogy to understand this – consider a library known for lousy service. The librarian does not replace the returned books on their respective shelves. They instead place the books on a shelf closest to their desk. Although it seems like a lot of time is saved while storing the books this way, the real problem arises when a customer wants to borrow one of these books. It will take a long time for the librarian to search among books stored in random order.
This is why fragmentation is called ‘a necessary evil.’ It is quicker to store files this way, but it eventually slows down the system.
How to detect a fragmented drive?
Too much fragmentation affects your system’s performance. So, it is easy to tell if your drive is fragmented if you observe a drop in performance. The time taken to open and save your files has risen evidently. Sometimes, other applications slow down as well. With time, your system will take forever to boot.
Apart from the obvious issues that fragmentation causes, there are other serious problems. One example is the degraded performance of your Antivirus application. An Antivirus application is built to scan all the files on your hard drive. If most of your files are stored as fragments, the application will take a long time to scan your files.
The backing up of data also suffers. It takes longer than expected time. When the problem reaches its peak, your system may freeze or crash without warnings. Sometimes, it is unable to boot.
To handle these issues, it is important to keep fragmentation in check. Otherwise, the efficiency of your system is seriously affected.
How to fix the issue?
Although fragmentation is unavoidable, it needs to be dealt with, to keep your system up and running. To fix this problem, another process called defragmentation has to be performed. What is defragmentation? How to perform defrag?
What is Defragmentation?
Essentially, the hard drive is like a filing cabinet of our computer and all of the required files in it are scattered and unorganized in this filing cabinet. So, every time a new project comes we will be spending a long time looking for the required files whereas if we had got an organizer to organize those files alphabetically, it would have been much easier for us to find the required files quickly and easily.
Defragmentation collects all the fragmented parts of a file and stores these in contiguous storage locations. Simply put, it is the reverse of fragmentation. It cannot be done manually. You need to use tools designed for the purpose. This is indeed a time-consuming process. But it is necessary to improve your system’s performance.
This is how the process of disk defragmentation takes place, the storage algorithm built within the operating system is supposed to do automatically. During defragmentation, the system consolidates all the scattered data into tight sectors by moving the data blocks around to bring all of the scattered parts together as one cohesive stream of data.
Post, the defragmentation a considerable amount of speed increase can be experienced such as faster PC performance, shorter boot time, and far less frequent freeze-ups. Do note that defragmentation is a very time-consuming process since the entire disk has to be read and organized sector by sector.
Most of the modern Operating Systems come with a defragmentation process built right into the system. However, in the previous Windows version, this was not the case or even if it did, the algorithm was not efficient enough to completely mitigate the underlying issues.
Hence, the defragmentation software came into existence. During copying or moving files we may see the read and write operation taking place due to the progress bar displaying the process clearly. However, most of the read/write processes that the Operating system runs are not visible. So, users cannot keep a track of this and systematically defragment their hard drives.
Also Read: What is the Difference between Reboot and Restart?
As a result, the Windows Operating system came pre-loaded with a default defragmentation tool however due to the lack of efficient technologies, various other third party software developers launched their own flavor of it to tackle the issue of fragmentation.
There are some third-party tools as well, which perform the job even better than the Windows’ built-in tool. Some of the best free tools for defragging are listed below:
- Defraggler
- Smart Defrag
- Auslogics Disk Defrag
- Puran Defrag
- Disk SpeedUp
One of the best tools for this is ‘Defraggler’. You can set a schedule and the tool will automatically perform defragmentation according to the set schedule. You may choose specific files and folders to be included. Or you may exclude certain data too. It has a portable version. It performs useful operations such as moving the lesser-used fragments to the end of the disk for enhanced disk access and emptying the recycle bin before defragging.
Most of the tools have more or less a similar interface. The method to use the tool is quite self-explanatory. The user chooses which drive they want to defrag and click on the button to begin the process. Expect the process to take at least an hour or so. It is advised to do this yearly or at least once in 2-3 years, depending on usage. Since it is anyway simple and free to use these tools, why not make use of it, to keep your system’s efficiency stable?
Solid State Drive and Fragmentation
Solid-state drives(SSD) are the latest storage technology that has become common in most consumer-facing devices such as smartphones, tablets, laptops, computers, etc. Solid-state drives are made using flash-based memory, which is the exact memory technology used in our flash or thumb drives.
If you are using a system with a solid-state hard drive, should you perform defragmentation? An SSD is different from a hard drive in the sense that all of its parts are static. If there are no moving parts, not much time is lost in gathering the different fragments of a file. So, accessing a file is faster in this case.
However, since the file system is still the same, fragmentation occurs in systems with SSD too. But fortunately, the performance is hardly affected, so there is no need to perform defrag.
Performing defragmentation on an SSD can even be harmful. A solid-state hard drive allows a fixed finite number of writes. Repeatedly performing defrag would involve moving the files from their current location and writing them to a new location. This would cause the SSD to wear out early in its lifespan.
Thus, performing defrag on your SSDs will have damaging effects. In fact, many systems disable the defrag option if they have an SSD. Other systems would issue a warning so that you are aware of the consequences.
Recommended: Check If Your Drive is SSD or HDD in Windows 10
Conclusion
Well, we’re sure you’ve now understood the concept of fragmentation and defragmentation much better.
A couple of pointers to keep in mind:
1. Since defragmentation of disk drives is an expensive process in terms of the hard drive usage, it’s best to limit it to only performing as and when necessary
2. Not just limiting the defragmentation of drives, but when working with solid-state drives, it’s not necessary to perform defragmentation for two reasons,
- First, SSDs are built to have a very fast read-write speed by default so minor fragmentation doesn’t really make much difference to the speeds
- Second, SSDs also have limited read-write cycles so it’s best to avoid this defragmentation on SSDs to avoid the use of those cycles
3. Defragmentation is a simple process of organizing all the bits of files that have been orphaned due to adding and deleting files on hard disk drives.