[GH-ISSUE #618] Pages with content of mounted s3 loads very slowly #351

Closed
opened 2026-03-04 01:44:38 +03:00 by kerem · 8 comments
Owner

Originally created by @triveniethnics on GitHub (Jun 16, 2017).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/618

We have a magento (community 1.9.2.4) website with server stack nginx, php5-fpm, varnish for caching, and Amazon s3 mounted using s3fs-fuse.
Problem is: sometimes pages which are not cached in varnish and having content loaded from s3 mounted drive is loading very slow. It takes 3 to 4 minutes. After restarting php5-fpm it works fine for some time.

  • Version of s3fs being used (s3fs --version)
    1.79

  • Version of fuse being used (pkg-config --modversion fuse)
    2.9.2

  • System information (uname -a)
    Linux triveniethnics.com 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

  • Distro (cat /etc/issue)
    Ubuntu 14.04.2 LTS

  • s3fs command line used (if applicable)
    mkdir media
    chmod -R 777 media
    chown -R root:root media
    s3fs trivenimedia media/ -o noatime -o allow_other -o uid=1000 -o gid=1000 -o use_cache=/tmp -o default_acl=public-read-write

  • s3fs syslog messages (grep s3fs /var/log/syslog, or s3fs outputs)
    Jun 16 18:29:07 triveniethnics s3fs[27636]: s3fs: missing MOUNTPOINT argument.

Details:
This page is coming from varnish cache: https://www.triveniethnics.com/
To check it without varnish cache(apend "?sometext" at end of url ) : https://www.triveniethnics.com?test

Originally created by @triveniethnics on GitHub (Jun 16, 2017). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/618 We have a magento (community 1.9.2.4) website with server stack nginx, php5-fpm, varnish for caching, and Amazon s3 mounted using s3fs-fuse. Problem is: sometimes pages which are not cached in varnish and having content loaded from s3 mounted drive is loading very slow. It takes 3 to 4 minutes. After restarting php5-fpm it works fine for some time. - Version of s3fs being used (s3fs --version) 1.79 - Version of fuse being used (pkg-config --modversion fuse) 2.9.2 - System information (uname -a) Linux triveniethnics.com 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux - Distro (cat /etc/issue) Ubuntu 14.04.2 LTS - s3fs command line used (if applicable) mkdir media chmod -R 777 media chown -R root:root media s3fs trivenimedia media/ -o noatime -o allow_other -o uid=1000 -o gid=1000 -o use_cache=/tmp -o default_acl=public-read-write - s3fs syslog messages (grep s3fs /var/log/syslog, or s3fs outputs) Jun 16 18:29:07 triveniethnics s3fs[27636]: s3fs: missing MOUNTPOINT argument. Details: This page is coming from varnish cache: https://www.triveniethnics.com/ To check it without varnish cache(apend "?sometext" at end of url ) : https://www.triveniethnics.com?test
kerem 2026-03-04 01:44:38 +03:00
  • closed this issue
  • added the
    need info
    label
Author
Owner

@niklasenB commented on GitHub (Jun 16, 2017):

You may consider reviewing your architecture.
Which parts of Magento you are storing on S3 and where are you storing your session data?

Do you have Magento Cache additionally switched on?

<!-- gh-comment-id:309032299 --> @niklasenB commented on GitHub (Jun 16, 2017): You may consider reviewing your architecture. Which parts of Magento you are storing on S3 and where are you storing your session data? Do you have Magento Cache additionally switched on?
Author
Owner

@triveniethnics commented on GitHub (Jun 16, 2017):

@niklasenB Thank you for reply.
s3 has magento's media directory having products & categories images.
sessions are storing in database.
Magento cache is enabled.

<!-- gh-comment-id:309047496 --> @triveniethnics commented on GitHub (Jun 16, 2017): @niklasenB Thank you for reply. s3 has magento's media directory having products & categories images. sessions are storing in database. Magento cache is enabled.
Author
Owner

@brunoleite commented on GitHub (Aug 12, 2017):

it seems fast now, did you solve the problem? I am facing the same issue here.

<!-- gh-comment-id:321987315 --> @brunoleite commented on GitHub (Aug 12, 2017): it seems fast now, did you solve the problem? I am facing the same issue here.
Author
Owner

@franckgarnier21 commented on GitHub (Aug 24, 2017):

You can try to use EFS. S3 is very slow also for Magento 2.

<!-- gh-comment-id:324620658 --> @franckgarnier21 commented on GitHub (Aug 24, 2017): You can try to use EFS. S3 is very slow also for Magento 2.
Author
Owner

@sunnetmedia commented on GitHub (May 19, 2018):

any new solutions for this ?

<!-- gh-comment-id:390400302 --> @sunnetmedia commented on GitHub (May 19, 2018): any new solutions for this ?
Author
Owner

@greatwitenorth commented on GitHub (Jan 10, 2019):

For anyone coming across this, I think the issue here is that even if you serve the images from Cloudfront using a static url, Magento has to check each product image on a page load to see if it exists. This results in multiple file_exists() checks which I imagine is where the slowness is coming from. You'd probably need to rewrite some of the methods in app/code/core/Mage/Catalog/Model/Product/Image.php in order to speed things up.

<!-- gh-comment-id:453180202 --> @greatwitenorth commented on GitHub (Jan 10, 2019): For anyone coming across this, I think the issue here is that even if you serve the images from Cloudfront using a static url, Magento has to check each product image on a page load to see if it exists. This results in multiple `file_exists()` checks which I imagine is where the slowness is coming from. You'd probably need to rewrite some of the methods in `app/code/core/Mage/Catalog/Model/Product/Image.php` in order to speed things up.
Author
Owner

@gaul commented on GitHub (Feb 3, 2020):

Could someone test this on a more recent s3fs? It includes several performance optimizations which may address your symptoms.

<!-- gh-comment-id:581294951 --> @gaul commented on GitHub (Feb 3, 2020): Could someone test this on a more recent s3fs? It includes several performance optimizations which may address your symptoms.
Author
Owner

@gaul commented on GitHub (Jun 23, 2020):

Closing due to inactivity. Please reopen if symptoms persist.

<!-- gh-comment-id:647884766 --> @gaul commented on GitHub (Jun 23, 2020): Closing due to inactivity. Please reopen if symptoms persist.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#351
No description provided.