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

[Filestore] Provide client with correct blocksize #1289

Closed
debnatkh opened this issue May 28, 2024 · 1 comment
Closed

[Filestore] Provide client with correct blocksize #1289

debnatkh opened this issue May 28, 2024 · 1 comment
Assignees
Labels
2024Q2 filestore Add this label to run only cloud/filestore build and tests on PR

Comments

@debnatkh
Copy link
Collaborator

Using stat, a client can get a blocksize, which, according to man(2), is defined as

The st_blksize field gives the "preferred" blocksize for efficient file system I/O. (Writing to a file in smaller chunks may cause an inefficient read-modify-rewrite.)

Right now this field is independent of the actual blocksize (in terms of filestore) and equals 4KiB.

For example, this results in cat breaking one 1MiB request into smaller requests of size max(128KiB, blocksize) = 128KiB. This would be more efficient if we provided a client with blocksize of bs*64 (256KiB in case of the default bs).

@debnatkh
Copy link
Collaborator Author

debnatkh commented Jul 1, 2024

Successfully deployed PreferredBlockSizeMultiplier: 64. It had no effect on ior performance when using it without O_DIRECT. However, it indeed decreased number of read(2) syscalls while using cat on large files, as expected.

Also it had some benefitial impact on the dd/cp performance:

PreferredBlockSizeMultiplier 1 64
dd if=/dev/urandom of=mnt/testfile bs=1G count=1 57s 38s
cp (1 GiB file) mnt/cp (1 GiB file) mnt/ 1m45.804s 0m44.533s

@debnatkh debnatkh closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2024Q2 filestore Add this label to run only cloud/filestore build and tests on PR
Projects
None yet
Development

No branches or pull requests

1 participant