Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/20613 )

Change subject: Fix a unit test in aarch64 system
......................................................................


Patch Set 11:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/20613/11//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/20613/11//COMMIT_MSG@9
PS11, Line 9: The block size is not fixed in different architecture systems.
            : For example, usually on x86 architecture it is 4k but on aarch64 
some
            : linux distribution (eg. 4.19.90-23.30.v2101.ky10.aarch6) can use 
a 64k
            : block size kernel. Test 
EncryptionEnabled/LogBlockManagerTest.MetricsTest/1
            : run fails in some aarch64 systems currently because of ignoring 
the
            : block size of the architecture
All right, let's hope this description isn't going to confuse the readers 
w.r.t. whether this is about FS block size or recommended IO block size.


http://gerrit.cloudera.org:8080/#/c/20613/10/src/kudu/fs/log_block_manager-test.cc
File src/kudu/fs/log_block_manager-test.cc:

http://gerrit.cloudera.org:8080/#/c/20613/10/src/kudu/fs/log_block_manager-test.cc@370
PS10, Line 370:   // the encryption is disabled.
              :   FLAGS_log_container_max_size = GetParam() ? 2 * fs_block_size 
: fs_block_size;
              :   // One block --> one
> Yes, you are right. Function GetBlockSize() is decided by 'st_blksize'. And
Thank you for updating the comment.

IIRC, there are different block sizes that 'stat' reports if you run it on the 
file and on the filesystem level:
  * filesystem block size
  * preferred I/O block size

The former is a size of a block in the filesystem.  That can be configured when 
creating a file system.  For example for ext4fs that's controlled by the '-b' 
option when running the 'mkfs.ext4' command.

The latter is the "preferred" block size for efficient filesystem I/O.  Writing 
to a file in smaller chunks may cause an inefficient read-modify-rewrite 
effects.

You can ask 'stat' to output information on a particular block size by using 
the "--format" option with particular format specifiers (those are different 
depending whether you run it on the file level vs the filesystem level).  More 
information could be found at 
https://www.man7.org/linux/man-pages/man1/stat.1.html

One article that sheds some light on the stat's output is (alternatively, you 
can take a look at the code yourself):
  
https://askubuntu.com/questions/946521/what-is-the-meaning-of-io-block-and-how-is-it-calculated

You could find more information on those in various docs and forums on the 
Internet, via searching it on google.com and similar engines.


http://gerrit.cloudera.org:8080/#/c/20613/10/src/kudu/fs/log_block_manager-test.cc@376
PS10, Line 376:
> Set FLAGS_log_container_max_size fs_block_size or 1024 is both OK when encr
Great, thank you for the clarification!



--
To view, visit http://gerrit.cloudera.org:8080/20613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ide52a251b15b1af437d570c146beb0c30fed161b
Gerrit-Change-Number: 20613
Gerrit-PatchSet: 11
Gerrit-Owner: Wang Xixu <1450306...@qq.com>
Gerrit-Reviewer: Abhishek Chennaka <achenn...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <ale...@apache.org>
Gerrit-Reviewer: Attila Bukor <abu...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Wang Xixu <1450306...@qq.com>
Gerrit-Reviewer: Yifan Zhang <chinazhangyi...@163.com>
Gerrit-Reviewer: Yingchun Lai <laiyingc...@apache.org>
Gerrit-Reviewer: Zoltan Martonka <zmarto...@cloudera.com>
Gerrit-Comment-Date: Tue, 07 Nov 2023 20:56:50 +0000
Gerrit-HasComments: Yes

Reply via email to