Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to limit the percentage of CPU a user who ssh to my comp can use like say only 25% cpu usage at max. How do i do this in ubuntu ?

share|improve this question

I think you can't do that. What you can do is modifying priority for user. You can do that by editing file /etc/security/limits.conf:

john hard priority 20

Sets priority for john's processes to 20 (effective after next login). 20 is lowest priority.

This way john can use 100% of CPU, but if someone else needs it, other user will immediately get it, and john's tasks will wait (or actually slow down, not stop completely).

share|improve this answer
Not exactly what i am looking for. But since the other thing can't be done, i guess i'll have to work with this. Thanks a lot :). – tapan Feb 18 '11 at 5:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .