cancel
Showing results for 
Search instead for 
Did you mean: 

Fix for www.nationwide.co.uk slowness on Linux

Community Veteran
Posts: 4,938
Thanks: 357
Fixes: 16
Registered: 10-06-2010

Fix for www.nationwide.co.uk slowness on Linux

In case anyone else has ever wondered why www.nationwide.co.uk can be stupidly slow to load on Linux, with images peeling down one line of pixels at a time, the problem is due to TCP Window Scaling. Somehow the TCP window size utterly fails to scale, and data ends up trickling in 115 bytes at a time, each one having to be acknowledged before the next will be sent.
I thought the problem may have gone away on its own last time I checked their website, but just now I saw the 4MB 2013 annual report pdf downloading at an entire 1.76KB/s - dialup speed!
In order to download the 4MB pdf in somewhat less than 37 minutes, I disabled TCP window scaling (as root):
# echo 0 > /proc/sys/net/ipv4/tcp_window_scaling

I turned it back on afterwards:
# echo 1 > /proc/sys/net/ipv4/tcp_window_scaling

9 REPLIES
Community Veteran
Posts: 4,938
Thanks: 357
Fixes: 16
Registered: 10-06-2010

Re: Fix for www.nationwide.co.uk slowness on Linux

Further investigation: www.nationwide.co.uk has 2 IP addresses, 155.131.31.10 works fine, 155.131.127.10 is the bad one.
Community Veteran
Posts: 6,307
Thanks: 86
Fixes: 3
Registered: 08-01-2008

Re: Fix for www.nationwide.co.uk slowness on Linux

Hmmm, Someone's systems need updating.

(not yours, theirs!).
Call me 'w23'
At any given moment in the universe many things happen. Coincidence is a matter of how close these events are in space, time and relationship.
Opinions expressed in forum posts are those of the poster, others may have different views.
Community Veteran
Posts: 6,606
Thanks: 209
Fixes: 15
Registered: 16-02-2009

Re: Fix for www.nationwide.co.uk slowness on Linux

I NEVER go to the home screen, it used/does take ages to load, I jump to the log out screen then log in again this has never given me any speed issues.
Just checked the 2 ip's and the 2nd crawled down the screen the 1st was normal.
Have you posted the problem to the webmaster?
Community Veteran
Posts: 6,328
Thanks: 472
Fixes: 41
Registered: 30-07-2007

Re: Fix for www.nationwide.co.uk slowness on Linux

Quote
Further investigation: www.nationwide.co.uk has 2 IP addresses, 155.131.31.10 works fine, 155.131.127.10 is the bad one.
Always wondered why sometimes it's ok and sometimes it's slow Roll eyes
Community Veteran
Posts: 6,606
Thanks: 209
Fixes: 15
Registered: 16-02-2009

Re: Fix for www.nationwide.co.uk slowness on Linux

Quick fix, put the 1st ip in your hosts file as nationwide.co.uk
Community Veteran
Posts: 6,328
Thanks: 472
Fixes: 41
Registered: 30-07-2007

Re: Fix for www.nationwide.co.uk slowness on Linux

Yep, I was going to do that when I get home.
Community Veteran
Posts: 4,938
Thanks: 357
Fixes: 16
Registered: 10-06-2010

Re: Fix for www.nationwide.co.uk slowness on Linux

All I could find on the website was the feedback form, which warns you not to submit any personal information and that you won't get a reply.
I think this is adequate to disable tcp window scaling for a particular IP:
iptables -t mangle -A OUTPUT -m tcp -p tcp --syn -d 155.131.127.10 -j TCPOPTSTRIP --strip-options wscale

Edit: optimized iptables rule by adding --syn
kjpetrie
Rising Star
Posts: 109
Thanks: 9
Fixes: 1
Registered: 19-12-2010

Re: Fix for www.nationwide.co.uk slowness on Linux

Can't say I've ever noticed a problem:
$ cat /proc/sys/net/ipv4/tcp_window_scaling 
1

Must be more to it than that.
Community Veteran
Posts: 4,938
Thanks: 357
Fixes: 16
Registered: 10-06-2010

Re: Fix for www.nationwide.co.uk slowness on Linux

Sometime between the original post and now, their website only resolves to the good IP address.