Mailing List Archive

[clamav-users] Freshclam slows down boot on MX Linux (Debian)
I've been finding for some time now that I have a 10-15 second delay
before my machine settles down after a boot. It doesn't always happen,
but usually does. Perhaps it's a first boot of the day issue, I'm not
sure. But on opening Task manager I see that it is Freshclam
consistently causing the extended CPU activity.

I tried using the ClamTK interface / Update assistant to select manual
updates, but that makes no difference in Freshclam's operation.

What I'm looking for is a way to delay Freshclam's search for updates
upon booting, something like 2 minutes; or in general, to have more
control over its scheduling. I don't see a relevant parameter in
/etc/clamav/freshclam.conf, or anything in the crontab folders. My MX
Linux system uses init.d rather than system.d.

Thanks for any help!

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Freshclam slows down boot on MX Linux (Debian) [ In reply to ]
This may be related, another user had noted that freshclam was starting before it had network access, and had us add a network-online dependency to the service file. This change will be present in the 0.102 release, but you can always add it manually to your clamav-freshclam.service file:
https://bugzilla.clamav.net/show_bug.cgi?id=12104

-Micah

?On 8/12/19, 9:17 AM, "clamav-users on behalf of Paul B. via clamav-users" <clamav-users-bounces@lists.clamav.net on behalf of clamav-users@lists.clamav.net> wrote:

I've been finding for some time now that I have a 10-15 second delay
before my machine settles down after a boot. It doesn't always happen,
but usually does. Perhaps it's a first boot of the day issue, I'm not
sure. But on opening Task manager I see that it is Freshclam
consistently causing the extended CPU activity.

I tried using the ClamTK interface / Update assistant to select manual
updates, but that makes no difference in Freshclam's operation.

What I'm looking for is a way to delay Freshclam's search for updates
upon booting, something like 2 minutes; or in general, to have more
control over its scheduling. I don't see a relevant parameter in
/etc/clamav/freshclam.conf, or anything in the crontab folders. My MX
Linux system uses init.d rather than system.d.

Thanks for any help!

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml



_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Freshclam slows down boot on MX Linux (Debian) [ In reply to ]
* Paul B. via clamav-users:

> I've been finding for some time now that I have a 10-15 second delay
> before my machine settles down after a boot.

Welcome to the club. Launching ClamAV has become so slow that I need to
take steps to ensure that more important services like sshd are started
before ClamAV, so as not to block the servers. We're talking 64 GB RAM
and quad-core i7-7700 CPU here, by the way.

-Ralph

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Freshclam slows down boot on MX Linux (Debian) [ In reply to ]
> What I'm looking for is a way to delay Freshclam's search for updates
> upon booting, something like 2 minutes; or in general, to have more
> control over its scheduling. I don't see a relevant parameter in
> /etc/clamav/freshclam.conf, or anything in the crontab folders. My MX
> Linux system uses init.d rather than system.d.

You could add a simple bash sleep statement to the appropriate
init.d/cron file. IIRC some systems will run cron jobs that were
missed while the system was turned off... I have no experience with MX
Linux so I don't know where / what is triggering freshclam on startup.

# Sleep random amount of time before proceeding
sleep $(expr $RANDOM % 900)

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Freshclam slows down boot on MX Linux (Debian) [ In reply to ]
* J. R. via clamav-users:

> You could add a simple bash sleep statement to the appropriate
> init.d/cron file.

On systems using dependency based init systems like "init" or "OpenRC",
services are usually started sequentially. I expect adding a sleep
statement would actually slow things down even further in these cases.

> IIRC some systems will run cron jobs that were missed while the system
> was turned off...

There are indeed cron implementations that work in this fashion, like
Anacron.

-Ralph

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Freshclam slows down boot on MX Linux (Debian) [ In reply to ]
Thanks to everyone who responded. For some reason I cannot Reply to
mails from this list. I have to Compose from scratch each time, which
probably breaks threading here. Here is my original response,
resending now:

Thanks very much, Micah! I have ethernet here and it does connect
quickly, but this still might be happening. I'm made the emendation
and will let you know if it solves the problem or not. It will take a
few days to be sure. I still think that a delay mechanism is very
desirable, perhaps even as the default.

BW,
Paul

On Mon, Aug 12, 2019 at 9:24 AM Micah Snyder (micasnyd)
<micasnyd@cisco.com> wrote:
>
> This may be related, another user had noted that freshclam was starting before it had network access, and had us add a network-online dependency to the service file. This change will be present in the 0.102 release, but you can always add it manually to your clamav-freshclam.service file:
> https://bugzilla.clamav.net/show_bug.cgi?id=12104
>
> -Micah

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Freshclam slows down boot on MX Linux (Debian) [ In reply to ]
First boot-up today, and the problem persists without any change, so
apparently network unavailability is not a factor in my case (the
connection is always made very early after the desktop appears).
Somehow a delay on boot would have to be programmed into the Freshclam
scheduler in order to solve this problem.

Paul


> Thanks to everyone who responded. For some reason I cannot Reply to
mails from this list. I have to Compose from scratch each time, which
probably breaks threading here. Here is my original response,
resending now:

> Thanks very much, Micah! I have ethernet here and it does connect
quickly, but this still might be happening. I'm made the emendation
and will let you know if it solves the problem or not. It will take a
few days to be sure. I still think that a delay mechanism is very
desirable, perhaps even as the default.

BW,
Paul

On Mon, Aug 12, 2019 at 9:24 AM Micah Snyder (micasnyd)
<micasnyd at cisco.com> wrote:
>>
>> This may be related, another user had noted that freshclam was starting before it had network access, and had us add a network-online dependency to the service file. This change will be present in the 0.102 release, but you can always add it manually to your clamav-freshclam.service file:
>> https://bugzilla.clamav.net/show_bug.cgi?id=12104
>>
>> -Micah

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml