From owner-freebsd-current Sun Jan 23 17:56:16 2000 Delivered-To: freebsd-current@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 1AFD914BEC for ; Sun, 23 Jan 2000 17:56:11 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id SAA97878; Sun, 23 Jan 2000 18:56:07 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id SAA47712; Sun, 23 Jan 2000 18:56:39 -0700 (MST) Message-Id: <200001240156.SAA47712@harmony.village.org> To: Brian Somers Subject: Re: Please help spread the CVSup mirror load more evenly Cc: current@FreeBSD.ORG In-reply-to: Your message of "Sun, 23 Jan 2000 13:03:19 GMT." <200001231303.NAA01359@hak.lan.Awfulhak.org> References: <200001231303.NAA01359@hak.lan.Awfulhak.org> Date: Sun, 23 Jan 2000 18:56:39 -0700 From: Warner Losh Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200001231303.NAA01359@hak.lan.Awfulhak.org> Brian Somers writes: : I like this idea, except that some sort of consistency is required - : ie, once I've started using cvsupX, I'd like to use it in preference : to slightly better machines unless it stays bad for some configurable : number of connections.... I'm hatching in my head a scheme as follows: Each host gets a value of 1 (unless you go in and tweak it). Hosts are tried in order of their values and in some unspecified order in the case of ties. Host with a value < = 0 are never tried. Floating point math is done with the results rounded up to the nearest integer. This keeps people from falling below 1. Users can disable a host by tweaking its value in the config file to be 0. Each time you successfully connect, you get a bonus of B. Each failure reduces the nubmer by x%. I'm thinking that B should be on the order of 10-20 and x should be on the order of 10-20. Try at most twice per host. If all the hosts fail, try the best host in forever mode. No updates should happen here to weightings. Not sure about this method in, say, a cron job... That way, as a host succeeds, it will be tried more often first. As a host fails, it will be tried less often. Over time if host N goes down, its weighting will decay relatively quickly and the next best one will take up the slack.... I purposely chose a linear scale up, and a non-linear scale down. Of course I don't have time to actually code this up. And it also strikes me as overkill. I'm happy with the fixed order list that I tweak as I notice things going bad... Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message