LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LQ Suggestions & Feedback (https://www.linuxquestions.org/questions/lq-suggestions-and-feedback-7/)
-   -   We'd like your help - LQ is choosing a CDN (https://www.linuxquestions.org/questions/lq-suggestions-and-feedback-7/wed-like-your-help-lq-is-choosing-a-cdn-736461/)

jeremy 06-29-2009 01:27 PM

We'd like your help - LQ is choosing a CDN
 
As you may know, LQ has utilized a CDN (content distribution network) to speed static content delivery for some time. We're considering switching, however, and would like to see which CDN is the fastest for LQ members. Below I've included three pages that load multiple images from each CDN. We'd like your feedback on which images load the fastest and are cached the best from your location. I've also included a page that loads all images from a local LQ URL as a reference point. Thanks for the feedback.

CDN
http://images.linuxquestions.org/cdntest/cdnl.html
http://images.linuxquestions.org/cdntest/cf.html
http://images.linuxquestions.org/cdntest/front.html

local to LQ
http://images.linuxquestions.org/cdntest/local.html

--jeremy

johnsfine 06-29-2009 01:50 PM

Any particular test you suggest we try?
Simply clicking on them, each of the four loads too fast for me to see the difference.
Do you know a good tool for timing how very fast a tiny image loads? Or are you just worried about people in odd corners of the internet where those don't all load fast? Or should you have provided harder test images? Or am I totally missing the point?

jeremy 06-29-2009 01:54 PM

Realistically, all four should be similar if you're in the USA and on broadband. The benefits of a CDN come in pushing the content closer to the user and more aggressive caching. It's possible that this test is a bit too simple. If that's the case I'll create a page that loads a bunch of images from each CDN - which is closer to how things actually work at LQ in the real world.

--jeremy

mdg 06-29-2009 01:57 PM

url 1 - 0.36 sec
url 2 - 0.37 sec
url 3 - 1.33 sec
url 4 - 1.12 sec

Using Fasterfox page loading timer

cmnorton 06-29-2009 01:58 PM

Cachefly
 
If an eye blink determines speed, then cachefly was the slowest. I could barely tell, though.

samnjugu 06-29-2009 02:01 PM

I think we might need a bigger image, they all load too fast to notice any difference.

jeremy 06-29-2009 02:06 PM

I've updated the first post with a page that loads multiple images from each. Thanks for the feedback so far.

--jeremy

win32sux 06-29-2009 02:06 PM

Code:

win32sux@candystore:/tmp$ wget http://http.cdnlayer.com/lq/images/questions/images/LinuxQuestions.png
--2009-06-29 14:02:43--  http://http.cdnlayer.com/lq/images/questions/images/LinuxQuestions.png
Resolving http.cdnlayer.com... 69.88.152.250
Connecting to http.cdnlayer.com|69.88.152.250|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20870 (20K) [image/png]
Saving to: `LinuxQuestions.png'

100%[===================================================================================================================>] 20,870      56.9K/s  in 0.4s   

2009-06-29 14:02:44 (56.9 KB/s) - `LinuxQuestions.png' saved [20870/20870]

win32sux@candystore:/tmp$ wget http://linuxquestions.cachefly.net/images/questions/images/LinuxQuestions.png
--2009-06-29 14:02:56--  http://linuxquestions.cachefly.net/images/questions/images/LinuxQuestions.png
Resolving linuxquestions.cachefly.net... 205.234.175.175
Connecting to linuxquestions.cachefly.net|205.234.175.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20870 (20K) [image/png]
Saving to: `LinuxQuestions.png.1'

100%[===================================================================================================================>] 20,870      48.8K/s  in 0.4s   

2009-06-29 14:02:57 (48.8 KB/s) - `LinuxQuestions.png.1' saved [20870/20870]

win32sux@candystore:/tmp$ wget http://d1d4g485pex8zi.cloudfront.net/images/questions/images/LinuxQuestions.png
--2009-06-29 14:03:09--  http://d1d4g485pex8zi.cloudfront.net/images/questions/images/LinuxQuestions.png
Resolving d1d4g485pex8zi.cloudfront.net... 216.137.33.55, 216.137.33.166, 216.137.33.213, ...
Connecting to d1d4g485pex8zi.cloudfront.net|216.137.33.55|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20870 (20K) [image/png]
Saving to: `LinuxQuestions.png.2'

100%[===================================================================================================================>] 20,870      51.4K/s  in 0.4s   

2009-06-29 14:03:10 (51.4 KB/s) - `LinuxQuestions.png.2' saved [20870/20870]

win32sux@candystore:/tmp$ wget http://images.linuxquestions.org/CDN/images/questions/images/LinuxQuestions.png
--2009-06-29 14:03:26--  http://images.linuxquestions.org/CDN/images/questions/images/LinuxQuestions.png
Resolving images.linuxquestions.org... 208.101.3.245
Connecting to images.linuxquestions.org|208.101.3.245|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20870 (20K) [image/png]
Saving to: `LinuxQuestions.png.3'

100%[===================================================================================================================>] 20,870      62.6K/s  in 0.3s   

2009-06-29 14:03:26 (62.6 KB/s) - `LinuxQuestions.png.3' saved [20870/20870]

win32sux@candystore:/tmp$

I do think it's tough to get an accurate representation with an image this small, though.

Could you make one that is one or two megabytes?

jeremy 06-29-2009 02:10 PM

win32sux, I updated the test to include multiple images. The reason I didn't put up a single large file is that in the real world, that's not how we use the CDN. A single large file is going to test throughput, which we really don't care about much. Latency on a bunch of smaller files is a better indicator for our usage pattern.

--jeremy

win32sux 06-29-2009 02:12 PM

Quote:

Originally Posted by jeremy (Post 3590437)
win32sux, I updated the test to include multiple images. The reason I didn't put up a single large file is that in the real world, that's not how we use the CDN. A single large file is going to test throughput, which we really don't care about much. Latency on a bunch of smaller files is a better indicator for our usage pattern.

Roger that. :)

