All of lore.kernel.org
 help / color / mirror / Atom feed
* sendfile or r+w for sending file to multiple machines
@ 2003-03-28 14:23 jlnance
  2003-03-28 15:02 ` Chris Friesen
  0 siblings, 1 reply; 2+ messages in thread
From: jlnance @ 2003-03-28 14:23 UTC (permalink / raw)
  To: linux-kernel

Hello All,
    I have an application that needs to be able to send large files to
multiple machines (less than 10).  The files get sent to the machines at
the same time so we are thinking about writing the code so that it does
1 read (or perhaps a mmap) on the file, and then does multiple writes,
onece to each machines socket.
    We are also considering using multicast but this seems unnecessarily
complex.  I dont want to reimplement TCP.
    We could also write this using sendfile, and I dont know if that
is a good idea or not (hence this post).  I think I would have to start
multiple threads to get sendfile to work.  This makes things more
complex which is a minus, but how about performance.  Do you think
this would work better than read+write?  The files are larger than
system memory so our goal is to avoid reading the multiple times.
With sendfile we can not really control how the files get read, but
it seems likely that the different threads would inherently synchronize
themselves.  Any thoughts?

Thanks,

Jim

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-28 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-28 14:23 sendfile or r+w for sending file to multiple machines jlnance
2003-03-28 15:02 ` Chris Friesen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.