Dell & parport & Atheros WLAN latency woes
30 Apr 2017 20:29 #92371
by siggi
Dell & parport & Atheros WLAN latency woes was created by siggi
Hey y'all,
I have LinuxCNC 2.7.8 newly set up on a new to me Dell Opteron 780 (Core 2 Quad @ 2.5GHz, 4Gb memory, internal video), and I'm really struggling with latency. I'm using the parport for now, though I have a Mesa 5i25 & 7i76 coming.
Now, I've tried the isolcpu and IRQ affinity trick. This drops jitter on latency-test down to approximately 27us, and if I use idle=poll, I get down to ~7us. I'm loath to leave the machine running day in and day out with idle=poll, as it seems to gobble power - the cores all run at ~60C instead of ~35C. I've played with idle=halt (doesn't help), idle=mwait (doesn't boot) and idle=nomwait (probably a noop) without improvement over no idle argument.
So, I'd resigned myself to 27us of jitter, no biggie, I guess.
Enter networking problems.
I got a Ralink 7601 USB Wifi dongle, but the vendor's driver seems to be a piece of @#$%. After futzing with it for days, I find the ping times to my local router will creep up to 10s of seconds without any particular provocation - sad. The Linux community driver requires kernel 3.19 (LinuxCNC is at 3.4), and I really didn't want to dive into the rathole of trying to backport it.
So, I ran out to a local PC hardware store, and bought the oldest looking PCI WiFi card they had. This was a TP Link TL-WN851ND, which seems to be an Atheron chipset. To my relief, this just worked(TM) as soon as I'd plugged it in. The only problem is that it bumps my latency to >300us. This time-warp seems to happen with a period >100s, but I can provoke it by doing "ifconfig up wlan0".
Here's the lscpi for it:
--- cut here ---
# lspci -s 04:02.0 -vv -k
04:02.0 Network controller: Atheros Communications Inc. AR9227 Wireless Network Adapter (rev 01)
Subsystem: Atheros Communications Inc. Device 0300
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 168, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 18
Region 0: Memory at f76f0000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [40] #80 [0000]
Kernel driver in use: ath9k
--- cut here ---
It seems the time warp goes away when I "ifconfig down wlan0", so that'll be the short term fix, though it's a PITA as I post GCode from another machine through Samba ATM.
So, to my questions; 27us - is that OK for parport? Hopefully it be fine for the Mesa 5i25 card? Am I going to be better off with another Linux version/distro with the Mesa card?
For the Atheros, is this a known issue? Is there any fix that don't involve turning down networking?
Siggi
I have LinuxCNC 2.7.8 newly set up on a new to me Dell Opteron 780 (Core 2 Quad @ 2.5GHz, 4Gb memory, internal video), and I'm really struggling with latency. I'm using the parport for now, though I have a Mesa 5i25 & 7i76 coming.
Now, I've tried the isolcpu and IRQ affinity trick. This drops jitter on latency-test down to approximately 27us, and if I use idle=poll, I get down to ~7us. I'm loath to leave the machine running day in and day out with idle=poll, as it seems to gobble power - the cores all run at ~60C instead of ~35C. I've played with idle=halt (doesn't help), idle=mwait (doesn't boot) and idle=nomwait (probably a noop) without improvement over no idle argument.
So, I'd resigned myself to 27us of jitter, no biggie, I guess.
Enter networking problems.
I got a Ralink 7601 USB Wifi dongle, but the vendor's driver seems to be a piece of @#$%. After futzing with it for days, I find the ping times to my local router will creep up to 10s of seconds without any particular provocation - sad. The Linux community driver requires kernel 3.19 (LinuxCNC is at 3.4), and I really didn't want to dive into the rathole of trying to backport it.
So, I ran out to a local PC hardware store, and bought the oldest looking PCI WiFi card they had. This was a TP Link TL-WN851ND, which seems to be an Atheron chipset. To my relief, this just worked(TM) as soon as I'd plugged it in. The only problem is that it bumps my latency to >300us. This time-warp seems to happen with a period >100s, but I can provoke it by doing "ifconfig up wlan0".
Here's the lscpi for it:
--- cut here ---
# lspci -s 04:02.0 -vv -k
04:02.0 Network controller: Atheros Communications Inc. AR9227 Wireless Network Adapter (rev 01)
Subsystem: Atheros Communications Inc. Device 0300
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 168, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 18
Region 0: Memory at f76f0000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [40] #80 [0000]
Kernel driver in use: ath9k
--- cut here ---
It seems the time warp goes away when I "ifconfig down wlan0", so that'll be the short term fix, though it's a PITA as I post GCode from another machine through Samba ATM.
So, to my questions; 27us - is that OK for parport? Hopefully it be fine for the Mesa 5i25 card? Am I going to be better off with another Linux version/distro with the Mesa card?
For the Atheros, is this a known issue? Is there any fix that don't involve turning down networking?
Siggi
Please Log in or Create an account to join the conversation.
30 Apr 2017 20:56 #92373
by siggi
I forgot to mention that I thought installing the card had provoked SMI somehow, so I tried the "smictrl" utility, which has no effect.
Replied by siggi on topic Dell & parport & Atheros WLAN latency woes
The only problem is that it bumps my latency to >300us. This time-warp seems to happen with a period >100s, but I can provoke it by doing "ifconfig up wlan0".
I forgot to mention that I thought installing the card had provoked SMI somehow, so I tried the "smictrl" utility, which has no effect.
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 18517
- Thank you received: 6187
30 Apr 2017 21:56 #92380
by tommylight
Replied by tommylight on topic Dell & parport & Atheros WLAN latency woes
Dell Opteron ?????
Optiplex 780, i think.
27.000 latency is very usable for parallel port, it does not matter much for 5i25 as it does not use a base thread.
Atheros was nice at the time when i was suing it for wardriving, since it has gone the way of the dodo and in some distros it is blacklisted due to causing some minor issues.
Even at 50.000 latency you can still get 20.000 pulses per second, i doubt you will need more, only if using to much microstepping or encoder counting.
Optiplex 780, i think.
27.000 latency is very usable for parallel port, it does not matter much for 5i25 as it does not use a base thread.
Atheros was nice at the time when i was suing it for wardriving, since it has gone the way of the dodo and in some distros it is blacklisted due to causing some minor issues.
Even at 50.000 latency you can still get 20.000 pulses per second, i doubt you will need more, only if using to much microstepping or encoder counting.
Please Log in or Create an account to join the conversation.
01 May 2017 02:05 #92402
by siggi
Doh, of course. Thanks...
Replied by siggi on topic Dell & parport & Atheros WLAN latency woes
Optiplex 780, i think.
Doh, of course. Thanks...
Please Log in or Create an account to join the conversation.
Time to create page: 0.067 seconds