How to Limit Memory Usage
clamav-clamd?
For example up to 512 megabytes
clamav-clamd?
For example up to 512 megabytes
These settings will be saved after reboot.
ibClamAV Error: mpool_malloc(): Can't allocate memory (16781312 bytes).
LibClamAV Error: mpool_malloc(): Can't allocate memory (16781312 bytes).
LibClamAV Error: mpool_malloc(): Can't allocate memory (16781312 bytes).
LibClamAV Error: mpool_malloc(): Can't allocate memory (16781312 bytes).
LibClamAV Error: mpool_malloc(): Can't allocate memory (16781312 bytes).
LibClamAV Error: mpool_malloc(): Can't allocate memory (16781312 bytes).
LibClamAV Error: mpool_malloc(): Can't allocate memory (16781312 bytes).
LibClamAV Error: mpool_malloc(): Can't allocate memory (16781312 bytes).
LibClamAV Error: mpool_malloc(): Can't allocate memory (16781312 bytes).
LibClamAV Error: mpool_malloc(): Can't allocate memory (16781312 bytes).
LibClamAV Error: mpool_malloc(): Can't allocate memory (16781312 bytes).
LibClamAV Error: mpool_malloc(): Can't allocate memory (16781312 bytes)
How to Limit Memory Usage …
Not a FreeBSD user, but on Linux, it's because clamav is about scanning mail traffic (usually as part of a mail server, subordinate to amavisd, which orchestrates spam and virus detection). You can't "do it later" in most implementations.A sincere question: why?
Is there, for example, a problem with overall performance of the system with scanning at a particular time of day?
A sincere question: why?
Is there, for example, a problem with overall performance of the system with scanning at a particular time of day?
Why limit memory use? How about out-of-control growth of the amount of RAM the application requests, which leads to OOM killing of other processes and crashing the whole machine? This used to be an issue when machines had 16 MB of RAM back in 1990s. Nowadays, RAM is measured in gigabytes, so everybody thinks that RAM is unlimited. A good discussion on why limiting an application's RAM usage is a good idea: PR 263436Limiting the RAM from the OS will make the app fail when it reaches that amount of memory.
It will not make the application work within those constraint.
Maybe it's time to revisit the UNIX philosophy of keeping applications simple? Just look at what we can pull off with sed and awk...Well, that doesn't change the fact that limiting the application to a certain amount of RAM will kill that app when it grows, not make it use less memory.
What you want for a survivable limit is that paging sets in when a certain amount is reached. You can only have that by stuffing the application into a virtual machine with its own kernel, limited in RAM by the host, add some swapspace. That would actually limit the size of the application without killing it. Performance might be bad, though.