There's a number of things that are improved. I should say this testing was 
done with a custom Koha 19.11.

First is speed, so 20 seconds to (re)start 120 workers with 20 CPUs without 
validation instead of taking 2 min 45 seconds w/o 24700 patch and 1 min 30 
seconds w/ 24700 patch with 10 CPUs. (I was messing around with CPU count, so I 
don't have perfect 1-to-1 tests for everything.)

That's a start to finish of the first instance (re)started and the last Starman 
process having loaded app.pl and started listening for connections. The actual 
(re)start time for each individual process would be less. 

Second is server load. With or without 24700 patch, the server load is massive 
(re)starting 120 workers with 10 or 20 CPUs. The server spends a lot of CPU 
time allocating memory during the validation process, so the server gets CPU 
bound during the validation process, and your instances experience latency at 
best and downtime at worst. 

Without the validation, I couldn't detect any latency or downtime when doing a 
(re)start. My testing could've been flawed, but the startup time was fast 
enough that I didn't notice a blip. Well, the one exception is when doing a 
time-consuming task like a big search. If I was in the middle of a long search, 
obviously a restart cut that off as it severed the TCP connection. But that's 
unavoidable. 

Anyway, I hope that helps?

As I mentioned before, we probably won't be able to skip the validation for 
years, unless we roll our own Mojolicious::Plugin::OpenAPI...

David Cook
Software Engineer
Prosentient Systems
Suite 7.03
6a Glen St
Milsons Point NSW 2061
Australia

Office: 02 9212 0899
Online: 02 8005 0595

-----Original Message-----
From: Koha-devel <koha-devel-boun...@lists.koha-community.org> On Behalf Of 
Victor Grousset/tuxayo
Sent: Thursday, 29 April 2021 3:51 AM
To: 'Koha Devel' <koha-devel@lists.koha-community.org>
Subject: Re: [Koha-devel] Optimizing Starman startup

Hi :)

On 21-04-28 06:40, dc...@prosentient.com.au wrote:
> But now that I think about it again... Jan's change is actually all we need.

That's a good news :D

So what are the perf results of this?

IIUC for your use case (spawning 120 workers with a 10 core CPU)
* 2 minutes 45 seconds before bug 24700, i.e. < 20.05
* 1 minute 30 seconds Koha >= 20.05
* 20 sec when validation could be disabled with a future version of 
Mojolicious::Plugin::OpenAPI

--
Victor Grousset/tuxayo
_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/ git : https://git.koha-community.org/ 
bugs : https://bugs.koha-community.org/


_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/

Reply via email to