really strange ext4 behavior

Ric Wheeler rwheeler at redhat.com
Sat Feb 12 22:52:42 UTC 2011


On 02/12/2011 05:31 PM, Michał Piotrowski wrote:
> Hi,
>
> W dniu 12 lutego 2011 23:19 użytkownik Ric Wheeler
> <rwheeler at redhat.com>  napisał:
>> On 02/12/2011 05:12 PM, Michał Piotrowski wrote:
>>> Hi,
>>>
>>> I added a disc to my box. I wanted to use ext4. I run fs_mark to test
>>> speed, to my surprise I heard a really strange noises.
>>>
>>> It's very strange because the drive is new
>>>    9 Power_On_Hours          0x0032   100   100   000    Old_age
>>> Always       -       12
>>>
>>>
>>> #  fs_mark  -d  test/
>>> [..]
>>> FSUse%        Count         Size    Files/sec     App Overhead
>>>       0         1000        51200         22.8            54347
>>>
>>> I decided to create an ext3 file system on this drive and everything works
>>> fine.
>>>
>>> #  fs_mark  -d  test/
>>> [..]
>>> FSUse%        Count         Size    Files/sec     App Overhead
>>>       0         1000        51200        103.7            57229
>>>
>>> When I mount this ext3 fs as ext4 and run fs_mark I hear strange sounds
>>> again.
>>>
>>> I use F14 and self compiled kernel from rawhide 2.6.37-1.fc14.x86_64 +
>>> e2fsprogs-1.41.14-2.fc14.x86_64.
>>>
>>> I mount ecryptfs on top of this file system.
>>>
>>> Does anyone know what might be causing this strange ext4 behavior?
>>>
>> Hi Michael,
>>
>> fs_mark run a fsync heavy test. What you might be hearing is the impact of
>> the fsync's. ext4 defaults to using "write barriers" enabled, ext3 does not.
>> Without write barriers, those fsync push data from the box to the write
>> cache on the drive only. With barriers, the disk will flush that cache to
>> the platter, so the platter moves and you probably hear the head, etc.
>>
>> You can test if this is the cause by mouting ext4 with "nobarrier" to see if
>> the noise goes away.
> I mounted fs with nobarrier and now it works just like ext3. Thanks! This solves
> the riddle :)
>

Good to hear that it worked!

Note that the barrier code makes your data safer, so you should run with it on 
by default (unless you really don't care about the file system).

You can run "fs_mark -S 0 ...." to have it not issue the fsync() calls as well,

Ric



>> Drives can be noisy, but occasionally, if they are over noisy (you hear
>> chattering when writing), it might just be a bad drive that has trouble
>> settling the heads after a seek.
>>
>> You might want to check with:
>>
>>   smartctl -a /dev/sda
>>
>> To look for errors that the drive reports.
> I regularly test all drives that I use, this one is irreproachable
>
>    1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail
> Always       -       0
>
> [..]
>
> Num  Test_Description    Status                  Remaining
> LifeTime(hours)  LBA_of_first_error
> # 1  Extended offline    Completed without error       00%        10         -
>
>
>> Good luck!
>>
>> Ric
>>
>>
> Thanks for your help!
>



More information about the devel mailing list