Timeout procedure for using to much memory or cpu


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Timeout procedure for using to much memory or cpu
# 8  
Old 10-21-2015
Quote:
Originally Posted by MadeInGermany
You can write a script that reads a config file with "procname:cputime" tupels, for example
Code:
x:30
y:1440

That means process "x" may run 30 CPU minutes and process "y" may run 1 CPU day.
The script can check every 10 minutes if any of the running processes exceed these limits, warn the user, and finally kill them (the processes Smilie).
This is an interesting idea, but couldn't that easily be circumvented by renaming the process?

How about this: you create a queuing system, which starts the processes. Set the ulimits for users to values so that they have to use the queueing system and cannot start their jobs directly. This queueing system can be configured by a definition file like MadeInGermany mentioned. You set some parameters like RAM usage, CPU usage, etc., upon which the queueing system decides if a job has to be canceled or not.

A similar idea was the start of the VQS (Vienna Queueing System (german)) back then in the late eighties. It was designed to run very big, massively parallel jobs using a large cluster of IBM RS/6000-systems running AIX. The idea was to make big jobs possible but abort them after relatively short time so that the system was free for other jobs. The short time the jobs ran was enough to test and refine them so that you needed the the long-running job classes only for the final run.

I hope this helps.

bakunin
# 9  
Old 10-21-2015
Other examples for queuing systems, in declining complexity/price:
LSF, Sun/Oracle GridEngine, the batch command.
But my point of view is that users are - friendly. They exhaust the system by mistake. Because they don't know better. Unless someone teaches them.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get the memory and cpu usage

what is the best way to get the memory and cpu usage of a process on any system? this is relatively simple. however, i'm looking for a unified method that would work on linux, sunos, hpux, aix. ps -ef | egrep myprocess | awk '{print $4}' ---> there could be several instances of 'myprocess'... (3 Replies)
Discussion started by: SkySmart
3 Replies

2. UNIX for Dummies Questions & Answers

Get CPU,Memory utilization by process id

Hi , We need to get the CPU% and Memory utilization of process by process id. Is there any way to do get them ? I tried few commands like top -p <PID> , but am getting error "Quitting top: pset <PID> doesn't exist" also i tried with ps -eo option but am getting error "ps: illegal option --... (1 Reply)
Discussion started by: suresh_g
1 Replies

3. Solaris

Memory or CPU size

Is there a command or file I can look at that tells me how much real memory a machine has? A little background. In my shop we run a bunch of java programs, sometimes some of these jobs have config definitions that call for 2G. I would like to know how many I can run before I exhaust rescources. Any... (12 Replies)
Discussion started by: Harleyrci
12 Replies

4. Solaris

Regarding cpu & memory utilize

Dear all, i am not getting the exact things what i am expecting from these commands . just clarify this things , 1. cpu utilization (min)% 2.peak load cpu utilization (max) % 3.cpu utilization(avg) 4. peak disk busy % 5. peak kb read 6.peak kb write 7.free memory for... (3 Replies)
Discussion started by: masthan25
3 Replies

5. Solaris

OS is not detected CPU and memory

Hi, Server AIBVRFCC failed POST while booting on 06/28/2009. Server is up, but OS cannot see two CPUs (CPU 0 and CPU 2) and half of the installed system memory (8 GB is physically installed but only 4 GB is seen by OS now). bld00016:root psrinfo 1 on-line since 06/28/09 05:51:36 3 on-line... (1 Reply)
Discussion started by: arumsun
1 Replies

6. UNIX for Dummies Questions & Answers

snmptrapd uses all the CPU and 4 Go memory

Hello all, Below what I saw on my solaris 10 box : $ prstat PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 683 root 4082M 91M run 10 0 41:45:39 96% snmptrapd/1 syslog gives a lot of : snmptrapd: illegal data attempted to be added to table nlmLogVariableTable... (0 Replies)
Discussion started by: Gino_75
0 Replies

7. UNIX for Dummies Questions & Answers

CPU/Memory utilization

hi guys I just want to know how to get the cpu/memory utilization of a running script? Well i know that I can use the sar command but it shows the whole system's statistics. Is it possible to get the stats of a single scirpt or a single running service? (6 Replies)
Discussion started by: khestoi
6 Replies

8. UNIX for Dummies Questions & Answers

cpu, memory and virtual memory usage

Hi All, Does anyone know what the best commands in the UNIX command line are for obtaining this info: current CPU usage memory usage virtual memory usage preferably with date and time parameters too? thanks ocelot (4 Replies)
Discussion started by: ocelot
4 Replies

9. UNIX for Dummies Questions & Answers

Script for CPU and Memory Utilisation

Hi, I want to check the CPU and Memory Utilisation in the whole machine (not for a single process). Can someone send me a ready made script which captures all information in a log every 5min?? Thanks, Ajith (0 Replies)
Discussion started by: Ajith Praveen
0 Replies

10. AIX

Utilization for memory and cpu

Hi all I need command to give me the utilization for memory and cpu,and how can I know if the utilization ok or no? for example in hp unix #top it is give me utilize for cpu and memory and also I can know if utilize ok or no. thanks (2 Replies)
Discussion started by: magasem
2 Replies
Login or Register to Ask a Question