You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-07-03 14:55:55

auguzsto
Member
Registered: 2023-07-03
Posts: 7

How can I improve the performance of queuednotification?

How can I improve the performance of queuednotification. I have noticed slowness in processing the queue. Example: To process 14 emails, it took 45 seconds. I would like to improve this time.

Image for example:
i.imgur.com/RSQW3mM.png

Offline

#2 2023-07-06 03:13:47

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: How can I improve the performance of queuednotification?

Which version of GLPI?
Also, are you using a local email server or a cloud one?


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2023-07-06 07:55:04

sofi102
Member
Registered: 2023-02-09
Posts: 17

Re: How can I improve the performance of queuednotification?

cconard96 wrote:

Which version of GLPI?
Also, are you using a local email server or a cloud one?

Same on 10.0.8 the notifications are not working well.
Cloud email server.

Offline

#4 2023-07-18 21:39:35

auguzsto
Member
Registered: 2023-07-03
Posts: 7

Re: How can I improve the performance of queuednotification?

cconard96 wrote:

Which version of GLPI?
Also, are you using a local email server or a cloud one?

Sorry for replying late! I'm using version 10.0.9 and my email server is cloud. (SMTP)

Offline

#5 2023-07-19 00:54:51

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: How can I improve the performance of queuednotification?

I know that in GLPI 10.0.X, there is a SMTP login done for every mail that is being sent. For the next version of GLPI, it was changed to log in once but that was more to prevent being rate limited on authentications.
Do you have any errors in the related mail logs in the "files/_log" folder?


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#6 2023-07-19 14:18:14

auguzsto
Member
Registered: 2023-07-03
Posts: 7

Re: How can I improve the performance of queuednotification?

cconard96 wrote:

I know that in GLPI 10.0.X, there is a SMTP login done for every mail that is being sent. For the next version of GLPI, it was changed to log in once but that was more to prevent being rate limited on authentications.
Do you have any errors in the related mail logs in the "files/_log" folder?

Good morning! There is no log registering any failure on the notification queue, including, I wanted to make it clear that the notifications work well. The only "problem" is this lack of performance. I have a machine with 4 CPU cores and I feel that the queue does not use these 4 cores to process. I will leave below the performance of the queue when sending 49 emails
-
2023-07-18 16:22 170,701 seconds 49 Action completed, fully processed

Offline

#7 2023-07-19 14:41:02

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: How can I improve the performance of queuednotification?

*Nothing* in GLPI will use those cores like you expect. PHP has no native multithreading capability so a single page request or call to the cron script will only operate with a single thread.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#8 2023-07-19 15:06:11

auguzsto
Member
Registered: 2023-07-03
Posts: 7

Re: How can I improve the performance of queuednotification?

cconard96 wrote:

*Nothing* in GLPI will use those cores like you expect. PHP has no native multithreading capability so a single page request or call to the cron script will only operate with a single thread.

I understand! But is there anything I can do? Any tips?

Offline

#9 2023-07-19 17:45:49

auguzsto
Member
Registered: 2023-07-03
Posts: 7

Re: How can I improve the performance of queuednotification?

I'm going to try to implement parallel to see if it improves performance.

packagist.org/packages/amphp/parallel -> Link of package composer.

Offline

#10 2023-08-09 23:09:24

auguzsto
Member
Registered: 2023-07-03
Posts: 7

Re: How can I improve the performance of queuednotification?

github.com/auguzsto/glpi_queue_smtp

To solve the "problem" of low performance, I developed a microservice that sends e-mails externally.

I got a significant result, in addition to the application being very light, I reduced the execution time by sending 12 emails from 42 seconds to 6 seconds.

Offline

Board footer

Powered by FluxBB