limit resource usage

Is there any way to limit resource usage in Linux for certain user? For examle for mysql and apache I want to limit cpu usage 10 % and memory to 100MB. Is it possible?

Thanks

 

 

 

 

Top