configed slow refresh - with mysql backend

nmassoneau
Beiträge: 3
Registriert: 16 Apr 2021, 13:56

configed slow refresh - with mysql backend

Beitragvon nmassoneau » 16 Apr 2021, 14:35

Hello,

I use opsi with around 450 computers, with mysql (and wan) extensions.
Right now because of the lockdown there are only 50-150 clients connected at the same time (users don't always connect to the vpn)
The full refresh of configed take between 40 to 90 seconds and it seems quite slow

here are a few statistics from the info page of the server :

Code: Alles auswählen

15 most called RPCs
   method   count   average
1.   backend_info   18913   0.003s
2.   getDepotId   17782   0.016s
3.   backend_getInterface   15816   0.024s
4.   dispatcher_getConfig   14216   0.000s
5.   accessControl_authenticated   13777   0.000s
6.   backend_setOptions   8467   0.000s
7.   configState_getObjects   8465   0.046s
8.   log_write   8094   1.387s
9.   productOnClient_getObjects   4754   0.009s
10.   host_getIdents   85   0.035s
11.   productOnDepot_getObjects   18   0.013s
12.   product_getObjects   18   0.018s
13.   getProductOrdering   15   0.147s
14.   getRawData   12   0.122s
15.   productProperty_getObjects   10   0.165s
Total number of calls:   110551


the log_write is called often because i've set up an "update ip" task every 15 minutes, but the load average on the server is quite low (below 1 on a 4 vcpu VM)
Ram usage is reasonable also : below 2GB on a 4GB VM

I don't see any error entry on the configed logfile, I don't know what could slow down the refresh

Thanks for your inputs

Regards

Benutzeravatar
wolfbardo
uib-Team
Beiträge: 1221
Registriert: 01 Jul 2008, 12:10

Re: configed slow refresh - with mysql backend

Beitragvon wolfbardo » 16 Apr 2021, 18:25

Did you convert via

convert file mysql

and changed the backend / dispatch.conf according the getting started?

Please show


Code: Alles auswählen

 cat /etc/opsi/backendManager/dispatch.conf
 


regards,
Bardo Wolf


opsi remote-workshops

https://uib.de/de/support-schulung/schulung/

Basis

14.-17.06. 2021
06.-09.09 2021

Einführung in die Software-Paketierung
09./10.06 2021

opsi support by uib gmbh

http://www.uib.de

nmassoneau
Beiträge: 3
Registriert: 16 Apr 2021, 13:56

Re: configed slow refresh - with mysql backend

Beitragvon nmassoneau » 16 Apr 2021, 21:16

Hello and thanks for your reply.

Yes I migrated from file to mysql with this command. I checked the tables with mysql workbench and the data is here.
Here is my dispatch :

Code: Alles auswählen

# -*- coding: utf-8 -*-
# = = = = = = = = = = = = = = = = = = = = = = =
# =      backend dispatch configuration       =
# = = = = = = = = = = = = = = = = = = = = = = =
#
# This file configures which methods are dispatched to which backends.
# Entries has to follow the form:
# <regular expression to match method name(s)> : <comma separated list of backend name(s)>
#
# Backend names have to match a backend configuraton file basename <backend name>.conf beneath /etc/opsi/backends.
# For every method executed on backend dispatcher the first matching regular expression will be decisive.
#
# Typical configurations:
#    mysql, opsipxeconfd and dhcpd backend:
       backend_.*         : mysql, opsipxeconfd
       host_.*            : mysql, opsipxeconfd
       productOnClient_.* : mysql, opsipxeconfd
       configState_.*     : mysql, opsipxeconfd
       .*                 : mysql


Benutzeravatar
r.roeder
uib-Team
Beiträge: 505
Registriert: 02 Jul 2008, 10:08

Re: configed slow refresh - with mysql backend

Beitragvon r.roeder » 19 Apr 2021, 09:47

Hi,
the time consumption of a reload depends primarily on the amunt of data to be transferred from the data backend. For this, it does not matrer if the computers are connected. But you can try to reduce the data backend size via opsi-setup --cleanup-backend Be careful and make a backup of the backend before you apply this command.
If you set the log level of the confiiged to 4 (via command line option or in the help menu) the start time and end time of every data cal is logged, you may see which are the long lasting calls.
You may compare this time with the time needed for this call via the browser interface in https://YOURSERVER:4447/interface
And one hint may be helpful in general: The global reloed of all data is very seldomly necessary in the opsi configed, mainly if new package metadata are to be loaded. For nearly each other purpose there is a local reload option via the context menu or via a specific button which reloads only one table, but not all.
Does anyhting of these hints help?
Regards
Rupert
opsi support - uib gmbh
For productive opsi installations we recommend maintainance + support contracts which are the base of opsi development.


Wondering who's using opsi? Have a look at the opsi map: http://opsi.org/opsi-map/.

nmassoneau
Beiträge: 3
Registriert: 16 Apr 2021, 13:56

Re: configed slow refresh - with mysql backend

Beitragvon nmassoneau » 27 Apr 2021, 10:08

Thanks, yes this is very useful I will look into every advice

Regards,

Nicolas