1. 程式人生 > 實用技巧 >mac碎片清理_為什麼Mac硬碟不需要碎片整理

mac碎片清理_為什麼Mac硬碟不需要碎片整理

mac碎片清理

mac碎片清理

On Windows, traditional hard drives (but not solid state drives) typically need defragmenting—a process that can take quite a long time. On macOS (and Linux), you don’t need to worry about it at all. Why is this, and what is defragmenting, anyway? Let’s take a look.

在Windows上,傳統的硬碟驅動器(而不是固態驅動器)通常需要進行碎片整理,此過程可能需要很長時間。 在macOS(和

Linux )上,您完全不需要擔心。 為什麼會這樣,並且進行碎片整理呢? 讓我們來看看。

那麼什麼是碎片整理,為什麼Windows需要它? (So What is Defragmenting, and Why Does Windows Need It?)

First up, let’s get this out of the way. You don’t need to defragment solid-state drives (in fact, most operating systems won’t even let you). What we’re talking about here are traditional hard drives with spinning platters.

首先,讓我們解決這個問題。 您無需對固態驅動器進行碎片整理(實際上,大多數作業系統甚至都不允許您這樣做)。 我們在這裡談論的是具有旋轉碟片的傳統硬碟驅動器。

Even on Windows, defragmentation is not as big a deal as it was in the past. Modern hard drives are faster, modern systems have more memory, and Windows now defaults to using the NTFS file system—all of which reduce the need for defragmenting on traditional hard drives.On top of that, if you have such a drive, Windows Vista, 7, 8, and ten all perform automatic defragmentation during as part of their regularly scheduled maintenance, so you don’t even have to worry about doing it yourself.

即使在Windows上,碎片整理也沒有過去那麼重要。 現代硬碟驅動器速度更快,現代系統具有更多記憶體,Windows現在預設使用NTFS檔案系統,所有這些都減少了對傳統硬碟驅動器進行碎片整理的需求。 最重要的是,如果您有這樣的驅動器,則Windows Vista,7、8和10會在其定期維護期間執行自動碎片整理,因此您甚至不必擔心自己動手。

But, what is defragmentation?

但是,什麼是碎片整理?

Put simply, when you delete a file from your hard drive, the space that file took up is marked as available. Delete more things, and you have more available space in bits and pieces scattered across your hard drive. When your operating system writes a new file to the disk (or when a file grows in size), part of that file might go into one available space and part into another. That’s fragmentation.

簡而言之,當您從硬碟驅動器中刪除檔案時,該檔案佔用的空間將標記為可用。 刪除更多內容,分散在硬碟驅動器上的點點滴滴就有更多可用空間。 當作業系統將新檔案寫入磁碟時(或檔案大小增加時),該檔案的一部分可能會進入一個可用空間,而另一部分可能會進入另一個可用空間。 那是碎片。

All operating systems suffer some level of fragmentation. It’s how their file systems handle it that’s important. macOS and Linux handle file storage a little differently. Instead of placing multiple files near one another on the disk, they try to scatter those files in different places. This leaves room for files to grow and to create new files. If fragmentation does occur, the operating systems try to move files around to accommodate.

所有作業系統都遭受某種程度的碎片化。 重要的是檔案系統如何處理它。 macOS和Linux處理檔案儲存的方式略有不同。 他們沒有將多個檔案放在磁碟上彼此靠近,而是嘗試將這些檔案分散在不同的位置。 這為檔案增長和建立新檔案留出了空間。 如果確實發生碎片,作業系統將嘗試移動檔案以適應這些問題。

Windows works differently. On old file systems like FAT and FAT32, there was no built-in protection against fragmentation and drives required regular defragmentation. These days, Windows uses the NTFS file system by default on most drives, which has some built-in protection against fragmentation (it leaves some buffer space for files to grow)—but it still isn’t perfect.

