This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
您可以尝试使用 bs 参数来增加块大小; 默认情况下,我相信 dd 使用的块大小等于磁盘的首选块大小,这意味着需要更多的读取和写入来复制整个磁盘。 Linux 的 dd 支持人类可读的后缀:
You might try increasing the block size using the bs argument; by default, I believe dd uses a block size equal to the disk's preferred block size, which will mean many more reads and writes to copy an entire disk. Linux's dd supports human-readable suffixes:
对我来说最快:
达到约 100MiB/s,而其他选项(单进程、无直接、默认 512b 块大小,...)甚至达不到 30MiB/s...
要查看进度,请在另一个控制台中运行:
The fastest for me:
reaches ~100MiB/s, whereas other options (single process, no direct, default 512b block size, ...) don't even reach 30MiB/s...
To watch the progress, run in another console:
Commodore Jaeger 的说法是正确的:
此外,调整驱动器上的“预读”通常可以提高性能。 默认值可能是 256,最佳值可能是 1024。每个设置都不同,因此您必须运行基准测试才能找到最佳值。
Commodore Jaeger is right about:
Also, adjusting "readahead" on the drives usually improves performance. The default may be something like 256, and optimal 1024. Each setup is different, so you would have to run benchmarks to find the best value.
如果两个磁盘使用不同的通道(例如SATA),您可以使用高性能工具,例如fastDD。 作者声称:
此外,该工具的语法与旧的
dd
非常相似。http://www.dei.unipd.it/~zagonico/fastdd/
https://github.com/zagonico86/fastdd
if the two disks use different channel (e.g., SATA) you can use high performance tool like fastDD. The authors claim:
Moreover the tool keeps a syntax very similar to the old
dd
.http://www.dei.unipd.it/~zagonico/fastdd/
https://github.com/zagonico86/fastdd
关于您的更新:您的硬盘缓存有多大? (特别是写作方面)。 这可能太多了,您可能需要减少它以防止不必要的阻塞。
About your update: How big are the caches of your HDs? (specially the writing one). It may be that that is too much and you may need to reduce it to prevent unnecessary blocking.
也许您可以使用两个进程,
我假设您可以设置其他适合您的 dd 选项。
这有一些开销,但应该允许读取之间的异步
一个磁盘并写入另一个磁盘。
Maybe you can use two processes
I'll assume you can set the other dd options as it suits you.
This has some overhead but should allow asynchrony between reading
one disk and writing the other.
你确定它不是同时做的吗? 我希望磁盘缓存能够确保这种情况发生。 如果没有,非阻塞甚至异步读/写可能会有所帮助,
Are you sure it isn't doing that at the same time? I would expect the disk caches to make sure it that happens. If not, non-blocking or even asynchronous reads/writes may help,