Subject: Re: fsync performance hit on 1.6.1
To: Daniel Brewer <>
From: Greg A. Woods <>
List: tech-kern
Date: 07/07/2003 14:45:05
[ On Monday, July 7, 2003 at 09:45:23 (+0200), Daniel Brewer wrote: ]
> Subject: Re: fsync performance hit on 1.6.1
> For our application, we have 1 process capturing images from a frame-grabber
> and dumping them to a file in a memory file system. It sends a UDP message
> to another process that reads the images from this file and writes them to
> disk in a database. The first process has to guarantee that after it's done
> writing that image to the memory file system, that it is actually there for
> the second process to read. The problem is slightly more complicated, as we
> have systems out in the field running 1.5.1 which we still need to support.

First off I wouldn't think you'd have to worry about fsync() on a memory
filesystem.  :-)

In fact so long as you're not worried about system failures possibly
causing loss of data then I don't think you should ever need the fsync().

Is the data _always_ going to be read by the second process?  If so then
maybe now with bigger pipe buffers in 1.6.x you'd be better off just
using a pipe?  You should only need a runtime configuration flag to
select between use of a pipe and a temp MFS file to be able to also
support 1.5.x with the same compiled binary.

Also, why are you using UDP to communicate with another process on the
same system?  Why not an AF_LOCAL socket, pipe, or msgsnd()/msgrcv()?

								Greg A. Woods

+1 416 218-0098;            <>;           <>
Planix, Inc. <>; VE3TCP; Secrets of the Weird <>