Hello,
I am setting up mod_pagespeed as a forwarding proxy. The primary goal is to reduce the amount of data transferred (this works well), the side affect is that it is incredibly slow. My example page (
http://www.ozzy.com/us/albums -- this is just a random link from
randomwebsite.com/) takes around 9 seconds to load without pagespeed and around 70 seconds with mod_pagespeed configured as a forwarding proxy. When mod_pagespeed is configured, the first request takes around 66 seconds to load, the subsequent page loads very quickly.
I see the following:
- mod_pagespeed uses near 100% CPU for more than 1 minute.
- mod_pagespeed has rewritten 117 images, although there are only 23 jpegs on the main screen, and 22 other images.
- in the mod_pagespeed cache folder for
www.ozzy.com there are 153 jpg images (using the command '
find /tmp/http,3A/,2Fwww.ozzy.com/ | grep \.jpg, | wc')
Why is mod_pagespeed rewriting so many more images than is actually downloaded? How can I get the page to load faster?
My set-up:
- Amazon EC2 micro instance (1 CPU, about 600MB ram, 64bit)
- Ubuntu 13.04 (amd64)
- mod_pagespeed version 1.4.26.3-r3101
Mod_pagespeed set-up:
- uses tmpfs as cache (so I/O is not an issue)
- the /mod_pagespeed_statistics file is attached.
- Conf file is below:
ModPagespeed on
ModPagespeedInheritVHostConfig on
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
ModPagespeedFileCachePath "/tmp/"
ModPagespeedRewriteLevel CoreFilters
ModPagespeedEnableFilters rewrite_images
ModPagespeedImageRecompressionQuality 10 # 10% just for testing purposes
ModPagespeedRewriteDeadlinePerFlushMs -1 # Wait until the whole resource is optimised
ModPagespeedDomain *
ModPagespeedFileCacheSizeKb 102400
ModPagespeedFileCacheCleanIntervalMs 10000
ModPagespeedLRUCacheKbPerProcess 1024
ModPagespeedLRUCacheByteLimit 16384
ModPagespeedCssFlattenMaxBytes 2048
ModPagespeedCssInlineMaxBytes 2048
ModPagespeedCssImageInlineMaxBytes 2048
ModPagespeedImageInlineMaxBytes 2048
ModPagespeedJsInlineMaxBytes 2048
ModPagespeedCssOutlineMinBytes 3000
ModPagespeedJsOutlineMinBytes 3000
ModPagespeedFileCacheInodeLimit 0
ModPagespeedImageMaxRewritesAtOnce 4
ModPagespeedNumRewriteThreads 4
ModPagespeedNumExpensiveRewriteThreads 4
ModPagespeedAvoidRenamingIntrospectiveJavascript on