Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to limit users cpu resources?

Status
Not open for further replies.
Apr 26, 2002
1
CA
In AIX, is there a way to limit a user account from creating a program with while(1) fork; from taking all of the cpu resources with out limiting other user accounts?

Basically we have about 100-200 students that need to create a program that forks...but when they do create this program they hang my server...and a reboot is needed. Under /etc/security i could limit everyone but I don't want to do that because of other users/programs that require a lot of processes. eg: Oracle. If i could limit just a single user without affect other users that would be nice...any one have any ideas?

Thanks
 
You can set memory limits and such for each user (I figure that is what is hanging your box), however for 200 people? Not sure if you can limit memory usage by group, however you can write a script to change each user, the list being read from a file.

chuser Attribute=Value

cpu_hard=#
where # is the largest number of seconds of CPU time allowed.

rss_hard=#
where # is the largest number of 512-byte blocks a user can allocate from memory... however AIX does not seem to enforce this limit.

stack_hard=#
where # is the largest number of 512-byte blocks allocatable for a user's process stack segment.

If you are using AIX 4.1.x or lower, omit the underscore and the word after it.

Or: smit chuser
 
AIX starting from 4.3.3 has a Workload Management:
"smitty wlm", interface is self-explaining, but guarantee some 10-20% of cpu/mem to root/system default class first,
Then take some %% for your critical apps, some % for your coworkers, and here you go
 
Hello,
You mention the magic work ORACLE. Have done the tuning for ORACLE on the system. There is a no good way to limit cpu resources. If you do smitty -> system environments and see what is the limt on maximum number of process allowed per user.
When the system locks up and after reboot what kinds of error show up in errorlog.
Does it also eat up memory or paging space. Have you done vmtune setting for ORACLE.
 
Workload Management is a good way to guarantee bare minimum of resources that are sufficient for particular application like Oracle, Informix, Apache and many other words of magic
 
Hello,
Workload manager put over head on the system. Need better explanation of hang.
if the errpt shows low on paging space that could also explain why system has to be rebooted. System takes up show much memory not much left.
If apar iy22308 is not installed then it should be installed. It fixes memory leak in fclose
file close function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top