Đĩa phân mảnh là gì và tôi vẫn cần phải chống phân mảnh?

Mục lục:

Đĩa phân mảnh là gì và tôi vẫn cần phải chống phân mảnh?
Đĩa phân mảnh là gì và tôi vẫn cần phải chống phân mảnh?

Video: Đĩa phân mảnh là gì và tôi vẫn cần phải chống phân mảnh?

Video: Đĩa phân mảnh là gì và tôi vẫn cần phải chống phân mảnh?
Video: Cách chuyển vùng CH Play sang Mỹ (Hoa Kỳ) - Chuyển Vùng Google Play sang Mỹ (Hoa Kỳ) / Mới Nhất 2022 - YouTube 2024, Tháng tư
Anonim
Máy tính hiện đại vẫn cần loại thủ tục chống phân mảnh thường xuyên mà các máy tính cũ gọi là? Đọc tiếp để tìm hiểu về phân mảnh và hệ điều hành và hệ thống tệp hiện đại nào để giảm thiểu các tác động về hiệu suất.
Máy tính hiện đại vẫn cần loại thủ tục chống phân mảnh thường xuyên mà các máy tính cũ gọi là? Đọc tiếp để tìm hiểu về phân mảnh và hệ điều hành và hệ thống tệp hiện đại nào để giảm thiểu các tác động về hiệu suất.

Today Questionôs Câu hỏi & trả lời phiên đến với chúng tôi lịch sự của SuperUser‚Äîa phân khu của Stack Exchange, một nhóm cộng đồng ổ đĩa của Q & A các trang web.

Câu hỏi

Người đọc SuperUser Simon Sheehan tò mò về trạng thái phân mảnh trong ổ đĩa hiện đại:

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?

Let‚Äô chuyển sang một số câu trả lời của người đóng góp để điều tra câu hỏi của Simon‚Äôs.

Câu trả lời

Người đóng góp SuperUser Daniel R. Hicks sẽ đưa ra câu hỏi:

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 smarter 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 consumed 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 “smart” fashion so the fragmentation reaches a certain threshold and then stabilizes, rather than getting worse and worse.]

Journeyman Geek thêm vào các thông tin sau về các hệ thống tập tin 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 consecutive 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.

Một yếu tố của câu hỏi ban đầu không được giải quyết là bạn có nên chống phân mảnh ổ đĩa flash của mình hay không. Chống phân mảnh là quá trình đọc / ghi rất chuyên nghiệp và nên tránh trên các thiết bị lưu trữ trạng thái rắn như ổ đĩa flash và đĩa trạng thái rắn (SSD). Để biết thêm thông tin về chống phân mảnh, hệ thống tệp và SSD, hãy xem các bài viết HTG sau:

  • HTG giải thích: Bạn có thực sự cần phải chống phân mảnh PC của bạn?
  • HTG giải thích: Điều gì là một ổ đĩa thể rắn và tôi cần biết điều gì?
  • HTG giải thích: Tại sao Linux không cần chống phân mảnh

Có cái gì để thêm vào lời giải thích? Âm thanh trong các ý kiến. Bạn muốn đọc thêm câu trả lời từ những người dùng Stack Exchange có hiểu biết công nghệ khác? Xem toàn bộ chuỗi thảo luận tại đây.

Đề xuất: