facerecognition
facerecognition copied to clipboard
Minimum memory requirements for system and/or PHP
I am a bit confused about the minimum system memory requirements and I wanted to make sure I am understanding things correctly.
The Wiki's Requirements page references 1GB minimum system memory and the PHP memory_limit references increasing the PHP memory to 1GB (for CNN models) and shows a value change to 2GB.
I am assuming that the correct assessment is that PHP needs (at least) 1GB of system memory to run the actual processing via the php7.4-pdlib
module and the OS needs (more than) 1GB to be able to allocate that memory to the PHP process.
If that is accurate, then I think it would be helpful to clarify that in the docs and adjust some of the requirements checks.
For example, Requirements.php#L11 checks for System memory, not PHP memory: https://github.com/matiasdelellis/facerecognition/blob/a2a2a07cc84351a5fcd307aa25396e93937133b9/lib/Helper/Requirements.php#L11
While it's pretty unlikely that the OS memory will decrease randomly, a PHP config might get overwritten or adjusted without consideration for facerecognition's needs. If PHP's memory_limit
gets lowered after facerecognition is installed and set up, no errors are thrown during initialization.
If you want, I am happy to look into putting together a PR for some docs updates and (separately) code changes.
Sorry the delay..
You are very right.. I have to review the documentation but also the values.
1 gigabyte is the absolute minimum, but as with the HOG model (and relatively few images), it practically does not need more than 256 megabytes, everything is very confusing..
The memory, which is discussed is that of the command line, which may be different from that of the server (that some distributions separate and others do not), which makes everything more confusing.