[CentOS] Disk usage for small files in ext3 in CentOS 5
Nicolas.Thierry-Mieg at imag.fr
Thu Mar 12 08:56:32 UTC 2009
Robert Nichols wrote:
> Filipe Brandenburger wrote:
>> Found it! It's not related to CentOS 4 or 5 (I found a C4 machine in
>> which small files took 8kb of diskspace and a C5 machine in which
>> small files took 4kb). It's related to SELinux being enabled or not.
>> Casually most of my C4 machines had SELinux disabled and most of my C5
>> have it enabled. Now I dug out some machines with the opposite config
>> and I checked it out.
>> I believe if SELinux is enabled, it will use extended attributes to
>> store the file's SELinux context (you can see it with "ls -Z", for
>> some reason you cannot see it with "getfattr -d", I was expecting that
>> to be possible). I guess when the file has extended attributes it will
>> use an additional block to store them. That basically doubles the
>> storage requirements if you have millions of tiny files...
> It shouldn't be doing that.
In any case, I can confirm that selinux is disabled on the x86_64 C5 box
where I tested yesterday and reported 4kb usage. And I see the same on
another similar box (4kb file, selinux disabled on x86_64 C5).
More information about the CentOS