dnf提示磁盘碎片需要整理_什么是磁盘碎片?我还需要进行碎片整理吗?

dnf提示磁盘碎片需要整理

dnf提示磁盘碎片需要整理

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.

现代计算机是否仍需要旧计算机要求的那种常规的碎片整理程序? 继续阅读以了解碎片以及现代操作系统和文件系统如何最大程度地降低性能影响。

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-drive grouping of Q&A web sites.

今天的问答环节由SuperUser提供,它是Stack Exchange的一个分支,它是Q&A网站的社区推动组织。

问题 (The Question)

SuperUser reader Simon Sheehan is curious about the state of defragmentation in modern drives:

超级用户读者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?

作为Windows常规维护的一部分,我对硬盘驱动器进行了碎片整理。 但是,为什么硬盘驱动器会在NTFS和FAT *系统上碎片化? 显然EXT *不是,这是为什么? 我还应该对USB驱动器进行碎片整理吗?

Let’s turn to some of the contributor answers to investigate Simon’s question.

让我们转向一些贡献者的答案来调查西蒙的问题。

答案 (The Answer)

SuperUser contributor Daniel R. Hicks fields the question:

超级用户贡献者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.

碎片化不是30年前的问题。 那时,您的硬盘几乎比软盘快,而处理器的内存却很小。 现在,您拥有非常快的驱动器和较大的处理器内存,有时在硬盘驱动器或控制器中还有大量缓冲。 加上扇区的大小已变大(或文件分配在更大的块中),因此更多的数据本来就是连续的。

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.

操作系统也变得更加智能。 尽管DOS 1.x会按引用从磁盘中获取每个扇区,但是现代的OS可以看到您已打开文件以进行顺序访问,并且可以合理地预测一旦使用完文件,您将获取其他扇区。那些你现在拥有的。 因此,它可以“预取”接下来的几个(六个)扇区。

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.

无论我的盒子是否需要整理,我都会每2-3年进行一次碎片整理。

[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.]

[我将补充一点,重要的不是磁盘数据是否进行碎片整理,而是可用空间是否进行碎片整理。 FAT在这方面很糟糕-除非您进行了碎片整理,否则事情会越来越糟,直到没有两个连续的可用空间块为止。 大多数其他方案可以合并自由空间并以某种“智能”方式分配碎片,以便碎片达到一定的阈值然后稳定下来,而不是越来越糟。

Journeyman Geek adds in the following information about Linux file systems:

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:

所有文件系统片段。 由于ext和其他Linux文件系统的设计方式,它们的碎片较少-引用Wikipedia《 Linux网络管理员指南》

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.

现代Linux文件系统通过将 文件中的 所有块保持 在一起而 将碎片最小化 ,即使它们不能存储在连续的扇区中也是如此。 某些文件系统(例如ext3)可以有效分配最接近文件中其他块的空闲块。 因此,不必担心Linux系统中的碎片。

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

我要指出的是,尽管ext4具有联机碎片整理功能,所以即使Linux文件系统也最终会出现碎片问题。

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.

Windows文件系统将它们的群集放置在有空间放置它们的位置,然后进行碎片整理并替换它们。 使用Linux,文件优先放置在有足够空间的地方。

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

不过,我要指出的是,Windows 7已安排了碎片整理运行,因此实际上没有必要手动运行碎片整理。

One element of the original question that wasn’t addressed is whether or not you should defragment your flash drive. Defragmentation is a very reader/write intensive process and should be avoided on solid-state storage devices like flash drives and Solid State Disks (SSDs). For more information on defragmentation, file systems, and SSDs, check out the following HTG articles:

原始问题中未解决的一个要素是是否应该对闪存驱动器进行碎片整理。 碎片整理是一个非常耗费读/写操作的过程,应避免在闪存驱动器和固态磁盘(SSD)等固态存储设备上进行碎片整理。 有关碎片整理,文件系统和SSD的更多信息,请查看以下HTG文章:



Have something to add to the explanation? Sound off in the the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不对。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程

翻译自: https://www.howtogeek.com/130794/what-is-disk-fragmentation-and-do-i-still-need-to-defragment/

dnf提示磁盘碎片需要整理

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值