# Slow browsing with *some* pages in linux only

## breakerfall

Hey.. up until a few weeks ago, browsing was fine in linux but now, some pages take ages to load... downloading information a bytes a second. I know it's not the ISP at fault as I can browse these pages at full speed with other machines on the network and with windows too. I believe the problem may have started after an emerge world a while back.

At first, I thought that it was only a mozilla problem (was sure konqueror was fine) but now it seems that konqueror suffers the same problem. Thankfully, it's only very few websites - namely forum based sites (Speedguide.net linuxquestions.org). 

My MTU is set to 1500 (which is right for a cable connection). I'm not receiving any collisions or errors and downloading files usually run at full speed of my downstream.

Does anyone have any idea what could be causing this kind of problem?

Thanks  :Smile: 

----------

## Bombs14

are you playing music while surfing sites? I know of one case where if you use an older version of flash/shockwave and you go onto one of those flash/shockwave sites while listening to music, it will seem to be stuck until your music stops.

----------

## breakerfall

I wish the problem was that simple...  :Sad: 

The pages eventually load... but it takes quite a long time, unfortunately.

----------

## breakerfall

Anyone?

Any kind of suggestion is appreciated. It's really starting to get to me. And the computer won't like me when it gets to me.   :Evil or Very Mad: 

Is there any kind of file in linux which could cause slower browsing speeds? Anything? I feel silly for causing this to happen in the first place and I'm almost certain that it may have originated from an etc-update.  :Sad: 

----------

## thumper

Make sure your /etc/resolv.conf has proper entries for nameservers.

I have similar problems with Konqueror, however Mozilla and Mozilla-Firefox are very fast.

I found temporary workaround by installing privoxy (emerge privoxy) and setting it up.

Even in passthru mode, it still has a positive effect, this thread has some info as well: https://forums.gentoo.org/viewtopic.php?t=211449&start=25

George

----------

## breakerfall

hmmm, it's just frustrating that I didn't have this problem until a few weeks ago  :Sad: 

Is there anything else that could be causing this problem? I have a second gentoo box right next to me with mozilla which doesn't have this problem (although it hasn't been updated in quite a while). 

Do you know of any particular global config in gentoo which could be causing these slow-down issues with browsing? My resolv.conf file is fine.  :Sad: 

----------

## Mark Clegg

What kernel are you using?

I've got exactly the same problem, with gentoo-dev-2.6.8-r1, I've just rebooted under gentoo-dev-2.6.7-r13 and it's working properly again.

 ....  need more test results.... any takers?

----------

## breakerfall

Jeez - I hope that's it. I'm running 2.6.8-r1.. I'll test as soon as I get back home. I just have to run out. I'll test and update this thread. Watch this space.  :Smile: 

Oh and thanks for the heads-up, hope you're right  :Very Happy: 

----------

## Mark Clegg

I've just gone to gentoo-dev-2.6.8-r3 and it's still the same. Last emerge sync has also provided kdelibs-3.2.3-r2 (from r1)  and kdenetwork-3.2.3-r1 (from 3.2.3), still to merge

I'm going to try these next....

----------

## breakerfall

I can now confirm that the problem definately lies with the kernel. I dropped back to the 2.6.7-r13 version and the problem is gone.

Again, thanks and now, what course of action? A bug report perhaps?

----------

## Mark Clegg

emerged the updated kdelibs and kdenetwork - still the same...

Submitted a bug : https://bugs.gentoo.org/show_bug.cgi?id=61966

----------

## breakerfall

Thanks for the link - I'll keep tabs on it.

----------

## Mark Clegg

I've done a packet capture under 2.6.8 and am confused....

local system is 192.168.1.107, remote is 212.250.5.117

