Re: Pipe buffers' limit of 16 * 4K

From: Fausto Richetti Blanco
Date: Thu May 29 2008 - 11:47:18 EST


On Thu, May 29, 2008 at 11:36 AM, Jan Engelhardt <jengelh@xxxxxxxxxx> wrote:
>
> On Thursday 2008-05-29 15:19, Miquel van Smoorenburg wrote:
>>On Thu, 2008-05-29 at 10:00 -0300, Fausto Richetti Blanco wrote:
>>
>>Why not use a socketpair() instead of a pipe(). You can adjust the size
>>with setsockopt SO_SNDBUF/SO_RCVBUF (see man socket(7))
>
> Nah, if there's lots of POST requests, and a large buffer for
> each of it, you may end up running into allocation failures.

Well, I think it's an alternative.. A good one, indeed :)

However, I implemented it and run into the limit of /proc/sys/net/core/wmem_max

Do you guys think it's a big impact to change this to a higher value ?
It's meant to only affect the MAX window size, right ? Does it have
any other way of changing this limit (by process or by user, for
exemple) ?

The strange thing here is that setsockopt doesn't fail if I change the
size of the buffer to anything higher than
/proc/sys/net/core/wmem_max. It doesn't work either :)

The implementation with socketpair, adjusting
/proc/sys/net/core/wmem_max, seems good to me. However, I still think
dynamic buffers for pipes a good idea.
--
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/