Updates using idle bandwidth
Tomasz Torcz
tomek at crocom.com.pl
Tue Mar 25 13:49:38 UTC 2008
Dnia 11-03-2008, wto o godzinie 20:48 -0400, Sunil Ghai pisze:
> Hi,
>
> Rather than implementing dynamic bandwidth throttling feature in
> updates only, how about having a framework possibly in form of headers
> and libraries which would implement dynamic throttling and other
> applications like Package manager or Firefox would be able to use it.
> For example, we can add one option in wget to get files using idle
> bandwidth only. This will solve purpose for other applications also.
I write second time about TCP Low Priority. It's a congestion control
algorithm included in Linux kernel. Connections using this algorithm
*should* use only idle bandwidth. In other words, such framework already
exist in form of self-tuning TCP stack.
Last time I wrote you asked for example code how to use it. Here you
are, in python:
#v+
#!/usr/bin/python
import socket
socket.TCP_CONGESTION = 13
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_CONGESTION, "lp")
#v-
Module tcp_lp.ko will be autoloaded by kernel. So this setsockopt() call
is ready to be put into yum-updatesd, just after socket creation.
--
Tomasz Torcz
More information about the fedora-devel-list
mailing list