Thanks everyone for the replies! I will give a look at
everything, because I'm in dire need of solutions.
Just a cue on the tests I did yesterday:
#!/usr/bin/perl
use Modern::Perl;
use C4::Context;
use Koha::BackgroundJobs;
while (1){
sleep 10;
}
I use htop to see the memory usage. The RES is the value I care
about. And the total memory usage of the machine tells me it is
indeed additive (unlike mariadb or apache that show me the same
value for each thread)
Now, the code above uses 50K on some instances, and 150M
on others. I still haven't figured out the why for the
discrepency, and I've tried about 20 instances, our our debian
servers, our clients, and my coworkers ubuntu's. Something in the
config? The 50K happens more often in 23.05, but when I restart
them, they go to 150M and stay there. I'll be examining the
koha-conf.xml today...
As for plack, I have a very bare understanding on how it works.
I suppose it loads all the code, so I suppose the 200M is
justified? Of course, making it slower makes it useless, so I
won't go that route.
Thanks again, all! I'll be checking the BZ you suggested.
Tél. : (833) 465-4276, poste 230
philippe.blouin@inLibro.com
Hi! On Mon, Oct 23, 2023 at 03:57:16PM -0400, Philippe Blouin via Koha-devel wrote:background_jobs_worker.pl for instance uses 170M per instance, and plack uses 200M without anything being loaded.How are you calculating the memory usage? I remember from mod_perl times that if you preload as much code as possible before forking of plack/redis workers much of the memory will be shared between processes. So maybe the actual memory usage is much lower than what you expect it to be. And if it's not, then we should investigate how to pull as much `use` statements into pieces of code that are loaded before a `fork` happens. Greetings, domm