Find the answer to your Linux question:
Results 1 to 7 of 7
Hi folks, How to find the value of bs= to have the best erformance of dd in cloning disk image? TIA B.R. satimis...
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,546

    About bs= on running dd command

    Hi folks,


    How to find the value of bs= to have the best erformance of dd in cloning disk image? TIA


    B.R.
    satimis

  2. #2
    Linux Newbie
    Join Date
    Jul 2008
    Posts
    181
    Trial and error?

  3. #3
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,546
    Quote Originally Posted by burschik View Post
    Trial and error?
    No error.


    On a Virtual Machine running Xen, I run following dd command to clone an image;


    # dd if=/path/to/disk.img of=/new_path/to/disk.img bs=4k


    It works. But I expect to find out bs=? would have the best result running the above command.


    B.R.
    satimis

  4. #4
    Linux Newbie
    Join Date
    Jul 2008
    Posts
    181
    "Trial and error" is a phrase. I think the only way to find an answer is to select a few different values for bs and compare results.

  5. #5
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,096
    Take a look at the dd invocation page. I think it will give you some helpful information.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  6. #6
    Linux User
    Join Date
    May 2008
    Location
    NYC, moved from KS & MO
    Posts
    251
    I happened to dd a 60G notebook IDE (5400RPM) HD to another one (whole disk clone) that has the same size and buffer (8MB) and the value I used to bs is 1024K, I also tried 2048K, which didn't improve the speed; and 8096K, which is even slower than when bs=1024K. The time to finish the clone was about 1 hour, with bs=1024K.

  7. #7
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,546
    Hi folks,


    Thanks for your advice.


    I'm testing server consoliation on Virtual Machine to clone Guest image. The Guest image size is in the range of 2G~4G. To clone 2 or 3 images I won't spend time on finding the best bs value. If cloning >100 images it is worthwhile spending half hour on it.


    B.R.
    satimis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...