https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27267 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |julian.maurice@biblibre.com --- Comment #13 from Julian Maurice <julian.maurice@biblibre.com> ---
14. The top tool should show about 6.1MB usage.
I get 6.9MB, and there is an additional 17.6MB used by the child process every 5 seconds. So that's 24.5MB taken only to check if there is records to index. Still better than 180MB, but worth noting IMO. Talking about that, I wonder if it's really better to use a child process in this case. Instead of just staying in memory, the code will be loaded/unloaded every 5 seconds. Maybe it will use less memory 99% of the time, but it will probably use more cpu time (and it will need all the memory once every 5 second anyway, so that memory is not really "free") I tried different things to measure memory consumption depending on what we use: - if I add 'require C4::Context' to _get_count (and nothing else), the child process memory consumption goes up to 65MB - if I add 'C4::Context->dbh()', memory consumption goes up to 98MB I don't know exactly where the problem is (though I suspect the DBIx::Class schema to take a significant part of memory), but it would be useful for such cases to have a method that returns a DBI object without loading half of Koha. Also I agree with Joonas, the "$dbh creation" code should not be duplicated. -- You are receiving this mail because: You are watching all bug changes.