documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Reconsider memory cache warning / recommendation

Open hannob opened this issue 6 years ago • 2 comments

I'm not sure if the bug tracker is the best place to discuss this, but I guess I'll try anyway:

I'm maintaining servers where several people run Nextcloud and lately I'm getting more and more questions about a notice from Nextcloud that they should install a memory cache and questions whether I could enable apcu.

However I find that poorly justified. I'm trying to reduce complexity and avoid accumulating technical debt, so I'm not particularly keen on installing an external module if I don't have a good reason to.

The warning recommends a memory cache "to enhance performance". However I didn't find any good numbers on this. The best I found is some comment on an old owncloud bug report [1] but that hardly seems reliable and even if I take those numbers the impact seems at best low.

So I'd recommend to:

  • Either provide some "official" benchmarks making a good case for memory caches and reference them in the documentation.
  • Or consider removing that warning for default installations.

[1] https://github.com/owncloudarchive/pi-image/issues/24

hannob avatar Aug 02 '19 10:08 hannob

@hannob Thanks for the pointer. You are absolutely right, that those recommendations should be based on benchmarks. Back when we added those warnings we had some benchmarks with customer instances. Unfortunately they are as of now quite dated and we also improved in general on many different places in the code. Nevertheless is the memory cache quite often used to cache answers from external systems like the appstore or an LDAP server that is used for authentication.

MorrisJobke avatar Aug 05 '19 12:08 MorrisJobke

On the forum, people sometimes complain about performance, especially when transferring many files and using the cloud by several users at the same time. Memory caching (redis, APCU), and database caching help a lot to get from a webinterface load time of up to 30-60s to just a few seconds.

It's difficult to give specific numbers for one thing, sometimes reverse proxies are involved, different cache sizes are changed as well, so to boil it down to just the influence of APCU cache, is not obvious. And of course you have to test with a certain amount of load, with a certain set of apps, ...

So for me, it has been proven in practise. Best is to publish numbers when such a feature is introduced. Doing all combination of tests could be done, but who should do it? And if nobody is ever going to fix this, should we close this?

tflidd avatar Apr 22 '22 16:04 tflidd