If you’re using ClamAV on your server, you may have noticed that it’s using 100% of the CPU at times. This can be frustrating and can slow down your server, leading to poor performance. If you’re facing this issue, you’ll be glad to know that there is a simple fix that can help.

The problem is caused by ClamAV not being given enough priority when it comes to CPU usage. By default, ClamAV is given the same priority as other processes on your server, which means that it has to compete with other processes for CPU resources. This can lead to ClamAV using 100% of the CPU, as it’s constantly trying to keep up with demand.

To fix this issue, you need to give ClamAV a higher priority when it comes to CPU usage. This can be done by adding the following line to the file /etc/secutiry/limit.conf:

clamav - priority 15

This line tells the system to give ClamAV a priority of 15, which is higher than the default priority of 10. This will allow ClamAV to have more access to CPU resources, which should help to reduce its CPU usage.

After adding this line to the file, you’ll need to restart ClamAV for the changes to take effect. You can do this by running the following command:

service clamav-daemon restart

Once ClamAV has been restarted, you should notice that it’s no longer using 100% of the CPU. If you continue to have issues with ClamAV using too much CPU, you may need to adjust the priority value to a higher or lower number, depending on your needs.

In conclusion, if ClamAV is using 100% of your CPU, you can fix the issue by adding the line “clamav – priority 15” to the file /etc/secutiry/limit.conf and restarting ClamAV. This will give ClamAV a higher priority when it comes to CPU usage, which should help to reduce its CPU usage and improve the performance of your server.

Let's Get In Touch!


Ready to start your project? Get in touch to have a chat!