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: Juhana Sadeharju (kouhia_AT_nic.funet.fi)
Date: Thu Apr 20 2000 - 19:14:41 EEST


>From: Benno Senoner <sbenno_AT_gardena.net>
>
>write() + fsync()/fdatasync() on linux doesn't work well too since the kernel
>isn't able to optimize disk writing by using the elevator algorithm.
>
>You can try this in by trying to fsync()/fdatasync() all output descriptors
>in the disk_thread routine.

Benno, I have not yet tested the following idea with my shmrec recorder, but
you could test it as well:

Instead of having one thread doing "write(); fsync();" loop, there could
be multiple threads each doing "write(); fsync();".

I have no idea why fsync() gets slower and slower while the filesize
increases. Does the above help at all if all writes happens to the same
file (as in my shmrec)? Does it help when it is done in multitrack
program for each file separately (while ending up to 30 disc threads)?

Of course, even in my stereo recorder, I could write to multiple files
and later combine the files.

Juhana


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

This archive was generated by hypermail 2b28 : Thu Apr 20 2000 - 19:48:48 EEST