Windows的工作方式有所不同。 在諸如FAT和FAT32的舊檔案系統上,沒有內建的防碎片保護功能,並且驅動器需要定期進行碎片整理。 如今,Windows預設情況下在大多數驅動器上使用NTFS檔案系統,該系統具有一些內建的防碎片保護功能(它為檔案增長留出了一定的緩衝空間),但是仍然不夠完美。

Also, most flash drives are still formatted with FAT32 out of the box, and they can become fragmented, too.

同樣,大多數快閃記憶體驅動器仍採用FAT32格式進行格式化,它們也可能變得碎片化。

Defragmentation attempts to fix that by moving all the files back into place. However, it’s is a slow and annoying process. Most people don’t bother, especially since Windows 10 automatically does some defragging for you in the background. Still, many people still perform a full defragmentation every once in a while.

碎片整理嘗試通過將所有檔案移回原位來解決此問題。 但是,這是一個緩慢而煩人的過程。 大多數人都不會打擾,尤其是因為Windows 10在後臺自動為您進行了一些碎片整理。 儘管如此,許多人仍然偶爾會執行完整的碎片整理。

那麼,為什麼Mac不需要碎片整理? (So Why Don’t Macs Need Defragmentation?)

The short answer is that Macs don’t have this problem in the first place, because they use an entirely different filesystem. Another short answer is that nearly all Macs nowadays have solid state drives and just like on Windows, those don’t need defragmenting.

簡而言之,就是Macs首先沒有這個問題,因為Macs使用完全不同的檔案系統。 另一個簡短的答案是,如今幾乎所有Mac電腦都具有固態驅動器,就像在Windows上一樣,它們不需要進行碎片整理。

But for older Macs with spinning hard drives, defragmentation isn’t a problem either. This comes down to the way macOS stores files. TheHFS and APFS file systems that Macs use automatically defrag files anyway usingfancy processes named Hot File Adaptive Clustering and on-the-fly defragmentation.

但是對於具有旋轉硬碟驅動器的舊版Mac而言,碎片整理也不是問題。 這歸結為macOS儲存檔案的方式。 Mac所使用的HFS和APFS檔案系統無論如何都通過名為“熱檔案自適應群集”和即時碎片整理的高階程序自動對檔案進行碎片整理。

When you store a file on macOS, it leaves space for that file to expand, rather than packing the next one right next to it. Also, when you open a file macOS can detect if that file’s in the wrong place and automatically move it to the right place. These two processes combined mean you almost never need to defrag your disk; in fact, Apple doesn’t even ship a defrag utility with new Macs.

當您將檔案儲存在macOS上時,它將留出擴充套件該檔案的空間,而不是將下一個檔案打包在其旁邊。 另外,當您開啟檔案時,macOS可以檢測該檔案是否在錯誤的位置,並自動將其移動到正確的位置。 這兩個過程的結合意味著您幾乎不需要整理磁碟碎片。 實際上,Apple甚至沒有在新Mac上附帶碎片整理實用程式。

如果我仍然想這樣做怎麼辦? (What If I Want To Do It Anyway?)

You can defragment your drive on macOS if you want, but be advised that it:

您可以根據需要在macOS上對驅動器進行碎片整理,但請注意:

  • Probably isn’t necessary. If your computer is acting slow, it’s probably for other reasons.

    可能不是必需的。 如果您的計算機執行緩慢,則可能是由於其他原因。
  • Isn’t necessary at all on solid state drives.

    在固態驅動器上根本不需要。
  • Isn’t really supported, and there isn’t much software that does it.

    並沒有真正得到支援,也沒有太多軟體可以做到這一點。
  • Can make your drive slower, by interfering with macOS’s native defragmentation.

    通過干擾macOS的本機碎片整理,可以使驅動器變慢。

Anyway, if you want to, you can try iDefrag ($12.95 and only works on systems below 10.13 High Sierra) or Drive Genius 4($99).

無論如何,如果您願意的話,可以嘗試iDefrag (12.95美元,僅適用於10.13 High Sierra以下的系統)或Drive Genius 4 (99美元)。

翻譯自: https://www.howtogeek.com/362864/why-mac-hard-drives-don’t-need-defragmenting/

mac碎片清理