Performance issue due to s3fs + Guzzle + AdvAgg

Created on 22 June 2018, over 6 years ago
Updated 4 January 2025, 4 days ago

We've been seeing a performance problem on the front-end pages of our site. Before caching, the front page might take 15-20 seconds to load.

After running xhprof, I've noticed there seems to be some serious wait times due to stream_open, stream_eof, and stream_read. See the data below:

S3fsStreamWrapper::stream_open
Calls: 59
Calls%: 0.0%
Incl. Wall Time (microsec): 9,971,939
IWall%: 48.4%
Incl. CPU (microsecs): 408,000
ICpu%: 12.3%
Incl. MemUse (bytes): 2,053,120
IMemUse%: 0.4%

S3fsStreamWrapper::stream_eof
Calls: 1,777
Calls%: 0.5%
Incl. Wall Time (microsec): 5,860,511
IWall%: 28.7%
Incl. CPU (microsecs): 64,000
ICpu%: 2.2%
Incl. MemUse (bytes): 48,464
IMemUse%: 0.0%

S3fsStreamWrapper::stream_read
Calls: 1,779
Calls%: 0.5%
Incl. Wall Time (microsec): 2,434,294
IWall%: 11.7%
Incl. CPU (microsecs): 68,000
ICpu%: 2.3%
Incl. MemUse (bytes): 9,881,688
IMemUse%: 17.6%

Any thoughts on what could be causing this, or ways to mitigate the issue? Can some of this be done asynchronously?

This seems to be a huge amount of time to be waiting. The next largest "wait" after these three is unserialize, which uses 10x less time than stream_read.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ron_s

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States cmlara

    Drupal 7 end-of-life triage:
    Drupal 7 will reach end of life on January 5th.

    The 7.x branches of S3FS do not have any additional planned releases.

    Latest Drupal 10/11 releases no longer store CSS/JS in the public:// streamWrapper and instead use a new assets:// wrapper.

Production build 0.71.5 2024