什麼是磁碟碎片?我還需要碎片整理嗎?

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,它是一個由Q&a網站組成的社群驅動分組。...

什麼是磁碟碎片?我還需要碎片整理嗎?Do modern computers still need the kind of routine defragmentation procedures that older computers called for? Read on to learn about fragmentation and what modern operating systems and file systems do to minimize performance impacts.

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,它是一個由Q&a網站組成的社群驅動分組。

問題

超級使用者讀者Simon Sheehan對現代硬碟的碎片整理狀態很好奇:

As a part of regular Windows maintenance, I defragment my hard drive. But why does the hard drive fragment on NTFS and FAT* systems? Apparently EXT* does not, why is this? Should I also be defragmenting my USB drives?

讓我們看看投稿人的一些答案來調查西蒙的問題。

答案

超級使用者貢獻者Daniel R.Hicks提出了一個問題:

Fragmentation is not the issue it was 30 years ago. Back then you had hard drives that were scarcely faster than floppies, and processor memory sizes that were minuscule. Now you have very fast drives and large processor memories, and sometimes substantial buffering on the hard drive or in the controller. Plus sector sizes have gotten larger (or files are allocated in larger blocks) so that more data is inherently contiguous.

Operating systems have gotten **arter as well. Whereas DOS 1.x would have fetched each sector from disk as it was referenced, a modern OS is able to see that you have a file open for sequential access and can reasonably predict that you’ll be fetching additional sectors once you’ve c***umed those you have now. Thus it can “pre-fetch” the next several (dozen) sectors.

And any more it’s often better to not have a file contiguous. On a (large) system where the file system is spread across multiple drives a file can actually be accessed faster if it is “spread” as well, since multiple disks can be seeking the file simultaneously.

I defragment every 2-3 years, whether my box needs it or not.

[I’ll add that the important thing is not so much whether the data on the disk gets defragmented as whether the free space does. FAT was terrible at this — unless you defragged things kept getting worse and worse until there were no two contiguous blocks of free space. Most other schemes can coalesce free space and allocate pieces in a somewhat “**art” fashion so the fragmentation reaches a certain threshold and then stabilizes, rather than getting worse and worse.]

Journeyman Geek添加了關於Linux檔案系統的以下資訊:

ALL file systems fragment. ext and other Linux file systems fragment less due to the way they’re designed – to quote Wikipedia regarding the Linux Network Administrators’ Guide:

Modern Linux filesystem(s) keep fragmentation at a minimum by keeping all blocks in a file close together, even if they can’t be stored in c***ecutive sectors. Some filesystems, like ext3, effectively allocate the free block that is nearest to other blocks in a file. Therefore it is not necessary to worry about fragmentation in a Linux system.

I’d note though that ext4 has online defragmentation so eventually fragmentation IS an issue, even with Linux file systems.

Windows file systems have their clusters placed wherever there’s space to put them, and defrag runs around and replaces them. With Linux, files are preferentially placed where there’s enough space.

I’d note though, Windows 7 has scheduled defragmentation runs, so it isn’t really necessary to run defrag manually.

最初的一個問題沒有解決,那就是你是否應該整理你的快閃記憶體驅動器。碎片整理是一個非常讀/寫密集型的過程,應該避免在固態儲存裝置上,如快閃記憶體驅動器和固態磁碟(ssd)。有關碎片整理、檔案系統和SSD的更多資訊,請參閱以下HTG文章:

  • HTG解釋說:你真的需要整理你的電腦嗎?
  • HTG解釋道:什麼是固態硬碟,我需要知道什麼?
  • HTG解釋:為什麼Linux不需要碎片整理

有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。

  • 發表於 2021-04-12 03:43
  • 閱讀 ( 61 )
  • 分類:網際網路

你可能感興趣的文章

7種有效的工具,可在windows上提高硬碟效能

... 在ssd上執行磁碟碎片整理沒有hdd那麼重要,但是微軟仍然建議每月執行一次。 ...

  • 發佈於 2021-03-18 01:20
  • 閲讀 ( 60 )

