Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

block oriented storage

4 views
Skip to first unread message

Johannes Koehler

unread,
Jan 6, 2022, 10:54:12 AM1/6/22
to

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

Marco Moock

unread,
Jan 6, 2022, 1:57:39 PM1/6/22
to
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

Henrik Carlqvist

unread,
Jan 7, 2022, 2:05:01 AM1/7/22
to
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
0 new messages