1. 16
  1. 4

    I’ve long had a feeling that one of the bigger issues with Nextcloud, both when it comes to reliability and when it comes to performance, is PHO. Surely the “every request is a separate process” model is just bonkers? Surely it has to initialise/heat up the VM and open new database connections and do other startup stuff for every request, which takes time? Surely some of the reliability issues where the database ends up in an inconsistent state is due to some missing or inadequate locking or synchronisation?

    Of all the self-hosted software I run, Nextcloud has by far the worst performance and the worst reliability, and it’s the only self-hosted service where every request is handled by its own process.

    I love Nextcloud, but I feel it’s seriously hampered by its choice of language. If anyone has some more insight into to which extent this is or isn’t a problem, I’d love to hear it.

    1. 3

      Remember, Nextcloud was forked from Owncloud… interestingly, owncloud is now moving on to Go: https://owncloud.com/infinite-scale/

      1. 2

        Owncloud is open core, and using the rewrite from PHP to Go to switch from AGPL to Apache2. Sadly owncloud seems to focus on tech and quality while nextcloud keeps on piling features without fixing the existing ones.

    2. 2

      The scaling, in particular, is a huge benefit of PHP over practically every other technology out there: to double the performance of a PHP server, you can simply have twice as many cores and things will work without any changes needed.

      Did they just say cores? I hope they mean cores of a new machine. Is Nextcloud only vertically scalable?

      1. 1

        I also reacted to that, it was a very weird thing to point out. Obviously you can vertically scale by making the machine more powerful.

        Keep reading though:

        to double the performance of a PHP server, you can simply have twice as many cores and things will work without any changes needed. Not only is the scaling you get pretty much 100%, unlike other languages, this scaling continues beyond a single server! You can put a second server next to it and let it handle requests.

        I think the cores thing is just to point out that it’s not single threaded?

        It also seems like a weird thing to brag about. Obviously you’re gonna be “only” limited by the database if you spin up a new process with a new database connection for every single request. Any other language would do the same. The hard part with other languages is to horizontally scale without the overhead of a separate process and database connection per request.

        1. 1

          I was so baffled by the wording, that my brain stopped comprehending the following sentences :D Thanks for pointing that out. Still why does it matter, which language cant do that? (Processing multiple queries in different independent processes).