Re: [omega-g1:11072] Re: [PATCH] net: configurable sysctl parameter "net.core.tcp_lowat" for sk_stream_min_wspa ce()

From: Hagen Paul Pfeifer
Date: Mon Aug 22 2011 - 10:22:05 EST



On Mon, 22 Aug 2011 09:33:52 +0900, "Jun.Kondo" wrote:
> By using this patch, we want to prevent "timeout occured over the
network
> that is low throughput but available".
>
> But in the current implementation, both blocking and non-blocking,
> user processes can't recognize the reason in detail
> when failed to write to socket buffer, we think.

For your application it should not matter WHY the data can be written to
the peer. It can be happened that the peer close the window, some
scheduling bottleneck or whatever else. A blocking socket means for you
that some data is in the pipe, waiting for transmit. This is the knowledge
that you require, and you should deal with it. A blocking socket does not
mean FAILED, a failure is returned via ECONNRESET or otherwise. So
everything is fine when your socket blocks. Probably you should adjust your
Apache timeouts or other parts of the program logic.

> As stated above, we think it is difficult for user processes to handle
> timeout of writing socket buffer,
> when wmem is configured large value.(to ensure high throughput over the
> high ralency network, like 3G).

No, you should adjust your code and account that the socket has data in
the pipe. That's all.

Changing tcp_lowat

--
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/