Koozali.org: home of the SME Server

calmd cpu hog

ElFroggio

calmd cpu hog
« on: April 06, 2007, 07:03:50 PM »
I have SME 7.1.3 [current] and when clamd does the full scan it runs and use 100% of the CPU for hours on end. I had to kill it after 7 hrs of CPU time :cry:

It's a small system. Total disk space used: 1.8Gb, only a few hundred emails stored on the server, with only half a dozen users.

192Mb RAM, 146Mb used according to htop
AMD Athlon 64 3000+
Drive: 32gb, 1.8Gb used, 28Gb available

I have searched and not found anything. Any suggestion?

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
calmd cpu hog
« Reply #1 on: April 06, 2007, 08:12:17 PM »
Well i had some problems (high cpu) when i had 256 ram so did you try to add more ram? I don't have any problems with 512mb.
"It should just work" if it doesn't report it. Thanks!

Offline pfloor

  • *****
  • 889
  • +1/-0
calmd cpu hog
« Reply #2 on: April 07, 2007, 07:16:53 AM »
192MB is definetly not enough memory for SME.

The bare minimum that I would install is 512MB.  I always recommend at least 1 gig.
In life, you must either "Push, Pull or Get out of the way!"

Offline girkers

  • *
  • 296
  • +0/-0
    • gk computer services
calmd cpu hog
« Reply #3 on: April 11, 2007, 06:28:57 AM »
I have 512MB in my system and clam does the same thing to me. I have sme7admin installed and it emails me when my CPU usage is over 50% and thus every morning I get heaps of emails telling me that the cpu is at 100%.

Offline pfloor

  • *****
  • 889
  • +1/-0
calmd cpu hog
« Reply #4 on: April 11, 2007, 06:47:42 AM »
Quote from: "girkers"
I have 512MB in my system and clam does the same thing to me. I have sme7admin installed and it emails me when my CPU usage is over 50% and thus every morning I get heaps of emails telling me that the cpu is at 100%.
Then you should be following this bug:

http://bugs.contribs.org/show_bug.cgi?id=2528

And this one:

http://bugs.contribs.org/show_bug.cgi?id=2743

Compare your problem and log files.  Try any fixes and/or post additional information to try to get the 2nd one fixed.
In life, you must either "Push, Pull or Get out of the way!"

Offline girkers

  • *
  • 296
  • +0/-0
    • gk computer services
calmd cpu hog
« Reply #5 on: April 11, 2007, 07:07:02 AM »
Looking at both of those bugs my system does not fall into either category. As checking through the qpsmtp my server is still accepting mail.

Offline pfloor

  • *****
  • 889
  • +1/-0
calmd cpu hog
« Reply #6 on: April 11, 2007, 07:31:41 AM »
Quote from: "girkers"
I have 512MB in my system and clam does the same thing to me. I have sme7admin installed and it emails me when my CPU usage is over 50% and thus every morning I get heaps of emails telling me that the cpu is at 100%.

Clam does not do the same thing to you, the original poster states that this "goes on for hours on end" and he finally killed it after 7 hours.

Yours seems to happen in the middle of the night and then is fine in the morning.

What exactly is "heaps of emails"?
When do these emails start and stop?
Do you have clamav set to scan the system every night?
Does this high CPU usage cause any other problems?

If your system is idle when clamav started scanning your system wouldn't you want it to use all available resources to get the job done as fast as possible as long as it didn't cause any problems?
In life, you must either "Push, Pull or Get out of the way!"

Offline imcintyre

  • *
  • 609
  • +0/-0
calmd cpu hog
« Reply #7 on: April 11, 2007, 01:06:49 PM »
Girkers:

I have P4 1.8 Ghz and 768 Gb of Ram and have the following results for clamav. I think that this is typical of what you can expect.

----------- SCAN SUMMARY -----------
Known viruses: 107783
Engine version: 0.90.1
Scanned directories: 15944
Scanned files: 34489
Infected files: 0
Data scanned: 7879.61 MB
Time: 3160.860 sec (52 m 40 s)

Originally I had 256 and I think the % drop was about 10% in time. I have read in the forum that the scan speed is dependent on processor speed rather than ram, which makes some sense. The ram usage does not peak very strongly during the scan, maybe 5% increase.

From SME7admin CPU % (1st graph) is around 95% the whole time.
Rather than endure the emails, I set CPU usage limit in SME7admin to 0.
Alternatively, I have also read that you can custom limit the cpu usage for processes but this is beyond my interest level. If you figure it out right a "how to for noobs". I tried the htop command that shows the "nice" level of the processes. If you search around in the forum, I'm sure someone will help

Sorry can't help further with 7 hours of scan time, ElFroggio