LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 10-04-2007, 05:25 AM   #1
jeesun
Member
 
Registered: Aug 2007
Location: Australia
Distribution: RedHat Enterprise
Posts: 82

Rep: Reputation: 15
Memory Problem in RHEL AS 5


I'm facing a critical problem in RHEL AS 5.

When i start the server along it uses only 4% of RAM. After than i start oracle and uses 25%-35% of RAM. but after a while it's growing and uses 95%-97% of RAM.

How can i reduce the hish usage of RAM.

BTW, when i shutdwon the oracle database it still hold the 95% of RAM.

Can you please tell me the reason or any solution to overcome the memory management problem.
 
Old 10-04-2007, 05:30 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,143

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
Is it a problem ???.
Does it affect your service to clients ???.
 
Old 10-04-2007, 05:31 AM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Bying more RAM is one way, but you didn't specify how much RAM you actually have (so is there any sense in bying more of it, or is it more important to find out if this is a bug or something).

First find out what is actually using all the memory, and for what (buffers or something for example?). Then start thinking if it should use that much RAM or not.. Are you suffering slowdowns because of filling RAM, and how much swap space is used? I mean, is it going so high you're out of memory, or is it just using most of the RAM available?

Code:
free
top
 
Old 10-04-2007, 05:46 AM   #4
jeesun
Member
 
Registered: Aug 2007
Location: Australia
Distribution: RedHat Enterprise
Posts: 82

Original Poster
Rep: Reputation: 15
Here is the query results

1. Free -m command output
total used free shared buffers cached
Mem: 8115 8085 29 0 19 7691
-/+ buffers/cache: 374 7740
Swap: 16386 34 16352

2. top output
top - 16:33:29 up 3 days, 4:21, 3 users, load average: 0.00, 0.00, 0.00
Tasks: 111 total, 1 running, 110 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.8% us, 0.6% sy, 0.0% ni, 90.0% id, 7.6% wa, 0.0% hi, 0.0% si
Mem: 8310532k total, 8282788k used, 27744k free, 20368k buffers
Swap: 16779884k total, 35308k used, 16744576k free, 7875948k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13497 oracle 15 0 2355m 68m 62m S 2 0.8 0:02.65 oracle
1 root 16 0 2492 548 468 S 0 0.0 0:01.25 init
2 root RT 0 0 0 0 S 0 0.0 0:00.06 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:00.06 migration/1
(partial)

3. It affect my services to my client also
4. My physical memory is 8GB and Swap is 16GB
5. I'm suffering slow down because of filling of RAM
 
Old 10-04-2007, 07:49 AM   #5
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
From your numbers, I do not think that lack of free memory is your problem here.

The figure you should be looking at is the total of (free + buffers + cached), since otherwise "free" memory is used by Linux to hold onto data as long as possible in order to speed up disk reads and writes (among other things). This shows up under "buffers" or "cache", not "free", so having a low number in the "free" column should not indicate low performance in and of itself.

You have in this example 8115 Mb in total, of which 29Mb is free (meaning utterly unused, wasted memory), 19Mb buffered and 7691Mb cached. This means that you have effectively got 7739Mb free or used only as cache memory, so free memory space isn't your problem here.

One problem could be the amount of data you have in swap. This is data temporarily written out to disk in order to free up memory, and is often a cause of slowness.

You might try looking at the /proc/sys/vm/swappiness file; this controls how much data is swapped out to disk purely to free up memory for caching. This is usually a bad thing if you have very slow hard disks (or very fast RAM and processor compared to your hard disk speed). To turn it off completely, you can run:
Code:
cat 0 > /proc/sys/vm/swappiness
as root.

You could also try looking for warning or error messages in /var/log/messages to see if there is anything that could indicate a problem.

Hope that's of some help,

—Robert J Lee
 
Old 10-06-2007, 12:41 AM   #6
jeesun
Member
 
Registered: Aug 2007
Location: Australia
Distribution: RedHat Enterprise
Posts: 82

Original Poster
Rep: Reputation: 15
Thanks for your early reply. I've got one problem. But i have some more questions.

1. Can I modify the buffer cache ratio? if yes how?
2.How can I optimize Linux system to faster access of application?
3. Is there any relation of kernel (smp,hugemem etc.).
 
Old 10-07-2007, 07:02 AM   #7
rmitev
LQ Newbie
 
Registered: Sep 2007
Posts: 27

Rep: Reputation: 15
you have 7691MB cached in your memory ... thats perfect, your kernel uses free memory for buffers and cache ... this memory can be freed if system needs free memory ... look at free result ...

free + buffers/cache = 7740 MB !!!

you have 4.6% memory usage by programs (and kernel)
 
Old 10-07-2007, 04:02 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,143

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
That's the generally accepted mantra - not always the case.
Sounds like an application design problem - I'd be inclines to try the swappiness suggestion above (immediately after a reboot).
 
Old 10-25-2007, 03:47 AM   #9
jeesun
Member
 
Registered: Aug 2007
Location: Australia
Distribution: RedHat Enterprise
Posts: 82

Original Poster
Rep: Reputation: 15
Can i Control Memory buffer or cache in RHEL?
 
Old 10-26-2007, 09:48 AM   #10
rmitev
LQ Newbie
 
Registered: Sep 2007
Posts: 27

Rep: Reputation: 15
see this for exmple ... more in Google :-)

http://www.novell.com/brainshare/eur...ons/tut303.pdf
 
Old 10-26-2007, 09:52 AM   #11
rmitev
LQ Newbie
 
Registered: Sep 2007
Posts: 27

Rep: Reputation: 15
http://www.halobates.de/memory.pdf
 
  


Reply



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
Always 99-100% memory in RHEL AS 3.0 sathyguy Linux - Enterprise 6 10-07-2007 06:55 AM
7zip hanging on rhel as 2.1 memory issue??? Hotchips Linux - Software 3 05-28-2007 09:54 PM
Winbind memory leak on RHEL 3? hob Red Hat 0 04-29-2006 11:51 AM
CentOS 3.4 [ RHEL 3 ] Wont let go the memory maxboost Linux - Software 0 02-20-2005 10:36 AM
how to mount usb flash memory on RHEL 3.0 Owen_Townsend Red Hat 2 12-19-2004 01:32 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 01:40 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
Open Source Consulting | Domain Registration