Reducing the battery impact of ND
Lorenzo Colitti <lorenzo@google.com> Sat, 11 January 2014 04:26 UTC
Return-Path: <lorenzo@google.com>
X-Original-To: ipv6@ietfa.amsl.com
Delivered-To: ipv6@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D4B441ADF86 for <ipv6@ietfa.amsl.com>; Fri, 10 Jan 2014 20:26:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.616
X-Spam-Level:
X-Spam-Status: No, score=-1.616 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RP_MATCHES_RCVD=-0.538, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xiuuchINmPMW for <ipv6@ietfa.amsl.com>; Fri, 10 Jan 2014 20:26:13 -0800 (PST)
Received: from mail-ie0-x22b.google.com (mail-ie0-x22b.google.com [IPv6:2607:f8b0:4001:c03::22b]) by ietfa.amsl.com (Postfix) with ESMTP id 526D01AD10A for <ipv6@ietf.org>; Fri, 10 Jan 2014 20:26:13 -0800 (PST)
Received: by mail-ie0-f171.google.com with SMTP id to1so1982802ieb.16 for <ipv6@ietf.org>; Fri, 10 Jan 2014 20:26:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=p+1lm02LYTsIOrB1ZnEYfaSLGg9nHh9tfc0rjbQjhoo=; b=pr9iwX/XSWIvOwtUQ8Kk2fPQCGGckfb4v5H5GA4jTv1Tuy7zPutkPaMTNrL++hCIMu KirIQ3Hd7N6tmZ9wYLRCmdKvrvdVV1666R6uceyLKW/RdChboP4l4piLMuw2EWIQ8A2m e7bA5KnG9+6HpmpGU7qnEEILyzDTHUJpHiRti+Kzhg7/nlMc8NILj7UKK7oiW4cSJGP2 At7xmOwLuPrhGxNfZUa4sYUoiepxKPbi/xfwk221TFH+xj9+UcDCrpkrUQtGY+3d8T1o TK+0j/QdASthw1O5bX2B7Z0N5IEtdVgr0QWjz5xS1mphE80yUzqspHXdpfMn7w2Sd56w xtqw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc :content-type; bh=p+1lm02LYTsIOrB1ZnEYfaSLGg9nHh9tfc0rjbQjhoo=; b=kIQSQFf777DwW4JRlqw2rgToX2xgEsdetj+JZ5QQdLZfPHYpF6/w861amSYHnSsgEN MF5BwI7nALgjO1mmsx6ffrZwfgpSU9bz0EhTITDGuQ3RCIYmH2qmkG2eFaQy27WKKDtK E+APgMAc/21vsWYJ8CGjxga5w8if6B7vvZUEPZG/eF6PY7RdLg6ZrOY08TYFX/8hBfyR D1PDNJ8IiB6xtFkIZUcKfhfIjScZDbbOMRq0zmWk4U8PmsrDXh14EolPArhZNtsRjz1y u5h9INJlZ7vSYSm+5/2f0ENC9XFfw3qp1hLmsjD8x3IG9B79F++IFo57lqiVl5TfSJtf Bwdw==
X-Gm-Message-State: ALoCoQmuB9RC/H0RSlU3Hjc/TnK6ECs580y6nXE1aukxPAj/HozEtELOcXIFATvwUdtytt0374uxPOijADZBd74/vgWvbd0Wmj6/BPjMOps8UgN3pJyZ3rVV+B6/CtWaF5woFkfk34Yd7ZhpPVC5pqhM6HeagqLDXXUMWxM05RrSECj3GMrfufo3eNhnKrANbawYHZ2g0614
X-Received: by 10.43.150.18 with SMTP id km18mr11459886icc.43.1389414362982; Fri, 10 Jan 2014 20:26:02 -0800 (PST)
MIME-Version: 1.0
Received: by 10.64.7.36 with HTTP; Fri, 10 Jan 2014 20:25:42 -0800 (PST)
From: Lorenzo Colitti <lorenzo@google.com>
Date: Sat, 11 Jan 2014 13:25:42 +0900
Message-ID: <CAKD1Yr29S=O5L4DfhNoiVieWPkgBJ2veuOu6ig5rwgK4ELz7Xw@mail.gmail.com>
Subject: Reducing the battery impact of ND
To: Andrew 👽 Yourtchenko <ayourtch@gmail.com>
Content-Type: multipart/alternative; boundary="001a11c3000c8d525b04efaa3d93"
Cc: 6man Chairs <6man-chairs@tools.ietf.org>, 6man WG <ipv6@ietf.org>
X-BeenThere: ipv6@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "IPv6 Maintenance Working Group \(6man\)" <ipv6.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipv6>, <mailto:ipv6-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ipv6/>
List-Post: <mailto:ipv6@ietf.org>
List-Help: <mailto:ipv6-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipv6>, <mailto:ipv6-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 11 Jan 2014 04:26:16 -0000
Andrew, thank you for bringing solid data and analysis to the equation. That is always appreciated. On Sat, Jan 11, 2014 at 8:57 AM, Andrew 👽 Yourtchenko <ayourtch@gmail.com>wrote: > 2) The bigger problem - the battery life: > This can be a real problem, yes. But as you say, I think we can mitigate it well without changing ND at all. > WiFi is a pretty expensive thing to do, power-wise. To help extend the > battery, the mobile devices try very hard to shut off the radio > whenever they can. The wireless station would go to sleep, and inform > the AP about this fact - so the AP can buffer the frames for it [1]. > Further optimizations in this area were introduced by 802.11e (WMM-PS) > [2], where the frames destined to workstation could be transmitted > more efficiently and radio duty cycle is reduced. > > Spontaneous all-hosts multicasts interfere with these mechanisms, thus > the battery drain on the devices is much higher One thing that I think we haven't discussed here is that in principle, there are *very few* all-hosts multicasts - basically, only RA. Even RS is all-routers multicast, not all hosts. So really the only thing we're talking about is solicited-node multicasts for NS (and occasional unsolicited NAs, which should only really happen when nodes change their MAC addresses. Note that I'm not talking about malicious nodes here because any malicious node can decide to spam the link with multicast messages regardless of what the ND protocol looks like. I think that using multicast instead of broadcast and defining solicited-node multicast addresses based on the IID, were very wise choices. This is because there are so many different groups (2^24), that even in very large networks, each solicited-node multicast group will likely only have one member. So - at least in principle - there are two layers at which the battery impact of NS packets can be reduced to zero or close to zero: 1. If the AP keeps state of what MAC addresses have joined which multicast groups, it can selectively turn multicast NS into a set of unicast NS (L2 unicast; not L3 unicast). This will be a pretty significant bandwidth optimization both because a) as you say, unicast is faster than multicast, and b) because one multicast NS will almost certainly turn into only one unicast NS. Win/win. 2. Even if the AP does not do #1, if the wifi chipset in the device keeps state of what multicast groups the device has joined, then the wifi chipset can simply drop packets that aren't interesting to the device's main CPU. From experience we know that this can also lead to massive battery savings - the wifi chipset is basically on a lot of the time anyway, because it has to listen for beacons and incoming packets, and this sort of filtering can be pretty efficient. That leaves RAs. Multicast RAs are a bane for battery life, because every time a device joins the network, it sends an RS. If the router responds with a multicast RA, then all devices on the link get a packet which they didn't need. On large wifi networks, I've seen this cause RAs once every 3-4 seconds, which is really painful in terms of battery life. Fortunately, there's an easy solution here: respond to router solicitations with unicast RAs sent to the sender. This is pretty trivial, and it doesn't require any state anywhere. There is a corner case where, if 10000 devices come online at the same time because the AP just booted up, you can get a thundering herd problem and have to send 10000 unicast packets, but this is can be optimized too: if the router sees that it's sending more than 100 solicited unicast RAs per second, it can simply send a multicast RA instead. > - especially in a typical network where the mobile devices move, and might > trigger an RS/RA on each L2 roam between BSSIDs. > The client devices I'm familiar with don't send RSes when L2 roaming between BSSIDs on the same SSID. Is this a bug? Should they? I hear someone saying: "Yes, but this is all about wireless, DC is all > different story - it's all switches, they don't hold the state!" - yes > and no. I'd argue that it's not "yes and no", it's just "no". The state required by the approaches I suggest above is the same amount of state as multicast snooping, and it's pretty much the same amount of state required by the efficient ND approach - but it doesn't require complicating the ND protocol > Maybe worth to split the problem area into smaller subsets and see > whether a "cheaper" solutions are possible. Let's first take the > "multicast RAs" problem, and assume we do the below steps: > > a) Allow the environments that wish to do so, to send solicited RAs > unicast. (standard already permits to do so). > Yes please! > b) Have the hosts restart the Resilient RS [5] process at 1/2 or so > of router lifetime expiry: the router now can have the heuristic to > know which hosts are supporting the "unicast RA update" mechanism > *and* did not receive the periodic RA which would have been sent > usually at 1/3 the lifetime expiry (three RAs per lifetime rule of > thumb). > Yes please! > c) bump up the allowable MaxRtrAdvInterval and AdvDefaultLifetime to > their maximum theoretically possible values (spec says the hosts > should already be able to handle those, I did not test though) - this > would allow to further reduce the periodic RA frequency, from 2.5 > hours today to ~18.2 hours, or, if we feel adventurous, put all-ones > to be a "solicited-only RAs by default" - thus, unless another router > sends an RA with different lifetime, refreshing the router info > becomes host-driven, with an option for a router to override at any > time. > This sort of depends what device you have. For example - on a mobile phone, receiving one packet every 2.5 hours is *so far down* in the noise that it just doesn't matter. Your phone is doing a massive amount of stuff already - it's syncing your email, receiving wifi beacons, checking calendar alarms, etc. etc. All of that uses way more CPU than receiving one multicast RA. There may be other devices that have lower power requirements, though I'm not sure - perhaps these devices simply can't use 802.11-style wifi because it's too expensive, and so already have to use something like 6LowPAN. I don't know if there's a use case here. > These steps take care of the "multicast RA" problem. But again, also, > each of them by itself brings incremental usefulness, and is doable on > a single device => no "chicken and egg", they gradually shrink the > issue - and are compatible with the existing tweaks that solve the > same problem (in a more layer-violating way). > Care to work together on a document that provides operational guidance to optimize battery impact of ND on wifi networks? Since they involve zero protocol changes, v6ops would be a good candidate group for it. And it might help persuade vendors that are not your employer to implement stuff like this :-) > Now let's think of updating the various caches while roaming: > How much more do you think this sort of thing will help, assuming we do the "100% feasible using the existing protocol" stuff above? NB: the above does not take care of the "defending the host's address > on behalf of the sleeping node" problem. > An NS is 72 bytes, and if we do multicast snooping, then a sleeping node is only ever going to be woken up if a node with the same last 3 address bytes shows up. That should be extremely rare. Cheers, Lorenzo
- Re: Reducing the battery impact of ND Erik Nordmark
- Re: Reducing the battery impact of ND Andrew 👽 Yourtchenko
- Re: Reducing the battery impact of ND Andrew 👽 Yourtchenko
- Reducing the battery impact of ND Lorenzo Colitti
- Re: Reducing the battery impact of ND Tim Chown
- Re: Reducing the battery impact of ND Don Sturek
- Re: Reducing the battery impact of ND cb.list6
- Re: Reducing the battery impact of ND Rajiv Asati (rajiva)
- Re: Reducing the battery impact of ND Andrew 👽 Yourtchenko
- Re: Reducing the battery impact of ND Erik Nordmark
- Re: Reducing the battery impact of ND Lorenzo Colitti
- Re: Reducing the battery impact of ND Erik Nordmark
- Re: Reducing the battery impact of ND Lorenzo Colitti
- Re: Reducing the battery impact of ND Ole Troan
- Re: Reducing the battery impact of ND Erik Nordmark
- Re: Reducing the battery impact of ND Ole Troan
- Re: Reducing the battery impact of ND Ole Troan
- Fwd: Re: Reducing the battery impact of ND Erik Nordmark
- Re: Reducing the battery impact of ND Erik Nordmark
- Re: Reducing the battery impact of ND Erik Nordmark
- Re: Reducing the battery impact of ND Lorenzo Colitti
- Re: Reducing the battery impact of ND Ole Troan
- Re: Reducing the battery impact of ND Erik Nordmark
- Re: Reducing the battery impact of ND Ole Troan
- Re: Reducing the battery impact of ND Warren Kumari
- Re: Reducing the battery impact of ND Erik Nordmark
- Re: Reducing the battery impact of ND Lorenzo Colitti
- Re: Reducing the battery impact of ND Lorenzo Colitti
- Re: Reducing the battery impact of ND Lorenzo Colitti
- Re: Reducing the battery impact of ND Erik Nordmark
- Re: Reducing the battery impact of ND Carsten Bormann
- Re: Reducing the battery impact of ND Pascal Thubert (pthubert)
- RE: Reducing the battery impact of ND Hemant Singh (shemant)
- Re: Reducing the battery impact of ND Erik Nordmark
- Re: Reducing the battery impact of ND Doug Barton
- RE: Reducing the battery impact of ND ek
- RE: Reducing the battery impact of ND Hemant Singh (shemant)
- Re: Reducing the battery impact of ND joel jaeggli
- Re: Reducing the battery impact of ND Warren Kumari
- RE: Reducing the battery impact of ND Hemant Singh (shemant)
- Re: Reducing the battery impact of ND Fernando Gont