```

  9.016523 192.168.1.107 212.250.5.117 HTTP GET /ServiceStatus/ HTTP/1.1

  9.033419 212.250.5.117 192.168.1.107 TCP  www > 32827 [ACK] Seq=1 Ack=450 Win=15935 Len=0 TSV=1384836945 TSER=4294934690

  9.055614 212.250.5.117 192.168.1.107 HTTP HTTP/1.1 200 OK

  9.055651 192.168.1.107 212.250.5.117 TCP  32827 > www [ACK] Seq=450 Ack=222 Win=6912 Len=0 TSV=4294934729 TSER=1384836947

  9.071004 212.250.5.117 192.168.1.107 HTTP Continuation

  9.071059 192.168.1.107 212.250.5.117 TCP  32827 > www [ACK] Seq=450 Ack=1449 Win=9856 Len=0 TSV=4294934744 TSER=1384836947

  9.082433 212.250.5.117 192.168.1.107 HTTP Continuation

  9.082490 192.168.1.107 212.250.5.117 TCP  32827 > www [ACK] Seq=450 Ack=2897 Win=12800 Len=0 TSV=4294934756 TSER=1384836947

  9.093560 212.250.5.117 192.168.1.107 HTTP Continuation

  9.099489 192.168.1.107 212.250.5.117 TCP  32827 > www [ACK] Seq=450 Ack=4345 Win=15616 Len=0 TSV=4294934773 TSER=1384836947

 14.437571 212.250.5.117 192.168.1.107 HTTP Continuation

 14.441839 192.168.1.107 212.250.5.117 TCP  32827 > www [ACK] Seq=450 Ack=4467 Win=15616 Len=0 TSV=4294940116 TSER=1384836947

 18.932214 212.250.5.117 192.168.1.107 TCP  www > 32826 [FIN, ACK] Seq=350 Ack=454 Win=16384 Len=0 TSV=1384837935 TSER=4294934631

 18.971866 192.168.1.107 212.250.5.117 TCP  32826 > www [ACK] Seq=454 Ack=351 Win=8064 Len=0 TSV=4294944647 TSER=1384837935

 19.905862 212.250.5.117 192.168.1.107 HTTP Continuation

 19.905991 192.168.1.107 212.250.5.117 TCP  32827 > www [ACK] Seq=450 Ack=4589 Win=15616 Len=0 TSV=4294945581 TSER=1384836947

```

You can see from the timestamps in column 1 there are approx 4 second delay in the data stream. But they seem to be delays in the target server sending the next packet after the previous has been acknowledged, so why does the local kernel version affect the response time of the remote server?

----------

## devon

I have been seaching the lkml and found some similar issues with 2.6.8. Have you tried the following?

```
echo "0" >/proc/sys/net/ipv4/tcp_window_scaling
```

----------

## Mark Clegg

/me googles a bit....

You mean this

Works for me... thanks Devon.

Sounds a bit like it's a problem when behind certain firewalls, I'm behind a linksys, what about you breakerfall?

Question is, tcp_window_scaling was 1 in 2.6.7 and that worked fine, so why the different behaviour in 2.6.8?

----------

## breakerfall

 *Mark Clegg wrote:*   

> /me googles a bit....
> 
> You mean this
> 
> Works for me... thanks Devon.
> ...

 

Ah, so this is a viable fix? 

And yes, I'm also behind a linksys router/firewall. It's still a rather strange problem and I don't understand how the fault could lie with the firewall when it was fine in previous kernel versions.  :Confused: 

----------

## gcasillo

I just ran into these symptoms last night between 12:00-2:00am. Not sure if I emerged something that caused it, but I had been using the same kernel, 2.6.7-r11, for a long time including today. Most hosts would take 30-60 seconds to finally load in Konqueror. Checking mail took 30-60 seconds when it used to be instantaneous. Called my ISP and confirmed that there wasn't something wrong on their end.

Just updated to 2.6.7-r13. Same problem. Tried the tcp_window_scaling trick (setting it to '0'). No help.

This sucks big time. I have a dozen or so boxes I administer at work, and I hope I don't see this creep into them. I am reluctant to update to 2.6.8 since I ran into scads of problems mainly with SATA disks and CD writers. No thanks as those are important to me.

----------

## gcasillo

Also, I am behind a Netgear web router and switch.

----------

## thumper

 *gcasillo wrote:*   

> Also, I am behind a Netgear web router and switch.

 

Have you checked it with mozilla or mozilla-firefox?

I found this somewhere, you could see if it helps:

```
sysctl -w net.ipv4.tcp_window_scaling=0

sysctl -w net.ipv4.tcp_timestamps=0

sysctl -w net.ipv4.tcp_sack=0
```

I had to use privoxy to solve the problem for konqueror until it gets fixed, or I find a fix. :Sad: 

George

----------

## gcasillo

As I stated in that bug report, I can browse with the lynx text-only browser just fine. However, when I try to browse with Konqueror or even Firefox, I experience the problem. I will try that sysctl trick when I return home later.

