Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5946099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:46:29+00:00 2026-05-22T16:46:29+00:00

How do you calculate the optimal blocksize when running a dd ? I’ve researched

  • 0

How do you calculate the optimal blocksize when running a dd? I’ve researched it a bit and I’ve not found anything suggesting how this would be accomplished.

I am under the impression that a larger blocksize would result in a quicker dd… is this true?

I’m about to dd two identical 500gb Hitachi HDDs that run at 7200rpm on a box running an Intel Core i3 with 4GB DDR3 1333mhz RAM, so I’m trying to figure out what blocksize to use. (I’m going to be booting Ubuntu 10.10 x86 from a flash drive, and running it from that.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:46:30+00:00Added an answer on May 22, 2026 at 4:46 pm

    The optimal block size depends on various factors, including the operating system (and its version), and the various hardware buses and disks involved. Several Unix-like systems (including Linux and at least some flavors of BSD) define the st_blksize member in the struct stat that gives what the kernel thinks is the optimal block size:

    #include <sys/stat.h>
    #include <stdio.h>
    
    int main(void)
    {
        struct stat stats;
    
        if (!stat("/", &stats))
        {
            printf("%u\n", stats.st_blksize);
        }
    }
    

    The best way may be to experiment: copy a gigabyte with various block sizes and time that. (Remember to clear kernel buffer caches before each run: echo 3 > /proc/sys/vm/drop_caches).

    However, as a rule of thumb, I’ve found that a large enough block size lets dd do a good job, and the differences between, say, 64 KiB and 1 MiB are minor, compared to 4 KiB versus 64 KiB. (Though, admittedly, it’s been a while since I did that. I use a mebibyte by default now, or just let dd pick the size.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What would be the most optimal algorithm (performance-wise) to calculate the number of divisors
I have a task, where I have to calculate optimal policy (Reinforcement Learning -
We are working an algorithm that calculate the optimal way to move resources from
I need to calculate the Italian fiscal code (tax code) in C#. I've found
I would prefer to get this done in MySQL. Table: tracker | user_id |
I was trying to solve random coding kata's and found this one, my question
I want to calculate a boolean expression like this ((('a' or 'b') AND ('c'
To calculate a top position for an element of variable height, I was thinking
How can I calculate the value of PI using C#? I was thinking it
How do I calculate the distance between two points specified by latitude and longitude?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.