Re: [linux-audio-dev] Re: File writes with O_SYNC slow

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Re: File writes with O_SYNC slow
From: Benno Senoner (sbenno_AT_gardena.net)
Date: Fri Apr 21 2000 - 04:10:34 EEST


On Thu, 20 Apr 2000, Steve Lord wrote:

> I should comment on this one since it would be on XFS....
>
> The difference between O_SYNC and O_DSYNC on XFS is only there if the
> file size does not change during the write. O_DSYNC which extends the file
> still does a synchronous transaction (a bad thing) if it extents the file.
> XFS tries hard to do the right things in these cases, we also have customers
> who use XFS inside of things like MRI scanners, they insist that if they
> write data to the disk, it better stay there, even if the power goes
> out.
>
> I realize with audio recording it is difficult to know the size of the
> file in advance. But you would get better results if you bumped up
> the filesize periodically rather than on every write. Preallocation
> would also help.
>
> Steve

My preliminary testing shows that preallocation under Linux with ext2 (writing
to an existing file without using O_TRUNC), slows down operations a bit in
the async case, and causes a considerable speed increase when using O_SYNC.
(but the O_SYNC speed + preallocation is still slowed than plain writes).

Anyway you are talking about bumping up filesizes periodically.
What do you mean exactly ?
using ftruncate() (can it be used to increase filesize?) or
lseek() + writing a small amount of data periodically (every few secs?) in
order increase filesizes ?
But wouldn't that require touching all inodes within the new data section,
thus ending up in the equivalent case as writing (new) large blocks (256kb in
my case)), to the file ?

Benno.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Apr 21 2000 - 03:39:09 EEST