[SAC] [OSGeo] #3017: Optimize speed of nextcloud

#3017: Optimize speed of nextcloud
----------------------+--------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2023-I
Component: SysAdmin | Keywords:
----------------------+--------------------------------------
I did some revisiting of nextcloud slowness.

I made the following changes which seemed to improve things a lot.

Changed to use redis (for non-local e.g. locking work), this didn't seem
to improve that much.

{{{
apt install redis
apt install php-redis
#edit /var/www/nextcloud/config/config.php

right after: 'memcache.local' => '\\OC\\Memcache\\APCu',
   'memcache.distributed' => '\OC\Memcache\Redis',
   'memcache.locking' => '\OC\Memcache\Redis',
   'redis' => [
      'host' => 'localhost',
      'port' => 6379,
   ],
}}}

{{{
systemctl restart php8.1-fpm
}}}

But I also changed the php-fpm and I think I had these set too high, for
the 32gb ram I had allocated, so reduced these. I think this made the
most difference.

#the most improved performance, happened when tweaking

{{{
nano /etc/php/8.1/fpm/pool.d/www.conf

}}}

{{{
pm.max_children = 30
pm.start_servers = 7
pm.min_spare_servers = 7
pm.max_spare_servers = 22
}}}

{{{
systemctl restart php8.1-fpm
}}}
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/3017&gt;
OSGeo <Gter - OSGeo;
OSGeo committee and general foundation issue tracker.

#3017: Optimize speed of nextcloud
----------------------+---------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: closed
Priority: normal | Milestone: Sysadmin Contract 2023-I
Component: SysAdmin | Resolution: fixed
Keywords: |
----------------------+---------------------------------------
Changes (by robe):

* status: new => closed
* resolution: => fixed

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/3017#comment:1&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#3017: Optimize speed of nextcloud
----------------------+---------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: closed
Priority: normal | Milestone: Sysadmin Contract 2023-I
Component: SysAdmin | Resolution: fixed
Keywords: |
----------------------+---------------------------------------
Comment (by robe):

I also made adjustments to the postgresql config as suggested here -
https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/linux_database_configuration.html

  /etc/php/8.1/fpm/conf.d/20-pgsql.ini

was this

{{{
; configuration for php pgsql module
; priority=20
extension=pgsql.so

}}}

after changed to

{{{
; configuration for php pgsql module
; priority=20
extension=pdo_pgsql.so
extension=pgsql.so

[PostgresSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0

}}}

also noted these changes in https://git.osgeo.org/gitea/sac/osgeo7/wiki
/Nextcloud-Ubuntu-Setup
and in git local repo
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/3017#comment:2&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#3017: Optimize speed of nextcloud
--------------------------------+---------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: closed
Priority: normal | Milestone: Sysadmin Contract 2023-I
Component: SysAdmin/Nextcloud | Resolution: fixed
Keywords: |
--------------------------------+---------------------------------------
Changes (by robe):

* component: SysAdmin => SysAdmin/Nextcloud

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/3017#comment:3&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.