Koozali.org: home of the SME Server

Limit CPU usage for a process... (for clamav)

OursPolaire

Limit CPU usage for a process... (for clamav)
« on: January 23, 2007, 01:38:11 PM »
Hi, :D

I have heard that is possible to limit the cpu for a process.

My problem is when clamav (the antivirus) is running, it takes all the ressources of the server.

The command seems to be "ulimit".

Is there someone who knows the command line (and the complete procedure please) to accomplish that?

Offline progitto

  • *****
  • 217
  • +0/-0
    • http://umbertomassari.dyndns.org
Limit CPU usage for a process... (for clamav)
« Reply #1 on: January 23, 2007, 04:06:53 PM »
ulimit can handle maximum cpu time non percentage.
I don't know if this is possible to do

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Limit CPU usage for a process... (for clamav)
« Reply #2 on: January 23, 2007, 04:15:43 PM »
Quote from: "OursPolaire"
Hi, :D

I have heard that is possible to limit the cpu for a process.

My problem is when clamav (the antivirus) is running, it takes all the ressources of the server.

The command seems to be "ulimit".

Is there someone who knows the command line (and the complete procedure please) to accomplish that?
Perhaps re-nice would also be an option. This will set the priority for clamav to be lower than normal processes so they get more CPU when they need it and clamav is pushed into the background.

What processor are you using? If you have an old processor you might need to upgrade as virus scanning comes at a price: CPU-resources.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

OursPolaire

CPU info.
« Reply #3 on: January 23, 2007, 05:12:48 PM »
Hi Cactus: :D

I have a Pentium III Xeon, 500 MHz,  L2 Cache Size:  512 KB.