linux dd命令測試隨身碟讀寫速度,dd讀寫速度

來源:互聯網
上載者:User

linux dd命令測試隨身碟讀寫速度,dd讀寫速度

1. dd命令簡述:

  if=輸入檔案, of=輸出檔案, ibs=一次讀取位元組數, obs=一次寫入位元組數, bs=設定一次讀取寫入的位元組數, skip=跳過的bs數, count=拷貝的塊數

2. 使用/dev/null和/dev/zero

  1. 把/dev/null看作"黑洞", 它等價於一個唯寫檔案, 所有寫入它的內容都會永遠丟失

  2. /dev/zero是一個偽檔案, 但它實際上產生連續不斷的null的流

3. 測試隨身碟讀寫速度

## 切入u盤目錄,測試寫入速度
# dd if=/dev/zero of=./largefile bs=8k count=10000
10000+0 records in
10000+0 records out
81920000 bytes (82 MB) copied, 11.0626 s, 7.4 MB/s

## 測試讀取速度 (清除緩衝)
# sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches"     
# dd if=./largefile of=/dev/null bs=8k
8000+0 records in
8000+0 records out
65536000 bytes (66 MB) copied, 2.90366 s, 22.6 MB/s

 

來源:互連網

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.