Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-24-2012, 11:10 PM   #1
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 ?

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

Rep: Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060
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.,
Also, you can nice them:
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
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.


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 01:17 PM
Difference between resident memory,shared memory and virtual memory in system monitor mathimca05 Linux - Newbie 1 11-11-2007 04:05 AM
RH4AS large memory kernel config instructions underonesun Red Hat 3 08-13-2007 05:02 PM
How to change shared memory and semaphore config on RHL9? ryanw Linux - Software 1 01-18-2005 10:14 AM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 04:48 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:17 AM.

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