LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-19-2020, 08:01 PM   #1
dcruz99801
LQ Newbie
 
Registered: Jun 2020
Distribution: Ubuntu, Raspbian
Posts: 3

Rep: Reputation: Disabled
ClamAV memory consumption


I prefer to have some sort of antivirus even with Linux, but when I installed ClamAV on a Raspberry Pi Zero it kept locking up. I discovered it can easily consume <all> available memory (only 512MB on the Zero) and this may be a problem if I make tiny VMs.

Does anyone know of a free/cheap antivirus for Linux that does not have so large a footprint?
 
Old 06-20-2020, 01:12 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,768

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Please post how and what you are doing/scanning with clamav?
Scanning emai? Periodic disk scans?
I don’t find it intrusive while scanning incoming email.

Welcome to LQ
 
Old 06-20-2020, 09:59 PM   #3
dcruz99801
LQ Newbie
 
Registered: Jun 2020
Distribution: Ubuntu, Raspbian
Posts: 3

Original Poster
Rep: Reputation: Disabled
New build, was just trying to set up the picam but it kept burning up CPU (100% a lot) and memory (801mb out of 840mb, actual physical is more like 280 out of 305). I finally caught -- it was freshclam trying to download first-round updates, but it never could finish.

I wouldn't mind having it if there is a way to get past the update issue, otherwise the original question stands: is there a suitable substitute?
 
Old 06-21-2020, 03:30 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by dcruz99801 View Post
I prefer to have some sort of antivirus even with Linux, but when I installed ClamAV on a Raspberry Pi Zero it kept locking up. I discovered it can easily consume <all> available memory (only 512MB on the Zero) and this may be a problem if I make tiny VMs.
Sorry to say but I think you already answered your question.
Virtualisation on a pi0 with 512MB RAM? Didn't know that alone was possible.
Add to that an antivirus - it's too much.
Is ClamAV running constantly, in Windows-like fashion? I don't think that's necessary or desired on GNU/Linux.
 
Old 06-21-2020, 04:03 PM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,768

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by dcruz99801 View Post
New build, was just trying to set up the picam but it kept burning up CPU (100% a lot) and memory (801mb out of 840mb, actual physical is more like 280 out of 305). I finally caught -- it was freshclam trying to download first-round updates, but it never could finish.

I wouldn't mind having it if there is a way to get past the update issue, otherwise the original question stands: is there a suitable substitute?
freshclam is not "clamav"
Try shutting down everything (stopping all daemons) except freshclam to see if that frees enough memory to allow it to finish, but that's probably not going to be practical. On my production server, freshclam runs 8 times per day. I have no idea how much RAM it uses for each run.

Again, why do you think you need anti-virus checking on your pi? Are you receiving email there?
 
Old 06-27-2020, 03:00 PM   #6
dcruz99801
LQ Newbie
 
Registered: Jun 2020
Distribution: Ubuntu, Raspbian
Posts: 3

Original Poster
Rep: Reputation: Disabled
SOLVED: Pi Zero ClamAV issue

After running TaskMgr while installing/running ClamAV and finding it was using up all available memory with freshclam (initial update), I was going to run without AV...but...I plan to eventually set my unit up as a surveillance/webcam so AV might be necessary, and who knows if it might have email.

The fix was to increase the dphys-swapfile size parameter from 100MB to 1024MB; this is twice the onboard physical, and the <normal/recommended> amount. So far it seems happy. I'm not sure why the original swapfile is only 100MB, unless it was established when Pi's were still using 4GB or 8GB SD cards.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Clamav upgrade telling me clamav is newest version, but running 'sudo freshclam' tells me it is outdated! hddfsck Linux - Newbie 16 09-13-2019 09:43 PM
Mimedefang clamav vs clamav-milter digitolx Linux - Server 0 10-20-2010 03:45 PM
file-scan-clamav-1.8 or clamav-0.93.1 invader44 Linux - Newbie 1 12-29-2009 08:49 AM
high memory consumption and slow speed ryancw Linux - Newbie 1 03-24-2004 09:10 PM
gnome: huge memory consumption s56vpe Linux - Newbie 5 01-18-2004 07:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration