Ricardo Galli
2004-Aug-06 14:57 UTC
[icecast-dev] PATCH: increase network congestion resilience
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, find a patch which is an update to a patch sent months ago. Before it was in net/sock.c, now I moved it to format.c, so net CVS module is not affected. It polls the socket before trying to send() any byte to check if the TCP buffers are full due to network congestion. See below the warning messages of "normal" (at least in Spain :-) temporary congestions in the network. The server could keep the connection without any problem. You can try it also by unplugging the ethernet for a couple of seconds. ... [2003-01-17 12:53:18] DBUG format/format_generic_write_buf_to_client Lack of bandwidth, delaying packet 0 [2003-01-17 12:53:19] DBUG format/format_generic_write_buf_to_client Lack of bandwidth, delaying packet 0 [2003-01-17 12:53:20] DBUG format/format_generic_write_buf_to_client Lack of bandwidth, delaying packet 0 [2003-01-17 12:53:21] DBUG format/format_generic_write_buf_to_client Lack of bandwidth, delaying packet 0 [2003-01-17 12:53:22] DBUG format/format_generic_write_buf_to_client Lack of bandwidth, delaying packet 0 [2003-01-17 12:53:24] DBUG format/format_generic_write_buf_to_client Lack of bandwidth, delaying packet 0 [2003-01-17 12:53:25] DBUG format/format_generic_write_buf_to_client Lack of bandwidth, delaying packet 0 ... Hope you like it. Regards, - -- ricardo galli GPG id C8114D34 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+J/c7XZ2eFsgRTTQRAtCoAKDKbZYMyiQ7gkbKwhR/3O2VGL5IWQCgy0MA Rx80rWn1gBZw7MaHMPOcpuU=z/q1 -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: update1.diff Type: text/x-diff Size: 1153 bytes Desc: update1.diff Url : http://lists.xiph.org/pipermail/icecast-dev/attachments/20030117/45a7b531/update1.bin
Michael Smith
2004-Aug-06 14:57 UTC
[icecast-dev] PATCH: increase network congestion resilience
On Friday 17 January 2003 23:29, Ricardo Galli wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > find a patch which is an update to a patch sent months ago. Before it was > in net/sock.c, now I moved it to format.c, so net CVS module is not > affected. It polls the socket before trying to send() any byte to check > if the TCP buffers are full due to network congestion.Why? This should be no different from doing the send() (and handling it failing correctly, which I think we do), except you're throwing in lots more syscalls, thus lowering efficiency. Calling send will not, in itself, cause client disconnections just because it couldn't send anything. Mike --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Ricardo Galli
2004-Aug-06 14:57 UTC
[icecast-dev] PATCH: increase network congestion resilience (SOLVED!)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 18 January 2003 03:38, Michael Smith shaped the electrons to shout:> > Hi, > > find a patch which is an update to a patch sent months ago. Before > > it was in net/sock.c, now I moved it to format.c, so net CVS module > > is not affected. It polls the socket before trying to send() any byte > > to check if the TCP buffers are full due to network congestion. > > Why? This should be no different from doing the send() (and handling itGoddam!!!! There were bugs in icecast2 while checking for recoverable error (in several places indeed). The program was checking for sock_recoverable() with the return value of send(), which is a mistake and confused me because I assumed it was right. It _must_ be done against with sock_error() instead. Find the patch that solves the bugs. - -- ricardo galli GPG id C8114D34 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+KUM0XZ2eFsgRTTQRAqcAAJ40f+bBRwYqjIgh+aW88Zf0zpujGACgpSj7 6Kmh/Rruuc2vyk4cJj/Nklo=3dxn -----END PGP SIGNATURE----- --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Ricardo Galli
2004-Aug-06 14:57 UTC
[icecast-dev] PATCH: increase network congestion resilience (SOLVED!)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sorry. The patch is hopely here. On Saturday 18 January 2003 03:38, Michael Smith shaped the electrons to shout:> > Hi, > > find a patch which is an update to a patch sent months ago. Before > > it was in net/sock.c, now I moved it to format.c, so net CVS module > > is not affected. It polls the socket before trying to send() any byte > > to check if the TCP buffers are full due to network congestion. > > Why? This should be no different from doing the send() (and handling itGoddam!!!! There were bugs in icecast2 while checking for recoverable error (in several places indeed). The program was checking for sock_recoverable() with the return value of send(), which is a mistake and confused me because I assumed it was right. It _must_ be done against with sock_error() instead. Find the patch that solves the bugs. - -- ricardo galli GPG id C8114D34 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+KUOLXZ2eFsgRTTQRAvtQAKDWnOoK5hNv1ilzuxVJJStE5KJgsQCfRFHC cRtvQvDZElEoGSXzdp2J/d8=bQZY -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: update1.diff Type: text/x-diff Size: 2861 bytes Desc: update1.diff Url : http://lists.xiph.org/pipermail/icecast-dev/attachments/20030118/83c6108a/update1.bin