Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: OursPolaire on January 23, 2007, 01:38:11 PM

Title: Limit CPU usage for a process... (for clamav)
Post by: OursPolaire 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?
Title: Limit CPU usage for a process... (for clamav)
Post by: progitto 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
Title: Re: Limit CPU usage for a process... (for clamav)
Post by: cactus 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.
Title: CPU info.
Post by: OursPolaire on January 23, 2007, 05:12:48 PM
Hi Cactus: :D

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