custangro 06-29-2009 02:15 PM

Quote:

Originally Posted by jeremy (Post 3590390)
As you may know, LQ has utilized a CDN (content distribution network) to speed static content delivery for some time. We're considering switching, however, and would like to see which CDN is the fastest for LQ members. Below I've included three pages that load multiple images from each CDN. We'd like your feedback on which images load the fastest and are cached the best from your location. I've also included a page that loads all images from a local LQ URL as a reference point. Thanks for the feedback.

CDN
http://images.linuxquestions.org/cdntest/cdnl.html
http://images.linuxquestions.org/cdntest/cf.html
http://images.linuxquestions.org/cdntest/front.html

local to LQ
http://images.linuxquestions.org/cdntest/local.html

--jeremy

http://images.linuxquestions.org/cdntest/cdnl.html

^ Was the fastest for me.

-C

SkyEye 06-29-2009 02:18 PM

Loading in the browser wasn't quite effective as the 1st image in the link is already cached (it's the LQ.org logo I see at the top of the page). On a second test the first one seemed the fastest. I checked with wget and cloudfront link was faster than cdnlayer. And cachefly was usually the slowest in the tests.

Here are rough values after multiple runs of wget. The values changed a lot. These are just the values with the highest frequency. (For the earlier posted image links)

cdnlayer - 0.7s
cachefly - 1.1s
cloudfront - 0.6s
LQ local - 0.8s

EDIT: After jeremy updated the links, I checked again. The values changed, but the patterns remained same.

I'm from Sri Lanka, BTW.

jeremy 06-29-2009 02:24 PM

I'll update the cdnlayer (which we currently use) page to not load images that may already be cached.

--jeremy

win32sux 06-29-2009 02:26 PM

Quote:

Originally Posted by SkyEye (Post 3590446)
Here's are rough values after multiple runs of wget. The values changed a lot. These are just the values with the highest frequency. (For the earlier posted image links)

cdnlayer - 0.7s
cachefly - 1.1s
cloudfront - 0.6s
LQ local - 0.8s

What command line options are you giving wget?

I'm using "wget -p" but it only downloads the images on the local test.

jeremy 06-29-2009 02:37 PM

You'll need to use wget -pH (since the links span multiple hosts when not using the "local" link).

--jeremy

XavierP 06-29-2009 02:58 PM

http://images.linuxquestions.org/cdntest/cf.html was fastest for me

win32sux 06-29-2009 03:13 PM

Code:

cdnlayer.com (Test 1): 17 files, 34K in 0.3s (134 KB/s)
cdnlayer.com (Test 2): 17 files, 34K in 0.5s (68.2 KB/s)
cdnlayer.com (Test 3): 17 files, 34K in 0.4s (81.6 KB/s)
cdnlayer.com (Test 4): 17 files, 34K in 0.5s (69.8 KB/s)
cdnlayer.com (Test 5): 17 files, 34K in 0.4s (78.6 KB/s)
cdnlayer.com (Average): 0.42s (86.44 KB/s)

