[Koha-bugs] [Bug 28833] Speed up holds queue builder via parallel processing
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Aug 11 02:34:05 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28833
David Cook <dcook at prosentient.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dcook at prosentient.com.au
--- Comment #9 from David Cook <dcook at prosentient.com.au> ---
This is an interesting one!
On one hand, I like the use of a system preference to allow the value to be set
on a per-instance basis.
On the other hand, letting a library define an unrestricted number of forks for
a script seems potentially dangerous, especially if you have multiple Koha
instances on the same server.
I think this change needs more sanity checks.
Some options:
1) A CLI override that doesn't let the $loops be beyond X. This allows a
sysadmin to constrain the resource usage
2) Perhaps the size of $bibs_with_pending_requests should correlate with the
number of forks up to a maximum. (If you only have 10 bibs but your $loops is
10, it doesn't make sense to have 10 forks of 1 bib each. )
3) Maybe we should limit nproc in /etc/security/limits.d on a per-user basis
(but maybe this is best left to local sysadmins and this is a very blunt
instrument)
Actually, we should also do a int() check on $loops before feeding it to
Parallel::ForkManager, since it is user-provided input. (I suppose a non-number
would just cause a fatal error on a $loops > 1 check, but better to not fork
than to fail.)
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list