Re: Block size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick Dupre wrote:
> On Sat, 23 Oct 2010, JD wrote:
>
>> On 10/23/2010 02:49 PM, Patrick Dupre wrote:
>>> On Sat, 23 Oct 2010, Patrick Dupre wrote:
>>>
>>>> Hello,
>>>>
>>>> On a logical partition I am unable to set the block size to 1024 !
>>>> I formatted the partition mke2fs /dev/VG1/part1 -b 1024 -t ext4
>>>> and when I do a
>>>> blockbsz --getbsz or mke2fs -n
>>>> I get 4096 !
>>>> I also tried 2048 with the same result.
>>> But dumpe2fs gives the right answer !
>>>
>>>>
>>>> Is it related to the logical partition ?
>>>>
>>>> Thank.
>>>>
>>>>
>>>
>> You have to be aware that selecting such a small
>> block size means that the FS will be allocating
>> at least 256 bytes of inode space per 1K data block.
>> So, the amount of space for on-disk metadata is about
>> 25% of the space for data blocks. This is OK if you have
>> a lot of small files about 1 to 4k in size. Buf it most of
>> your files are much larger than 1kb, then you have
>> wasted a lot of disk space for inodes that may never
>> be used.
> Is there a tool to optimize the block size ?
> Determination of the average file size ?
>
The answers are NO and YES (but it may not be useful). You can use df to get the 
total blocks in use, and then df with the -i option to see how many inodes are 
being used. But what you really want may not be the simple division, as JD 
noted, you need another value (don't think it's the mean, either).

Using a too-small block size may require using multi-level inodes and slow 
access to large files. I am not going to give you guidance, because the answer 
is "it depends." Small blocks waste space in inodes, and may have a performance 
impact. Large block may waste disk space. And the effect may be filesystem type 
related in several ways.

-- 
Bill Davidsen <davidsen@xxxxxxx>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux