Re: Pipes and fd question. Large amounts of data.

From: Miquel van Smoorenburg
Date: Sun Jan 30 2005 - 14:42:38 EST


In article <200501301115.59532.ods15@xxxxxxxxxxxxxxxx>,
Oded Shimon <ods15@xxxxxxxxxxxxxxxx> wrote:
>I have implemented this, but it has a major disadvantage - every 'write()'
>only write 4k at a time, never more, because of how non-blocking pipes are
>done. at 20,000 context switches a second, this method reaches barely 10mb a
>second, if not less.

If you're using pipe(), you might want to try socketpair()
instead. You can setsockopt() SO_RCVBUF and SO_SNDBUF to
large values if you want.

Mike.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/