Updates using idle bandwidth
James Antill
james at fedoraproject.com
Tue Mar 25 14:16:46 UTC 2008
On Tue, 2008-03-25 at 14:49 +0100, Tomasz Torcz wrote:
> 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")
Ok, that's not a terrible idea _but_:
1. yum-updatesd doesn't have a socket, it calls yum which calls
urlgrabber.
2. yum-updatesd currently holds the yum lock while it downloads.
...so it's far more work than just adding the above two lines to
yum-updatesd.
--
James Antill <james at fedoraproject.com>
Fedora
More information about the devel
mailing list