You are not logged in.

#1 2016-01-29 13:24:36

I_Love_Apple_Sauce
Member
Registered: 2015-05-18
Posts: 7

[SOLVED] Latency spikes every 2 minutes

Hello, about 1 month ago I started getting frequent latency spikes. When pinging google.com (or any other address), the average response time is 11ms and every 120 seconds (give or take 3 seconds) it goes up to 300ms for 3 seconds and then goes back down to normal.

The NIC I'm using is TP-Link 822N V2, which as far as I was able to find out, uses ath9k_htc driver. I tried building the newest one I could from https://github.com/qca/open-ath9k-htc-firmware, didn't change anything. I tried different NICs to be sure it isn't a router problem. I used TP-Link 722N and Edimax EW-7811UN. Using 722N didn't change a thing (it uses the same ath9k_htc) but everything was perfectly fine with Edimax card, which leads me to believe ath9k_htc is conflicting with something in my system.

dmesg output:
http://pastebin.com/BqcTyUJ6

Journalctl output:
http://pastebin.com/RXXXYf3J

lsusb entry:
Bus 001 Device 012: ID 0cf3:7015 Atheros Communications, Inc. TP-Link TL-WN821N v3 / TL-WN822N v2 802.11n [Atheros AR7010+AR9287]

lsmod|grep ath output:
http://pastebin.com/ZCEQd76f

After digging around, I found this post, which unfortunately has no answers, but describes exactly the same problem as I have. Maybe it has some more useful information. https://unix.stackexchange.com/question … s-problems

Usually I'm using linux-ck kernel (currently using linux-ck-piledriver 4.3.4-1) but I tried default Arch kernel and LTS but it made no difference.

Any advice would be highly appreciated, this thing is driving me nuts.

Last edited by I_Love_Apple_Sauce (2016-02-01 07:25:10)

Offline

#2 2016-01-30 08:58:13

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] Latency spikes every 2 minutes

Moving to "Networking, Server and Protection".

Offline

#3 2016-01-31 06:24:13

gedgon
Member
From: Poland
Registered: 2011-01-27
Posts: 95

Re: [SOLVED] Latency spikes every 2 minutes

I_Love_Apple_Sauce wrote:

[...]the average response time is 11ms and every 120 seconds (give or take 3 seconds) it goes up to 300ms for 3 seconds and then goes back down to normal.

It's probably caused by a background network scan. Try other network manager (where you can disable periodic network scanning when connected) like connman or patch a NetworkManager. Here's an old patch https://bugs.debian.org/cgi-bin/bugrepo … 2180;att=1

Offline

#4 2016-01-31 09:00:34

I_Love_Apple_Sauce
Member
Registered: 2015-05-18
Posts: 7

Re: [SOLVED] Latency spikes every 2 minutes

gedgon wrote:
I_Love_Apple_Sauce wrote:

[...]the average response time is 11ms and every 120 seconds (give or take 3 seconds) it goes up to 300ms for 3 seconds and then goes back down to normal.

It's probably caused by a background network scan. Try other network manager (where you can disable periodic network scanning when connected) like connman or patch a NetworkManager. Here's an old patch https://bugs.debian.org/cgi-bin/bugrepo … 2180;att=1

Thanks, I will give it a try and post the results.

Offline

#5 2016-01-31 17:27:24

I_Love_Apple_Sauce
Member
Registered: 2015-05-18
Posts: 7

Re: [SOLVED] Latency spikes every 2 minutes

So I tried switching to connman and the problem remains. Now that I think about it, even if there was some kind of background scan going on, why would it only affect 2 NICs and not the 3rd one.

EDIT: I reread the suggestion above and realized that I forgot to actually do anthing else besides just changing network manager. After visiting man connman and adding BackgroundScanning=false to /etc/connman/main.conf and restarting connman.service everything works fine now. Thanks for help.

EDIT 2: There seems to be networkmanager-noscan package in AUR which implements a patch for no background scans when connected to wifi. Might be useful for somebody.

Last edited by I_Love_Apple_Sauce (2016-01-31 17:54:57)

Offline

#6 2016-01-31 17:54:49

gedgon
Member
From: Poland
Registered: 2011-01-27
Posts: 95

Re: [SOLVED] Latency spikes every 2 minutes

I_Love_Apple_Sauce wrote:

So I tried switching to connman and the problem remains.

Just to be sure. Have you disabled background scanning? It's enabled by default.

/etc/connman/main.conf

[General]
BackgroundScanning = false

Don't forget to restart the service after that.

I_Love_Apple_Sauce wrote:

Now that I think about it, even if there was some kind of background scan going on, why would it only affect 2 NICs and not the 3rd one.

Probably buggy ath9k_htc firmware sad

Offline

#7 2016-01-31 17:55:52

I_Love_Apple_Sauce
Member
Registered: 2015-05-18
Posts: 7

Re: [SOLVED] Latency spikes every 2 minutes

gedgon wrote:
I_Love_Apple_Sauce wrote:

So I tried switching to connman and the problem remains.

Just to be sure. Have you disabled background scanning? It's enabled by default.

/etc/connman/main.conf

[General]
BackgroundScanning = false

Don't forget to restart the service after that.

I_Love_Apple_Sauce wrote:

Now that I think about it, even if there was some kind of background scan going on, why would it only affect 2 NICs and not the 3rd one.

Probably buggy ath9k_htc firmware sad

Yea, edited my previous post. Forgot to edit connman conf file. Thanks for help!

Offline

#8 2016-02-01 05:18:00

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] Latency spikes every 2 minutes

@I_Love_Apple_Sauce, please mark the thread as solved.

Offline

Board footer

Powered by FluxBB