bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.96k stars 9.19k forks source link

[bitnami/wordpress] Being able to persist just uploads instead of the whole /wp-content #25210

Closed ivmos closed 5 months ago

ivmos commented 6 months ago

Name and Version

bitnami/wordpress 22.1.7

What is the problem this feature will solve?

Better performance with N pods which only need to share /uploads.

What is the feature you are proposing to solve the problem?

To effectively scale beyond a single pod, enabling persistence and configuring a ReadWriteMany volume is needed, e.g azurefile-csi

However, storing plugins/themes within such a volume can significantly degrade performance. It would be nice to restrict just sharing /uploads instead of the whole /wp-content, so that no PHP file is loaded from network.

Plugins/Themes would not be installed through the admin interface but it would work for us anyway the same way we are updating the Wordpress core version with helm anyway.

Although the end user frontend can be cached successfully (e.g Memcached), the wp-admin interface remains sluggish. Similarly, caching /graphql presents challenges due to its dynamic nature, unlike static pages.

I've attached cachegrid graph showing the impact of using the shared volume for plugins, despite op_cache being enabled.

Captura de pantalla 2024-04-15 a las 10 10 08

related:

https://github.com/bitnami/charts/issues/17363

https://github.com/Azure/AKS/issues/223 https://serverfault.com/questions/837430/poor-performance-when-mounting-azure-file-share-on-linux-vm

https://techcommunity.microsoft.com/t5/apps-on-azure-blog/how-to-improve-performance-of-wp-admin-wordpress-on-azure-app/ba-p/3731647

What alternatives have you considered?

Perhaps disabling persistence and configuring an extra ReadWriteMany volumen which would only shadow the uploads folder would work, I haven't tried it yet.

javsalgar commented 6 months ago

Hi!

You can use the following extraEnvVar

extraEnvVars:
  - name: WORDPRESS_DATA_TO_PERSIST
    value: "wp-config.php wp-content/uploads"
ivmos commented 6 months ago

Hi!

You can use the following extraEnvVar

extraEnvVars:
  - name: WORDPRESS_DATA_TO_PERSIST
    value: "wp-config.php wp-content/uploads"

I tried this, now I Install the plugins through customPostInitScripts. Huge performance difference. Thanks a lot!

github-actions[bot] commented 5 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 5 months ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.