Ah, I should also note (and will in the bug report too) that I also had a box running 2.6.7-r11 and kde-3.2.3 todya. No problems whatsoever browsing any sites. But as soon as I updated that box to kde-3.3.0 tonight, BAM, delayed web browsing.

I suspect the problem is in kdenetwork-3.3.0 or perhaps kdelibs-3.3.0, but I'm no code tracer.

...and yet, on my laptop (from which I type this), I am running 2.6.7-r13 and kde-3.3.0 and having no problems whatsoever...

What a wreck of a Monday it's been.   :Crying or Very sad: 

----------

## breakerfall

It seems that we have 2 different problems here.

Your issues may lie with kde whilst mine / Mark Glegg's seems to lie with the latest kernel releases.

----------

## thumper

I HAVE SOLVED IT WHOOHOO

https://bugs.gentoo.org/show_bug.cgi?id=62330

If your not using ipv6, kdelibs still tries to do ipv6 lookups first before trying ipv4 lookups.

--with-ipv6-lookup does not appear to be supported in the configure of kdelibs, so for kdelibs having USE="-ipv6" did not do anything.

however adding KDE_NO_IPV6=1

to

/etc/env.d/99kde-env

will fix it, and now sites that would not load, load fast.

Remember, google and grep are your friends.  :Cool: 

George

----------

## Mark Clegg

There are definately two different issues here. the IPV6 fix does not fix my problem (and probably breakerfalls), I tried that earlier.

----------

## gcasillo

Mozilla is working for me. Konqueror is not. Additionally, I can't check mail without this long ass delay.

The KDE_NO_IPV6=1 did nothing for me. You may be on to the root of the problem though, thumper. Thanks for offering the tip.

Looks like 3.3.1 should be a pretty quick release, because this is a showstopper. Or do they go the Linux route and call it 3.3.0.1?  :Rolling Eyes: 

----------

## scoobydu

Same here ... I get very slow updates in firefox with the nitro6 2.5.8.1 kernel, where as 2.6.7ck doesn't give this problem.

I don't have any KDE apps installed at all, with no libs ..... ?!

----------

## breakerfall

I agree - 2 very different issues. I had these slow-downs with any browser accessing the particular problem hosts. Lynx, Mozilla and Konqueror all had the same problem.

Besides, until I tested with konqueror, KDE nor any of it's libs was running on my system. A strange problem and I would still love to find out how the kernel can have conflicts with my router in this fashion.

----------

## thumper

 *gcasillo wrote:*   

> Mozilla is working for me. Konqueror is not. Additionally, I can't check mail without this long ass delay.
> 
> The KDE_NO_IPV6=1 did nothing for me. You may be on to the root of the problem though, thumper. Thanks for offering the tip.
> 
> Looks like 3.3.1 should be a pretty quick release, because this is a showstopper. Or do they go the Linux route and call it 3.3.0.1? 

 

I had to restart the machine for it to show up in the environment after adding it to  /etc/env.d/99kde-env

Also you might try commenting out the ipv6 lines in /etc/hosts, and is your kernel built with or without ipv6 support?

Also if you use a linksys router, take the check out of Block wan requests, it has a drastic effect on mail servers that check ident.

Also you can fiddle with the settings under Preferences in Internet & Networking in the KDE Control Center.

In my case Mozilla and Firefox always worked fast, Konq. was for the most part unusable, the KDE_NO_IPV6=1 fixed Konq for me.

Also according to the LKML there are folks having network related issues with 2.6.8+ kernels, I'm using 2.6.7-gentoo-r14.

Good luck;

George

----------

## gcasillo

I will try rebooting my machine when I get home to see if that takes and fixes Konqueror. Firefox was usable (read: normal) this morning, but then after an hour or so, it too was slowed. Odd.  :Confused: 

I am straight ipv4. No ipv6 enabled that I am aware of. I am using a Netgear web router connected to my DSL modem, and a Netgear 5-port gigabit switch that connects my 3 computers to the web router (which does port forwarding, etc.).

----------

## gcasillo

DEAD IN THE WATER!  :Evil or Very Mad: 

Now I am unable to reach anything network wise. KDE is not a factor at this point, because I'm not even starting X (just booting into text console).

I set 99kde-env then rebooted into 2.6.7-r13. I noticed that ntpdate couldn't find the timeserver(s). After scratching my head and determining that I could not even ping my ISP gateway or nameservers, I decided to build & install 2.6.7-12.

