# Slow network(again)



## Maccraft123 (Dec 31, 2018)

Ping is normal, ranging from 10-500ms.
What really bothers me is slow ascending network speed.
If I run speedtest it stays at 0 for several seconds, then it rises, slowly.
With upload speed it also stays at 0 for long time, then just some ripples of 0.xx mbps

dmesg: https://bpaste.net/show/29c4882e9afb
pciconf -lvv: https://bpaste.net/show/5cf02e62baf6
ifconfig -v wlan0: https://bpaste.net/show/debd364cf732
kldstat -v: https://bpaste.net/show/cf3862c7048c


----------



## johnblue (Jan 2, 2019)

Maccraft123,

First.  There is nothing wrong with using speedtests to see what is going on.  But.

What you really need to be looking at is the totality of the traffic that is being placed on the wire.  TCP retransmission requests and/or resets could be causing your upload speed to be slow and you can only investigate it with a packet capture.  Here is where tcpdump(1) is your best friend!

Assuming that your interface is "bge0" then a simple tcpdump command will look like:

`tcpdump -s 0 -n -i bge0 -w filenamehere.pcap`

-s 0 = full packet capture
-n = no DNS lookup (it can be useful but I find that it just causes extra traffic to sort through)
-i bge0 = interface to capture traffic from
-w = name of the file to save the capture to

Start your packet capture and run a couple of tests.  Next, examine the file using Wireshark.  Admittedly, your learning curve may be vertical initially but if you keep at it, it will flatten out for you and become easier.  There are many, many Wireshark howtos to help slice up pcaps that can be found here:

https://sharkfestus.wireshark.org/retrospective

Good hunting!


----------



## SirDice (Jan 2, 2019)

Maccraft123 said:


> Ping is normal, ranging from 10-500ms.


What exactly are you pinging because those numbers look normal? Normal LAN pings should be less than 1ms. Local internet sites (same ISP, or at least very close) 10-15 ms. Some areas in Africa or Asia, 2s (if the ping even makes it back).



Maccraft123 said:


> If I run speedtest it stays at 0 for several seconds, then it rises, slowly.


How "local" is that speed test? I mean, if the site is halfway across the world I would expect this.


----------



## Maccraft123 (Jan 2, 2019)

It takes servers from lowest ping, in my city 90% of time


----------



## SirDice (Jan 3, 2019)

I just noticed this is regarding wireless. Do any of your neighbors have wifi? In my street there are literally dozens of wireless networks and they're all competing for the same frequency ranges. Which means everybody's wifi (including mine) is going to suck.


----------



## Phishfry (Jan 3, 2019)

Your android device may be interfering some.
ue0: <USB Ethernet> on urndis0
Whatever that is you should unplug it.

speedtest is not a very good way to isolate this problem.
You should hook up a wired computer to your networks Access Point and run benchmarks/iperf3 to see what kind of LAN speeds you can achieve and do ping tests to the world from your wired computer as well.
That might help isolate radio related issues from wireless.


----------



## Maccraft123 (Jan 3, 2019)

SirDice I ran dmesg after connecting phone to upload it


----------

