WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: slow wifi in TC x86  (Read 6608 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
slow wifi in TC x86
« on: July 31, 2019, 04:05:13 PM »
I'm wracking my brains trying to figure out why downloads are ~3-4x slower when booted into my TC x86 frugal installation compared to when booted into my Devuan ASCII amd64 partition.

Devuan is using network-manager, which I profoundly dislike due to its complexity.

TC x86 is using the following command when connecting to unsecured network:
Code: [Select]
iwconfig wlan0 essid $ssid &
sleep 5
udhcpc -i wlan0

and this command when connecting to secured network:
Code: [Select]
echo 'ctrl_interface=/var/run/wpa_supplicant' > /tmp/wifi
wpa_passphrase "$ssid" "$password" >> /tmp/wifi
wpa_supplicant -i wlan0 -c /tmp/wifi &
sleep 5
udhcpc -i wlan0

Speed is slow regardless of whether I'm connected to a secured or unsecured network.

What am I doing wrong? If anything, I'd expect wifi to be faster in TC given the lack of bloat.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: slow wifi in TC x86
« Reply #1 on: July 31, 2019, 04:16:46 PM »
Here is some information while connected to a secured network.

From Devuan:
Code: [Select]
bruno@thinkpad:~492$ uname -a
Linux thinkpad 4.16.2-gnu #1 SMP Thu Apr 12 13:27:37 UTC 2018 x86_64 GNU/Linux

bruno@thinkpad:~493$ sudo lshw -c network
---clip---
  *-network
       description: Wireless interface
       product: AR928X Wireless Network Adapter (PCI-Express)
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlan0
       version: 01
       serial: 00:26:b6:b7:0a:03
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=4.16.2-gnu firmware=N/A ip=192.168.43.97 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:17 memory:e5a00000-e5a0ffff

bruno@thinkpad:~496$ iwconfig wlan0
wlan0     IEEE 802.11  ESSID:"AndroidAP-bd" 
          Mode:Managed  Frequency:2.412 GHz  Access Point: 98:F1:70:4F:4B:67   
          Bit Rate=130 Mb/s   Tx-Power=16 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=70/70  Signal level=-24 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:14   Missed beacon:0

bruno@thinkpad:~497$ ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.43.97  netmask 255.255.255.0  broadcast 192.168.43.255
        inet6 fe80::9919:79dd:137f:2dcf  prefixlen 64  scopeid 0x20<link>
        ether 00:26:b6:b7:0a:03  txqueuelen 1000  (Ethernet)
        RX packets 53  bytes 12090 (11.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 71  bytes 9820 (9.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

From TC:
Code: [Select]
tc@box:~$ uname -a
Linux box 4.19.10-tinycore #1999 SMP Tue Dec 18 13:36:47 UTC 2018 i686 GNU/Linux

tc@box:~$ iwconfig wlan0
wlan0     IEEE 802.11  ESSID:"AndroidAP-bd" 
          Mode:Managed  Frequency:2.412 GHz  Access Point: 98:F1:70:4F:4B:67   
          Bit Rate=130 Mb/s   Tx-Power=16 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=70/70  Signal level=-26 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:3   Missed beacon:0

tc@box:~$ ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:26:B6:F6:04:E4 
          inet addr:192.168.43.221  Bcast:192.168.43.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2501 (2.4 KiB)  TX bytes:2036 (1.9 KiB)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: slow wifi in TC x86
« Reply #2 on: July 31, 2019, 04:31:17 PM »
Hi GNUser
I don't know, the Devuan  ifconfig  shows  inet6  present. Maybe try installing  ipv6-KERNEL.tcz ?
« Last Edit: November 24, 2019, 09:38:55 AM by Rich »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: slow wifi in TC x86
« Reply #3 on: July 31, 2019, 08:25:16 PM »
That's an excellent thought. I tried it at your suggestion, but no joy.

However, your input was helpful because it made stop looking for a missing extension or for something obviously wrong with the commands.

After much trial and error, I did find the relevant difference between Devuan and TC: For TC I decided to go with a privacy-friendly (i.e., no logs) DNS provider and added this line to the top of /usr/share/udhcpc/default.script:

Code: [Select]
dns="91.239.100.100 89.233.43.71"
Removing the line made the speed problems go away. Very strange. Why would manually setting the DNS provider (rather than accepting whatever the DHCP server provides) cause a dramatic decrease in speed?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: slow wifi in TC x86
« Reply #4 on: July 31, 2019, 08:48:09 PM »
Hi GNUser
Last year I experimented with different  nameserver  entries in  /etc/resolv.conf  but I think that was due to page load speed issues.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: slow wifi in TC x86
« Reply #5 on: July 31, 2019, 10:10:53 PM »
"Page load speed" is a much better way to describe what I was experiencing. Sorry if my description of the issue was misleading.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
slow wifi in TC x86
« Reply #6 on: July 31, 2019, 10:53:17 PM »
Hello GNUser

Much of page loading delay depends on which browser?  and where it stores it’s cache

If any browser cache is stored on a USB you can expect quite a long delay for web site pages previously visited

Good luck


Sent from my iPhone using Tapatalk
« Last Edit: July 31, 2019, 10:56:01 PM by coreplayer2 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: slow wifi in TC x86
« Reply #7 on: July 31, 2019, 11:41:49 PM »
Hi coreplayer2
I would suggest that slow  DNS resolution  can have a big impact on page loads. Nowadays web pages can contain links to dozens
of other sites for content. All of those links need to be resolved as well.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: slow wifi in TC x86
« Reply #8 on: August 01, 2019, 07:32:26 AM »
Accepting dhcp server's dns settings solved the issue while using the same browser.
Even curl, wget, and tce-load -wi were painfully slow before. This also resolved when I deleted my custom dns server line.

Cheers,
Bruno "GNUser"

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: slow wifi in TC x86
« Reply #9 on: August 01, 2019, 03:19:59 PM »
Security warning:

One shouldn't blindly use dns addresses listed on the net without personally researching those addresses from the company itself.

For example, I found the address listed above on a blog from about 2015, where it would be easy for the unscrupulous to change that dns address on a stale page.  Or hack a forum.  Or find out that the address was some sort of backup / alternate to be avoided.  Or the company looks pretty and spouts some great ideals, but has no real security of their own.

Just saying - do research - which means more than just seeing if "it works".


That's a UNIX book! - cool  -- Garth