cachefly.net (Test 1): 17 files, 34K in 0.3s (109 KB/s)
cachefly.net (Test 2): 17 files, 34K in 0.3s (105 KB/s)
cachefly.net (Test 3): 17 files, 34K in 0.4s (95.9 KB/s)
cachefly.net (Test 4): 17 files, 34K in 0.3s (122 KB/s)
cachefly.net (Test 5): 17 files, 34K in 0.3s (123 KB/s)
cachefly.net (Average): 0.32s (110.98 KB/s)

cloudfront.net (Test 1): 17 files, 34K in 0.4s (90.3 KB/s)
cloudfront.net (Test 2): 17 files, 34K in 0.4s (76.7 KB/s)
cloudfront.net (Test 3): 17 files, 34K in 0.4s (87.4 KB/s)
cloudfront.net (Test 4): 17 files, 34K in 0.4s (90.1 KB/s)
cloudfront.net (Test 5): 17 files, 34K in 0.5s (75.3 KB/s)
cloudfront.net (Average): 0.42s (83.96 KB/s)

linuxquestions.org (Test 1): 17 files, 34K in 0.2s (188 KB/s)
linuxquestions.org (Test 2): 17 files, 34K in 0.2s (152 KB/s)
linuxquestions.org (Test 3): 17 files, 34K in 0.2s (150 KB/s)
linuxquestions.org (Test 4): 17 files, 34K in 0.3s (133 KB/s)
linuxquestions.org (Test 5): 17 files, 34K in 0.2s (150 KB/s)
linuxquestions.org (Average): 0.22s (154.6 KB/s)


ANO1453 06-29-2009 03:48 PM

1.850 -cdnl
0.560 - cf
0.975 -front
1.704 -local

Found using Fasterfox

jlliagre 06-29-2009 04:17 PM

Using wget, average times are:
cdnlayer - 2.58s
cachefly - 2.66s
cloudfront - 2.71s
LQ local - 4.79s

jens 06-29-2009 04:36 PM

1: 0,04s
2: 0,04s
3: 0,04s
4: 0,30s

GrapefruiTgirl 06-29-2009 05:52 PM

Most interesting.. I ENVY you people on high-speed!!!!!!!! Blah! :D

Well, my very unscientific testing involved the clock in my browser-- remember, I am getting less than 28.8kbps so it was not difficult to time the loads, unlike YOU PEOPLE :finger-pointing: with your fancy high-speed :D lol

The 3 links from the CDN places took around 28-29 seconds to load fully, with link #3 once taking up to 34 seconds.
The direct link from LQ took 20 seconds consistently.

I cleared my cache before each test.

Sasha

PS - no bigger images! It'll take me an hour to test.
PPS - And here I thought 'CDN layer' was the 'Canadian layer' :scratch:

johnsfine 06-29-2009 08:25 PM

Trying again from a computer with worse internet access: (using wget -pH)

Quote:

Originally Posted by jeremy (Post 3590390)

Downloaded: 17 files, 34K in 0.09s (393 KB/s)

Downloaded: 17 files, 34K in 0.08s (420 KB/s)
Very strange! That second one had a noticeable pause in the middle, maybe a quarter second, but at the end wget reports the whole thing only took .08s. What am I misunderstanding?

Downloaded: 17 files, 34K in 0.06s (536 KB/s)
This was not just a little faster than the second one! This was instant. wget is lying about the total.

Downloaded: 17 files, 34K in 0.2s (184 KB/s)
This was third best: A little slower than the first, significantly faster than the second. wget was flat out wrong about how long the second was, but the other numbers are all plausible.

Retrying the second (I don't know what caching gets used)
Downloaded: 17 files, 34K in 0.07s (464 KB/s)
That time it was true. It was instant.

Retrying the fourth
Downloaded: 17 files, 34K in 0.2s (210 KB/s)
I guess that's why you want a non local server? The local one didn't get faster on retry.

syg00 06-29-2009 09:00 PM

Seeing as how I've been one who has complained about cdnlayer since the move off cachefly, here are my numbers:
0.4
0.03
0.5
0.4

Orders of magnitude tend to become noticable. Those are wget numbers - I'm getting "400 Bad request" from nginx trying to load the pages in F/F. I'll try later from home.

H_TeXMeX_H 06-30-2009 03:18 AM

I wrote a script as a simple benchmark to calculate the average and stdev throughput to each site:

Code:

#!/bin/sh
# benchmark for LQ

iter=10

for site in http://images.linuxquestions.org/cdntest/local.html http://images.linuxquestions.org/cdntest/cdnl.html http://images.linuxquestions.org/cdntest/cf.html http://images.linuxquestions.org/cdntest/front.html http://images.linuxquestions.org/cdntest/scdn.html
do
  for i in $(seq $iter)
  do
    wget -pH -P out "$site" 2>&1 | grep Downloaded | awk '{ print $7 }' | sed 's|(||' >> $(echo "$site" | cut -d / -f 5)
        rm -rf out
  done
done

for i in *.html
do
  echo $i
 
  export avg=$(awk '
    BEGIN{sum=0;lines=0}
    {sum+=$1;lines++}
    END{print sum/lines }' $i)
       
  stdev=$(awk '
    BEGIN{sum=0;lines=0}
    {sum+=(ENVIRON["avg"]-$1)*(ENVIRON["avg"]-$1);lines++}
    END{print sqrt(sum/(lines-1))}' $i)

    echo $avg +- $stdev KB/s
done

exit 0

Code:

cdnl.html
165.3 +- 28.3786 KB/s
cf.html
200.6 +- 25.2419 KB/s
front.html
211.5 +- 37.0173 KB/s
local.html
86.63 +- 2.64997 KB/s

Code:

cdnl.html
187.4 +- 23.1478 KB/s
cf.html
209.8 +- 12.7436 KB/s
front.html
196.6 +- 29.7777 KB/s
local.html
87.04 +- 3.26605 KB/s


pwc101 06-30-2009 03:41 AM

Code:

pwc@mike ~ $ bash ./lq_stat.sh
cdnl.html
1.397 +- 0.203909 KB/s
cf.html
56.028 +- 171.807 KB/s
front.html
1.598 +- 0.215603 KB/s
local.html
96 +- 1.25167 KB/s


Nylex 06-30-2009 04:55 AM

I'm not measuring the times, but none of them are slow for me. They're all fast enough and there's no noticeable difference between them.

brianL 06-30-2009 05:19 AM

I'm not using any precise measuring either. No noticeable difference between cdnl, cf, and front, but local is a bit slower.

H_TeXMeX_H 06-30-2009 05:35 AM

But precise measuring is scientific ... you saying you don't wanna be scientific ? :(

Well, fine, there's no noticeable difference for me between the new sites, but the local one is slow.

alan_ri 06-30-2009 07:23 AM

  1. 197 ms
  2. 425 ms
  3. 933 ms
  4. 199 ms
Cache clear, ADSL.

archtoad6 07-01-2009 04:12 AM

  • Houston/TX/USA
  • ATT "Basic" aDSL resold by local ISP
  • Using Konqueror 3.5.8
    (Is there a timer for Konqueror? -- It's my regular browser for LQ.)
  • Behind SmoothWall Express 3 FW/Gateway w/ Squid set as transparent caching proxy
  • Did not clear cache(s)
Subjective ratings:
  1. http://images.linuxquestions.org/cdntest/cf.html
  2. http://images.linuxquestions.org/cdntest/cdnl.html
  3. http://images.linuxquestions.org/cdntest/local.html
  4. http://images.linuxquestions.org/cdntest/front.html

syg00 07-02-2009 06:02 AM

Code:

cdnl.html
32.081 +- 18.5965 KB/s
cf.html
185.8 +- 24.9301 KB/s
front.html
57.42 +- 0.161933 KB/s
local.html
66.57 +- 0.271006 KB/s

Code:

cdnl.html
29.725 +- 18.4817 KB/s
cf.html
201.95 +- 25.7058 KB/s
front.html
57.365 +- 0.153125 KB/s
local.html
66.345 +- 0.940031 KB/s

Run one after the other. cdnlayer to me is appalling - has been since jeremy started using it.

H_TeXMeX_H 07-02-2009 06:25 AM

It looks like cachefly (cf.html) is consistently fastest or second fastest for the greatest number of people. I vote for that one.

jeremy 07-14-2009 11:24 AM

A quick update: I've not forgotten about this thread, I've just been doing a little more research. CacheFly does seem to be the fastest for many, but it's the only one that seems to exhibit the random delays/pauses (and I've experienced those firsthand). It's possible I'll start moving some items to CF so we can get a live real world comparison. Thanks and keep the feedback coming.

--jeremy

jeremy 07-14-2009 01:20 PM

At 14:20LQST I updated many of the images to be served from CacheFly. With images from two CDN's being served on the same pages, it should be easier to tell if either is causing a lag. Feedback is appreciated.

--jeremy

syg00 07-14-2009 04:27 PM

As requested - rerun of the same script
Code:

cdnl.html
55.1927 +- 131.9 KB/s
cf.html
194.8 +- 26.5153 KB/s
front.html
56.5233 +- 1.81994 KB/s
local.html
65.55 +- 1.57912 KB/s

Immediate rerun similar (that stddev for cdn is a killer).
Last night (again) my browser stopped (for minutes) waiting on cdnlayer. Happens a couple of times a week.

jeremy 09-09-2009 11:09 AM

I'd like to test one additional option before making a final decision. How does the following look for members?

http://images.linuxquestions.org/cdntest/scdn.html

Thanks for the patience.

--jeremy

GrapefruiTgirl 09-09-2009 11:16 AM

Looks like a 400 Error :)

jeremy 09-09-2009 11:19 AM

The page definitely comes up OK for me. Are you getting the 400 error for the page (served by LQ) or the images (served by the CDN)? Is anyone else getting a 400 error? Have you tried a shift-refresh?

--jeremy

GrapefruiTgirl 09-09-2009 11:21 AM

Code:

                              400 Bad Request
________________________________________________________________________________
                                  nginx

That's something like I get. Tried shift-refresh, still the same.

(So to answer your Q, it's not the CDN, it's LQ generated AFAICT)

XavierP 09-09-2009 11:22 AM

I'm on IE7 on WinXP via Citrix and that came up in under a second for me.

unSpawn 09-09-2009 11:23 AM

I noticed the CDN change before I read this post, the images look OK to me.

jeremy 09-09-2009 11:27 AM

GrapefruiTgirl, looking at the logs - you're either browsing through a very broken proxy, have a broken browser plugin installed or something similar.

--jeremy

pwc101 09-09-2009 11:29 AM

I get 400 too, even after ctrl+refresh (which seems to be the shortcut for force-refresh on Windows, at least; shift-refresh had no discernible effect).

GrapefruiTgirl 09-09-2009 11:30 AM

Quote:

Originally Posted by jeremy (Post 3676092)
GrapefruiTgirl, looking at the logs - you're either browsing through a very broken proxy, have a broken browser plugin installed or something similar.

--jeremy

LOL.. Leave it to me to find something broken that isn't broken ;)

I'm not using any proxy that I know of. It could be my ISP??

As for plugins, as far as I can tell, all those I have installed, are as they should be. Any in particular I should be considering closely?

jeremy 09-09-2009 11:32 AM

I've installed a server workaround that may fix the issue. Can you try again?

--jeremy

GrapefruiTgirl 09-09-2009 11:33 AM

After the workaround, I get the page, and it seems to look fine.

running texmex's script now...

pwc101 09-09-2009 11:39 AM

Using the script from H_TeXMeX_H's post and adding the new link, I get the following results:
Code:

pwc@mike ~ $ bash ./lq_test.sh
cdnl.html
1.613 +- 0.144845 KB/s
cf.html
1.9625 +- 0.319405 KB/s
front.html
1.9305 +- 0.139754 KB/s
local.html
97.6375 +- 3.48148 KB/s
scdn.html
113 +- 0.324443 KB/s


GrapefruiTgirl 09-09-2009 12:05 PM

Code:

bash-3.1$ sh lqtest
cdnl.html
103.47 +- 16.6135 KB/s
cf.html
119 +- 15.8885 KB/s
front.html
133.2 +- 17.2098 KB/s
local.html
104.13 +- 11.0816 KB/s
scdn.html
125 +- 4.34613 KB/s
bash-3.1$


Here's another run, with no other network activity (not really the difference I had expected):

Code:

bash-3.1$ sh lqtest
cdnl.html
101.27 +- 9.0452 KB/s
cf.html
131.7 +- 17.7392 KB/s
front.html
146.5 +- 12.3761 KB/s
local.html
113.4 +- 5.62139 KB/s
scdn.html
133.4 +- 8.00278 KB/s
bash-3.1$ sh lqtest


brianL 09-09-2009 04:11 PM

And here's one from me:
Code:

brian@Slackdesk:~/Scripts$ ./lq_test.sh
cdnl.html
257.9 +- 82.8029 KB/s
cf.html
256.32 +- 92.932 KB/s
front.html
226.4 +- 26.6592 KB/s
local.html
90.85 +- 0.424918 KB/s
scdn.html
135.5 +- 0.527046 KB/s


colucix 09-09-2009 04:28 PM

Code:

cdnl.html
112.16 +- 27.3895 KB/s
cf.html
117.47 +- 21.8012 KB/s
front.html
124.398 +- 64.4745 KB/s
local.html
23.653 +- 14.1986 KB/s
scdn.html
88.86 +- 36.6085 KB/s



All times are GMT -5. The time now is 11:49 PM.