Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimal block read size #7

Open
dd86k opened this issue Jun 4, 2022 · 1 comment
Open

Optimal block read size #7

dd86k opened this issue Jun 4, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@dd86k
Copy link
Owner

dd86k commented Jun 4, 2022

Under a few operating systems, there are various ways to obtain the optimal block size for file read and write operations.

For Posix systems using fstat, it is possible to obtain the optimal block size for file operations. The stat field in question is st_blksize.

For Windows, a StackOverflow answer suggests using GetDiskFreeSpace and multiplying the lpBytesPerSector and lpSectorsPerCluster from the resulting structure. This should be the filesystem's cluster size.

Typical block sizes should be around 64 KiB for Linux systems and 4 KiB for Windows.

Of course, benchmarks should be made available.

@dd86k dd86k added the enhancement New feature or request label Jun 4, 2022
@dd86k dd86k self-assigned this Jun 4, 2022
@dd86k
Copy link
Owner Author

dd86k commented Mar 30, 2024

While ddgst 3.0 sees its new default from 16 KiB to 1 MiB, this might be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: Todo
Development

No branches or pull requests

1 participant