Hey,
i have a class that serves image styles from a s3 container. If i visit a node with about 5-10 pictures then i have a page execution time of 5-10 seconds. If i let the same files been served by a local file system container my page time shrinks to normal (about 1,5 seconds). I have analyzed the function calls with xhprof and found that storage api calls are the slow ones.
My s3 container properties are:
Service: Amazon S3
Name: <bucketname>
Access control: No
External: No
Status: Active
Classes: Public local to S3
Files: 1566
Size: 1.68 GB
Bucket: <bucketname>
Bucket is CNAME alias: No
Location: US Standard
Reduced redundancy: No
Serving with CloudFront: No
CloudFront domain name: d1f1vxf574829l.cloudfront.net
Streaming with CloudFront: NoWhat does confuse me is the location. i can confirm that the location of the bucket is in eu - ireland not us.
Any idea why s3 containers are so slow?
Comments
Comment #1
perignon commentedAmazon S3 is slow... by design. You should not be using S3 to deliver images on your site. S3 is a storage service meant for robust data protection. If you want to serve images you should be using Cloudfront pulling from S3. So yes, I am not surprised it is slow.
Comment #2
fox_01 commentedOk i now create a new container to serve files with cloudfront. I confirmed it by checking the urls. But the problem still exists, i think i could have increased. (15 seconds page loading time). Each file needs about 360ms to load. Am i making something wrong?
Comment #3
perignon commentedCan you send me a URL to see your site?
Cloudfront is far from easy. Making it perform well is even harder.
Comment #4
fox_01 commentedI have found that a function getimagesize() calls the slow functions and the results of this can be cached by a module imageinfo_cache. This is recommended when the files are not served locally. I think the change to cloudfront and this caching bring my page loading time to quite normal (about 2 seconds) which is ok in my case.
I will close the issue until the error comes back ;)
Thanks for your help.
Comment #5
perignon commentedThanks