cancel
Showing results for 
Search instead for 
Did you mean: 

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

ejs
Aspiring Hero
Posts: 5,442
Thanks: 631
Fixes: 25
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 9
ejs
Aspiring Hero
Posts: 5,442
Thanks: 631
Fixes: 25
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.
w23
Pro
Posts: 6,344
Thanks: 93
Fixes: 4
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.
HairyMcbiker
All Star
Posts: 6,792
Thanks: 266
Fixes: 21
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?
MisterW
Superuser
Superuser
Posts: 11,195
Thanks: 3,461
Fixes: 260
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

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

HairyMcbiker
All Star
Posts: 6,792
Thanks: 266
Fixes: 21
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
MisterW
Superuser
Superuser
Posts: 11,195
Thanks: 3,461
Fixes: 260
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.

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

ejs
Aspiring Hero
Posts: 5,442
Thanks: 631
Fixes: 25
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
Aspiring Pro
Posts: 194
Thanks: 24
Fixes: 4
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.
ejs
Aspiring Hero
Posts: 5,442
Thanks: 631
Fixes: 25
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.