Slower performance with ext4

Mark Kirkwood markir at paradise.net.nz
Mon Nov 2 06:28:26 UTC 2009


Christopher Chan wrote:
> Mark Kirkwood wrote:
>   
>> Christopher Chan wrote:
>>   
>>     
>>> Journaling only for metadata is not 'as much journaling as any other 
>>> canditates.' You cannot say metadata journaling only as equivalent to 
>>> the data and metadata journaling that is possible with ext3. XFS's 
>>> journaling only provides filesystem metadata consistency which is why 
>>> you get files full of NULLs after a crash/power out. MTAs rely on fsync 
>>> calls and how a filesystem behaves in regards to fsync requests is the 
>>> real determiner of whether there is a data guarantee or not. XFS does 
>>> not provide data guarantee. It, at best, provides a metadata guarantee. 
>>> XFS should not be used for mta queues unless it is in conjunction with 
>>> hardware raid that has a bbu cache. XFS is best suited for streaming 
>>> applications where the data loss is tolerated.
>>>
>>>   
>>>     
>>>       
>> Sorry, but that is completely incorrect. Applications that use fsync are 
>> safe with any filesystem - fsync forces the modified buffers to *disk*, 
>> so all discussions about os and filesystem caching are irrelivant[1].
>>   
>>     
>
> Yes...where *disk* = journal. Which for JFS, XFS and ext3 data=ordered 
> means metadata only. Only ext3 data=journal guarantees data and 
> metadata. Feel free to get (whoever filesystem developer) to confirm for 
> me because you won't get any other answer than what I have just posted.
>
>   
Not so - disk != journal. At fsync the buffers are written through the 
os buffer to the physical disk cache, and the cache is instructed to 
write 'em to the rotating media. This is for data, *not* always metadata 
(see man for fsync vs fdatasync). In fact it is the metadata that has 
historically caused the most problems - hence the need to journal this.

The vast majority of the world databases and mail servers depend on the 
fact that fsync forces modified *data* buffers to their respective file 
on disk.

The zero length files that people dislike so much on xfs are caused by 
applications that do *not* request an fsync - and also cheap sata disks 
that do not honor fsync's request to actually write the buffers... 
thankfully these are less common now (especially for serious sata drives 
like WD's Velociraptor).

regards

Mark




More information about the ubuntu-users mailing list