Same problem. No visible network, though I can ssh between machines on my local 192.168.0. network.

I give 2.6.7-r11 a try, a kernel I've used recently without incident.

Same problem.  :Confused: 

Fuck it. I build, install, and boot into 2.6.5-r1, a kernel I know I've used successfully and had rebooted from time to time. I note that I rarely reboot after building a new kernel if everything appears to work, so 2.6.5-r1 was the last one I can remember FOR SURE that I had working among reboots.

Same problem.  :Mad:  WTF?

So I take the drastic measure of plugging this computer directly into my DSL modem and configuring /etc/conf.d/net accordingly. No firewalls, routers, or switches. Static IP.

Still can't ping my ISP gateway or name servers. I can ping nothing.

I gave up and came to work to get some stuff done and post this. When I return home at whatever hour tomorrow morning, I'm going to slide a fucking boot CD into that machine and see what happens. If I can't network connectivity, then I'm going to give up for the rest of the week.

Kernel problem? Probably, but how far back I couldn't tell you. KDE? Maybe as there's been some discussion. Could something have changed in the bootscripts or baselayout or initscripts that would have affected this? Kernel headers? I still have 2.6.7-r4 installed despite the different kernels I tried tonight. Perhaps I should fall back to the latest 2.6.5 kernel headers. Glibc? I have noticed a problem (again tonight on a machine at work):

1) Update linux26-headers (perhaps uninstalling linux-headers before doing so, thanks Gentoo)

2) Update glibc to glibc-20040808 (latest version I believe in ~x86)

3) Boom network connectivity flakes out

At this point, if I were doing these things from another computer (e.g. my laptop) via SSH, then I would have to go to the machine and restart sshd. Then I could log back in from my laptop and proceed. A reboot of the updated machine would work as well. More on that in this thread.

If luck holds, I'm going to downgrade my kernel headers back to the latest 2.6.5 version, rebuild glibc, and get my network connectivity back. That after trying a boot CD (2004.2 and Knoppix 3.6).

For reference, I have several machines with similar components (Intel P4 3.0GHz, Intel D865PERL motherboards, onboard e1000 gigabit NIC) at work that appear to be working just fine now. I can ping addresses outside of our local network and browse web pages with lynx (they're console only servers). All running 2.6.7-r13, glibc-20040808, and linux26-headers-2.6.7-r4.

Fuck me.

----------

## gcasillo

Of course, it might help to know that 1) my ISPs nameserver IP addresses have changed (according to their website) and 2) the netmask is 255.255.254.0 and not 255.255.255.0. Ugh, it's only Tuesday too...  :Crying or Very sad: 

----------

## gcasillo

Pardon my ire. It seems the local phone company, Alltel, which provides my DSL line has an outage. Talked to a buddy of mine today who has DSL and ISP service with Alltel. He is down as well.

Have to say this is a first. Took forever getting setup with Verizon (sold out to Alltel a year or so later), but since I've been set up, I've had good quality service. Can't ping my gateway or nothing right now.

Seems I was supposed to be upgraded from a 768Kbps down connection to a 1.5Mbps down connection. At first, I thought my two day outage was part of this, but I'm thinking now somebody botched something.

What a tough week for network connectivity. Strange, strange, strange.

----------

## gcasillo

Phone company botched the upgrade. Conference call with me, my ISP (good guys), and the phone company. ISP dude gives level 1 guy at telco the lowdown. Telco level 1 guy confirms some things, then bumps it to level 2 guy. Level 2 guy doesn't realize ISP dude is conferenced in, tells me he'll look into my line, and puts us on hold. Comes back after a few minutes and says, "Well everything looks good here, your ISP probably missed something."

ISP dude chimes in and gives him the complete lowdown (technical stuff). Level 2 dude puts us on hold in order to redo something. Before he comes back, ISP dude says, "Ok, now I'm see you. They fixed something." Level 2 telco guy comes back and we give him the all clear.

 :Rolling Eyes: 

To end this ranting thread on an up note, I'm now pulling 1.5Mbps down. Double the 768Kbps I had for four years.   :Cool: 

----------

## Mark Clegg

According to this  http://lwn.net/Articles/92727/, the problem isn't with the kernel, it's the internet that's broken.

Setting setting the default window scale to 0 is the recommended solution until the net is fixed.

Thanks to Gustavo Barron for pointing out the above article.

----------

