Giter VIP home page Giter VIP logo

Comments (4)

user8446 avatar user8446 commented on July 3, 2024 1

Ok I found some benchmarks for tracing JIT from PHP themselves: https://php.watch/articles/jit-in-depth
Approx. twice as fast on average.

Tracing JIT is the same method Android uses in ART, where it determines the "hot" code to "selectively compiles those structures for the best balance of compilation time and memory usage."

With just one line in php.ini it's active:
opcache.jit_buffer_size = 128M

Docker and AIO both have JIT on.

As for revalidate_freq, for every user where resources and power consumption are top of mind, there is another where only performance matters - hence my thought on having it user configurable with a reasonable default for those that don't dig into the config.

from nextcloud-snap.

pachulo avatar pachulo commented on July 3, 2024

Hi @user8446 ! First of all, thanks for your contribution!

Now, some comments:

According to the official Nextcloud server tuning docs, there is a JIT compiler that can be enabled that will benefit apps that are CPU intensive simply by adding it to php.ini:

From this comment from the PR that added that to the docs, nobody run benchmarks to see if JIT really improved the performance; literally:

I don't have the time to do benchmarks, but my best guess is it's not gonna be slower :)

But well, I'm not an expert and not even really sure how those benchmarks should be really done. Maybe @oparoz could help?

Regarding your second proposal:

Also, there is opcache.revalidate_freq=2 - checking for changes to config.php every 2 seconds by default. The docs mention this should be increased for performance benefits. Checking every 2 seconds is excessive and a waste of resources.

Sounds like a sensible thing to be exposed as a config value, but again, I would like to see some benchmarks to see if there is any real improvement.

Thoughts @kyrofa ?

from nextcloud-snap.

kyrofa avatar kyrofa commented on July 3, 2024

The docs mention this should be increased for performance benefits.

Ideally revalidate_freq would be zero, but it can't be, because it's the only way config.php changes are picked up (one of the many reasons why I'd wish they'd move to some other kind of config). So then, what should it be? The docs don't actually say, as far as I can tell. They give 60 seconds as an example, but that's a pretty long time to wait from when you make a config change to when it takes effect. Is 2 seconds too short? Maybe. I'm not sure there's a reason to add and maintain a knob for it, though: everyone will want maximum performance with minimum annoyance. Is there a more reasonable value that will work for everyone?

from nextcloud-snap.

pachulo avatar pachulo commented on July 3, 2024

60 is used on these two flavours of "packaged nextcloud":

  1. Docker
  2. all-in-one

But then, it's set to 1 on:

  1. VM (But that was configured almost 7 years ago)

from nextcloud-snap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.