mac清潔應用程式一文不值嗎?需要考慮的7個因素

... 啟動時是否自動啟動此應用程式? 它有什麼設定可以讓你安排自動維護嗎? 掃描有多深? 我可以在刪除專案之前檢視它們嗎? 你能從掃描結果中排除任何專案嗎? ...

  • 發佈於 2021-03-21 12:01
  • 閲讀 ( 57 )

如何在windows10中修復速度較慢的外部硬碟

...甚至可以從USB3.0驅動器上執行影片遊戲。無論應用程式是什麼,選擇它並單擊“結束任務”停止它。這將有望使驅動器恢復到正常的工作速度。 ...

  • 發佈於 2021-03-25 23:19
  • 閲讀 ( 65 )

如何在Windows10上整理硬碟

...用內建工具對其進行碎片整理和最佳化。下面是方法。 什麼是碎片整理(defragmentation)? 隨著時間的推移,組成檔案的資料塊(片段)可能分散在硬碟表面的多個位置。這叫做碎片化。碎片整理會移動所有這些塊,使它們在物理...

  • 發佈於 2021-04-02 05:08
  • 閲讀 ( 59 )

windows10只會讓windows碎片化變得更糟

...只將一小部分個人電腦升級到當前的軟體。 那麼會發生什麼呢?微軟會在接下來的幾個月裡迅速將這個更新發布到更多的個人電腦上嗎?微軟會跳過2018年10月的更新,直接將所有人升級到19H1嗎?如果是這樣,我們怎麼知道人們...

  • 發佈於 2021-04-04 02:17
  • 閲讀 ( 65 )

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

...的時間。在macOS(和Linux)上,您根本不需要擔心它。為什麼會這樣,到底什麼是碎片整理?我們來看看。 什麼是碎片整理,為什麼windows需要它(defragmenting, and why does windows need it)? 首先,讓我們把這個放一邊。您不需要對固...

  • 發佈於 2021-04-04 23:59
  • 閲讀 ( 51 )

如何在Windows10中自動執行常見的維護任務

...。雖然您可以每隔一段時間自己執行一次磁碟清理,但為什麼不安排它自動執行呢? 您可以在Windows中使用任務排程器來執行基本的磁碟清理掃描,只要您願意,並且使用一些額外的命令列開關,您就可以在高階模式下進行更大...

  • 發佈於 2021-04-05 05:39
  • 閲讀 ( 75 )

如何縮小virtualbox虛擬機器並釋放磁碟空間

...選項卡並選擇磁碟。您將看到“詳細資訊”旁邊顯示的是什麼型別的磁碟。例如,在下面的螢幕截圖中,“動態分配的儲存”表示這是一個動態磁碟。 第二步:將零寫入虛擬機器中的磁碟 在繼續之前,請確保刪除虛擬機器內磁...

  • 發佈於 2021-04-07 14:42
  • 閲讀 ( 64 )

如何繞過windows的“縮量”不足問題

...多的系統檔案,至少暫時禁用。以下是步驟列表: 執行磁碟清理嚮導,確保刪除休眠檔案和所有還原點。 禁用系統還原 禁用頁面檔案(在控制面板中開啟系統,然後開啟高階系統設定\Advanced\Performance\Advanced\Change\No Paging File)...

  • 發佈於 2021-04-08 15:11
  • 閲讀 ( 48 )

10種快速加速執行Windows7、8或10的慢速pc的方法

...的原因可能有很多。 就像所有的電腦問題一樣,如果有什麼東西不能正常工作,不要害怕重新啟動你的電腦。這可以解決相當多的問題,而且比嘗試手動排除故障和自己解決問題要快。 查詢資源匱乏的程式 你的電腦執行緩慢...

  • 發佈於 2021-04-08 18:02
  • 閲讀 ( 53 )
zqszf5525
zqszf5525

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章

相關推薦