• block oriented storage

    From Johannes Koehler@21:1/5 to All on Thu Jan 6 15:54:10 2022
    Much valued linux hardware hackers!

    … its my first posting into your box. Because i am
    lazy, i will shift a bit till later giving you more about
    myself @your togetherness, in the beloved txt form.

    Short question...

    I try to get more skills to know about the following relation:

    (a) sectorsize@(hdd or ssd)
    (b) blocksize@filesystem
    (c) pagesize@(linux kernel or file)

    Maybe, someone can give me a hint to a good manpage or
    htmlpage.

    thx and sincerely
    - kefko

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Moock@21:1/5 to All on Thu Jan 6 19:57:37 2022
    Am Donnerstag, 06. Januar 2022, um 15:54:10 Uhr schrieb Johannes
    Koehler:

    (a) sectorsize@(hdd or ssd)
    Normally, one sector has 512 Bytes. There are now HDDs that have 4096
    Byte sector, these are often called Advanced Format (AF). https://en.wikipedia.org/wiki/Advanced_Format

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Henrik Carlqvist@21:1/5 to Johannes Koehler on Fri Jan 7 07:04:59 2022
    On Thu, 06 Jan 2022 15:54:10 +0000, Johannes Koehler wrote:
    I try to get more skills to know about the following relation:

    (b) blocksize@filesystem

    The block size depends on your filesystem. Example of a good man-page
    might be to study the -b flag at the man-page of mke2fs. To see the block
    size of an existing ext*fs you can try something like:

    dumpe2fs /dev/sda1

    As you probably understand, it is prefered to have a block size which is
    a multiple of 1 or bigger of the sector size.

    (c) pagesize@(linux kernel or file)

    The page size is usually 4 kB, you can check if that is really the case
    on your system by doing:

    cat /proc/1/smaps | grep PageSize

    Again, for swapping performance, it is prefered to have a page size which
    is a multiple of 1 or bigger of the sector size.

    One simple way to test you raw disk performance with different block
    sizes is to do:

    dd if=/dev/sda of=/dev/null bs=512

    dd if=/dev/sda of=/dev/null bs=1024

    dd if=/dev/sda of=/dev/null bs=2048

    dd if=/dev/sda of=/dev/null bs=4096

    dd if=/dev/sda of=/dev/null bs=8192

    ...

    For RAID systems you might want to compare the performance with different stripe sizes.

    regards Henrik

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)