Sẽ viết hiệu suất cải thiện nếu một ổ cứng định dạng lại được lấp đầy với Zeroes?

Mục lục:

Sẽ viết hiệu suất cải thiện nếu một ổ cứng định dạng lại được lấp đầy với Zeroes?
Sẽ viết hiệu suất cải thiện nếu một ổ cứng định dạng lại được lấp đầy với Zeroes?

Video: Sẽ viết hiệu suất cải thiện nếu một ổ cứng định dạng lại được lấp đầy với Zeroes?

Video: Sẽ viết hiệu suất cải thiện nếu một ổ cứng định dạng lại được lấp đầy với Zeroes?
Video: Cách tạo Header, Footer cùng đánh số trang tùy ý trong văn bản Word - YouTube 2024, Tháng tư
Anonim
Nếu bạn định định dạng lại ổ đĩa cứng, liệu có bất cứ điều gì mà ‘cải thiện’ có thể ghi lại hiệu suất sau đó hay không hay đó là điều mà bạn thậm chí không nên lo lắng? Bài đăng Hỏi & Đáp của SuperUser hôm nay có câu trả lời cho câu hỏi của người đọc tò mò.
Nếu bạn định định dạng lại ổ đĩa cứng, liệu có bất cứ điều gì mà ‘cải thiện’ có thể ghi lại hiệu suất sau đó hay không hay đó là điều mà bạn thậm chí không nên lo lắng? Bài đăng Hỏi & Đáp của SuperUser hôm nay có câu trả lời cho câu hỏi của người đọc tò mò.

Phiên Hỏi & Đáp hôm nay đến với chúng tôi theo lịch sự của SuperUser - một phân khu của Stack Exchange, một nhóm các trang web Hỏi & Đáp do cộng đồng điều hành.

Ảnh lịch sự của Chris Bannister (Flickr).

Câu hỏi

Người đọc SuperUser Brettetete muốn biết nếu điền vào một ổ đĩa cứng với số không sẽ cải thiện hiệu suất ghi:

I have a 2TB hard-drive that was 99 percent full. I have deleted the partitions with fdisk and formatted it as ext4. As far as I know, the actual data that was on the hard-drive still exists, yet the partition table was reassigned.

My question is: Would it improve the write performance for further write actions if the hard-drive was clean? By ‘clean’ I mean fill the hard-drive with zeroes? Something like:

dd if=/dev/zero of=/dev/sdx bs=1 count=4503599627370496

Sẽ làm đầy ổ đĩa cứng với zeroes cải thiện hiệu suất ghi?

Câu trả lời

Người đóng góp SuperUser Michael Kjörling có câu trả lời cho chúng tôi:

No, it would not improve performance. HDDs do not work like that.

First, when you write any given data to a rotational drive, it gets transformed into magnetic domains that may actually look very different from the bit pattern you are writing. This is done in part because it is much easier to maintain synchronization when the pattern read back from the platter has a certain amount of variability. For example, a long string of ‘zero’ or ‘one’ values would make it very hard to maintain synchronization. Have you read 26,393 bits or 26,394 bits? How do you recognize the boundary between bits?

The techniques for doing this have evolved over time. For example, look up Modified Frequency Modulation, MMFM, Group Code Recording, and the more general technology of run-length limited encodings.

Second, when you write new data to a sector, the magnetic domains of the relevant portions of the platter are simply set to the desired value. This is done regardless of what the previous magnetic domain ‘was’ at that particular physical location. The platter is already spinning under the write head; first reading the current value, then writing the new value if and only if it is different. It would cause each write to require two revolutions (or an extra head for each platter), causing write latency to double or greatly increasing the complexity of the drive, in turn increasing cost.

Since the limiting factor in hard-drive sequential I/O performance is how quickly each bit passes under the read/write head, this would not even offer any benefit to the user. As an aside, the limiting factor in random I/O performance is how fast the read/write head can be positioned at the desired cylinder and then the desired sector arrives under the head. The major reason why SSDs can be so fast in random I/O workloads is that they completely eliminate both of these factors.

As pointed out by JakeGould, one reason why you might want to overwrite the drive with some fixed pattern (such as all zeroes) would be to ensure that no remnants of previously stored data can be recovered, either deliberately or accidentally. But doing so will not have any effect on the hard-drive’s performance going forward, for the reasons stated above.

Có cái gì để thêm vào lời giải thích? Tắt â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: