LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-25-2012, 12:10 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 30
How to config the memory


I use Redhat 4,5 system , in the system , there are many schedule job is running , sometimes this schedule job use up all resource , so that the server hang , can advise how can I prevent the server out of memory , how to config it ? what setting that I need to modify ? can the server reserve a minmun resource for system use to prevent the server hang ?

thanks.
 
Old 09-25-2012, 07:57 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,479

Rep: Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020
There are a couple of approaches for doing this.

One is to create a shell program that launches the jobs in sequence rather than allowing them to run in parallel; e.g.,
Code:
#!/bin/sh
job1
job2
 .
 .
jobn
Also, you can nice them:
Code:
#!/bin/sh
nice job1
nice job2
...
You can launch the shell program or the individual jobs from cron at times that won't eat all your resources.

If you refer to the crontab manual page there is a way to
Quote:
Jobs can be made to "depend" on, or wait until AFTER other jobs have successfully
completed. Consider the following crontab:

* * * * * ID=job4 FREQ=1d first_command
* * * * * ID=job5 FREQ=1h AFTER=job4/30m second_command

Here, whenever job5 is up to be run, if job4 is scheduled to run within the next 30
minutes (30m), job5 will first wait for it to successfully complete.

(What if job4 doesn't successfully complete? If job4 returns with exit code EAGAIN,
job5 will continue to wait until job4 is retried--even if that won't be within the
hour. If job4 returns with any other non-zero exit code, job5 will be removed from
the queue without running.)
Right around that section of the manual page are other options that may be useful for you.

Hope this helps some.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory leaks.. *** glibc detected *** ./SuffixTree: malloc(): memory corruption: 0x00 evansash Programming 12 03-21-2011 02:17 PM
Difference between resident memory,shared memory and virtual memory in system monitor mathimca05 Linux - Newbie 1 11-11-2007 05:05 AM
RH4AS large memory kernel config instructions underonesun Red Hat 3 08-13-2007 06:02 PM
How to change shared memory and semaphore config on RHL9? ryanw Linux - Software 1 01-18-2005 11:14 AM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 05:48 PM


All times are GMT -5. The time now is 04:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration