Re: Misc points about network manager



On Tue, 2009-05-05 at 06:38 +0000, Robert Rehammar wrote:
> Hi all,
> 
> Just joined the list to discuss a few things about Network Managers
> performance.
> 
> First, I have been working some with MacOS X, and the network detection
> in MacOS X is some 10-100 times faster than what Network Manager
> performs. I believe it should be possible also for a GNU/Linux system to
> detect and sign in to a network with that speed. Is this something that
> has been discussed previously?

When you say "network detection", you mean...?  Part of the reason its
so good is that Apple has only a few different types of hardware to
support, and thus they can direct all their effort into making the
driver work well.  We don't have that luxury here, so fixing up the
drivers is a more gradual process.

Scanning is sometimes slow for a few reasons.  First, some drivers
simply don't give you feedback when a scan fails.  Second, NM only does
one scan on startup, so if the scan failed (and of course the driver may
not tell you that) then we don't have any indication to do a second one.
NM should simply perform a second scan on startup anyway.

For actual *connection* to the network (ie, association) its quite a lot
more complicated, and that's partially due to kernel/driver problems
(the Linux kernel API called WEXT sucks for association operations but
that's getting fixed), and secondly due to latency between NM and the
wifi control process (wpa_supplicant).  In the supplicant's case, NM
knows exactly what network to connect to, and tells the supplicant that,
but the supplicant searches again for the specific network to connect to
before actually starting the connection.  So often there's double the
work going on, and that adds latency.  There are a few reasons why this
is the case; we could make things faster by using ap_scan=2, but that's
evil for quite a few other reasons, and disables roaming completely.

> Next, I run Ubuntu (now 9.04, used to be 8.10 and back) with NM
> 0.7.1~rc4.1.cf199a964-0ubuntu2 (from apt). At leas in this (and previous
> Ubuntu versions) the manager looses memory of what connection to select.
> That is, when I move my laptop from work to home often NM does not
> understand that it should connect to my home wireless instead of my
> office Ethernet. Also the opposite is true. Also for wireless networks
> that I use seldom (e.g. at my brothers place) the WEP key is lost
> between sessions, so I have to re-enter it.

I'm pretty sure these are bugs as these aren't issues I've experienced,
and I test with a variety of hardware.  First, are you plugging in an
ethernet cable at home?  If you are *not* this could indicate scanning
problems.  What wifi card do you have?  A bug specifically with newer
wifi cards and suspend/resume was fixed recently in the kernel, but I
don't believe that Ubuntu 9.04 has that fix for mac80211-based drivers
yet.

When NM asks for the WEP key again, that means the driver failed to
connect to the AP for some reason.  That's driver flakiness again (due
to the fact that effort has to be split up between 10x as many drivers
as Apple cares about).  Does it work if you re-enter your key?  In the
future NM will just try a bit harder to connect before giving up, which
should help the problem of crappy drivers, but wont' entirely fix it,
since the driver itself is usually to blame.

Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]