From: Stan Hoeppner <stan@hardwarefreak.com>
To: xfs@oss.sgi.com
Subject: Re: Alignment size?
Date: Fri, 13 Aug 2010 05:27:55 -0500 [thread overview]
Message-ID: <4C651E2B.9010100@hardwarefreak.com> (raw)
In-Reply-To: <4C64E52E.2060806@msgid.tls.msk.ru>
Michael Tokarev put forth on 8/13/2010 1:24 AM:
> So the question that remains is: why?
4096 is the default block size and has been since at least 2.6.26 when I
started using XFS. From "man mkfs.xfs":
OPTIONS
-b block_size_options
This option specifies the fundamental block size of the filesystem. The
valid block_size_options are: log=value or size=value and only one can be
supplied. The block size is specified either as a base two logarithm value
with log=, or in bytes with size=. The default value is 4096 bytes (4 KiB),
the minimum is 512, and the maximum is 65536 (64 KiB). XFS on Linux currently
only supports pagesize or smaller blocks.
> So why xfs decided the block size is 4K??
See above. It's the default. Dave, Eric, Alex and others may be able to
explain why 4096 was chosen as the default. I'm guessing it has to do with
the best all around performance across a wide variety of storage systems.
> And a related question, -- is there a way to create
> xfs fs with the right sector size?
Yes.
-s sector_size
This option specifies the fundamental sector size of the filesystem. The
sector_size is specified either as a value in bytes with size=value or as a
base two logarithm value with log=value. The default sector_size is 512
bytes. The minimum value for sector size is 512; the maximum is 32768 (32
KiB). The sector_size must be a power of 2 size and cannot be made larger than
the filesystem block size.
Note that the default is 512. This would lead me to believe that whoever
created this 600GB XFS filesystem manually specified "-s 4096" on the command
line when creating it.
> The filesystem
> were ok in years, not only on this machine, and I'm
> quite afraid to replace it with something else (e.g.
> ext4) in a hurry without good prior testing.
>
> By the way, how one can check the "sector size" of a
> block device nowadays?
cat /sys/block/[device]/queue/hw_sector_size
That will give you the hardware sector size. As mentioned above, the XFS
sector size can be manually specified during FS creation. Thus they may not
match, which is likely the case with the 600GB FS you're having the problems with.
--
Stan
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-08-13 10:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 22:10 Alignment size? Michael Tokarev
2010-08-12 23:49 ` Dave Chinner
2010-08-13 6:24 ` Michael Tokarev
2010-08-13 10:27 ` Stan Hoeppner [this message]
2010-08-13 11:00 ` Michael Tokarev
2010-08-13 11:36 ` Roger Willcocks
2010-08-13 11:39 ` Dave Chinner
2010-08-13 15:15 ` Christoph Hellwig
2010-08-17 0:18 ` Michael Tokarev
2010-08-17 0:30 ` Michael Tokarev
2010-08-17 0:31 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C651E2B.9010100@hardwarefreak.com \
--to=stan@hardwarefreak.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox