crowell / modpagespeed_tmp

Automatically exported from code.google.com/p/modpagespeed
Apache License 2.0
0 stars 0 forks source link

Throughput of CE resources is lower than expected compared to resized resources #604

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create HTML page with two image tags. Src pointing to the same png, one 
actual sized for CE and one a few pixels smaller in width for resize.
2.Configure Modpagespeed with resize_images,extend_cache
3.Let mod_pagespeed optimize the page and create the resourcelinks
3.Check performance of both resource links with apache ab

What is the expected output? 
CE throughput should be comparible to cached resized resources when coming from 
the LRU RAM cache.

What do you see instead?
Throughput of ab is smaller with the CE version than the resized version by a 
factor 3-6 while there is no difference in resource size
We are seeing 60MB/s for CE vs 300MB/s or higher for resized resources for 
example, the factor depends on the platform and the size of the resources.

All platforms we tested have this behaviour, nginx,apache and IIS.

We suspect the kOnTheFlyResource flow in RewriteDriver::FetchoutputResource. We 
are not seeing HTTP callbacks to check the original resource, so this does not 
seem to be the bottleneck.

Not a functional defect, more a slight performance issue, this can partly be 
solved by using the cache of the webserver instead of CE resources.

Original issue reported on code.google.com by kspoels...@we-amp.com on 10 Jan 2013 at 8:19

GoogleCodeExporter commented 9 years ago

Original comment by jmara...@google.com on 14 Jan 2013 at 7:44

GoogleCodeExporter commented 9 years ago
By CE throughput, do you mean the resource got a .pagespeed.ce. URL? How big 
was the image? Could you also elaborate on how step (3) was performed?

Original comment by morlov...@google.com on 14 Jan 2013 at 10:23

GoogleCodeExporter commented 9 years ago
Yes, a .ce url 

Original HTML from IIS7 welcome screen:
<img src="welcome.png" alt="IIS7" width="511" height="411"/><br/>
<img src="welcome.png" alt="IIS7" width="577" height="411"/>

Will yield after refresh

<img 
src="http://ps64release.weamp/511x411xwelcome.png.pagespeed.ic.q-98nme2T2.png" 
alt="IIS7" width="511" height="411"/><br/>
<img src="http://ps64release.weamp/welcome.png.pagespeed.ce.WqzgBU_lVs.png" 
alt="IIS7" width="577" height="411"/>

Both images will be around 180 KB.
We´ve done some other tests with other resources on all platforms, which give 
the same result, ce resources are slower than resized resources under high 
loads.

Original comment by kspoels...@we-amp.com on 22 Jan 2013 at 7:22