LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-08-2008, 06:07 AM   #1
rehan999
Member
 
Registered: Aug 2007
Posts: 134

Rep: Reputation: 15
Unhappy swap memory


Good Morning All

I have a machine which is installed with RHEl 4.3 and is having 16 GB of physical RAM and 2 Gb swap space.
When i run any application the memory is been taken from the swap memory not the physical memory which is having so much free space.


Will u please advise me how to slove the problem .I need the applcations to be used physical memory not the swap memory.

If physical memory is full then it should go for swap memory...

Please help me out...
 
Old 04-08-2008, 07:15 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,474

Rep: Reputation: 3453Reputation: 3453Reputation: 3453Reputation: 3453Reputation: 3453Reputation: 3453Reputation: 3453Reputation: 3453Reputation: 3453Reputation: 3453Reputation: 3453
Show us the output for these commands
Code:
uname -a
free -m
grep -i highmem <your kernel config here>
grep -i 64bit <your kernel config here>
I don't know where RHEL stores the config - hopefully somewhere obvious - like /boot or /proc/confi.gz
 
Old 04-08-2008, 07:35 AM   #3
rehan999
Member
 
Registered: Aug 2007
Posts: 134

Original Poster
Rep: Reputation: 15
1) Linux hostname 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:56:28 EST 2006 x86_64 x86_64 x86_64 GNU/Linux

2)
hostname ~ ->% free -m
total used free shared buffers cached
Mem: 15962 15918 44 0 5 10431
-/+ buffers/cache: 5481 10481
Swap: 1992 1988 3

Thanks and Regards
Rehan
 
Old 04-08-2008, 09:35 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194
If I'm reading that right, it indicates you have about 10Gb of files cached in physical ram, which has resulted in kicking 2Gb of memory of idle processes into the swap space.

You can configure the "swapiness" of a Linux system to make it favor idle processes over active file cache. But first you should be sure that is really what you want to do.

Without such changes, Linux is pretty good at deciding how to use memory. For typical file access patterns, the disk I/O saved by that file caching is larger than the disk I/O expended on that swapping.

The overall statistics might have led you to misunderstand the memory use:

Quote:
Originally Posted by rehan999 View Post
When i run any application the memory is been taken from the swap memory not the physical memory
That isn't accurate. When you run any application the memory used is physical (since you have so much). The issue is that it must take that physical memory away from some previous use: either take it away from some idle process (using swap space to do so) or take it away from file caching (not using swap space to do so).

Last edited by johnsfine; 04-08-2008 at 09:41 AM.
 
Old 04-09-2008, 07:52 AM   #5
rehan999
Member
 
Registered: Aug 2007
Posts: 134

Original Poster
Rep: Reputation: 15
No the machnie was using the swap space instead of physical memory.

But i rebooted the machnie tehn run the command free -m
it gave the out put which i posted.
hostname ~ ->% free -m
total used free shared buffers cached
Mem: 15962 15918 44 0 5 10431
-/+ buffers/cache: 5481 10481
Swap: 1992 1988 3

but previously before rebooting it was using the swap space instead of physical memory.

If i run any process now it is taking physical memory .
But still it is not taking the full physical memory some of the memory is taken from the swap also.

I want my machnie to first complete the physical memory then go to swap memory..

Please help me.
 
Old 04-09-2008, 08:45 AM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194
Quote:
Originally Posted by rehan999 View Post
No the machnie was using the swap space instead of physical memory.
How do you know that?

Quote:
But i rebooted the machnie tehn run the command free -m
it gave the out put which i posted.
So that output from free was shortly after rebooting???

What applications start up automatically when you boot that system?

That output from free says 10431 Mb of ram is in use for caching. That's more than the total a typical Linux system would have read from disk shortly after booting.

If that really was shortly after booting, then you should figure out what is causing all that caching. That will tell you what is making it use swap space (for non caching memory use).
 
  


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
Why is 1 GB of my memory Swap? ThaHabbis Linux - Hardware 10 03-18-2008 08:28 PM
Swap Memory / Virtual Memory in Fedora Core 6 Jojo_CFT Linux - Newbie 2 10-15-2007 05:23 AM
Not enough swap memory darklink2058 Slackware 5 07-26-2007 05:31 PM
Swap being used before memory gone bmiley_ncaa Linux - Hardware 2 09-29-2004 04:53 PM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 08:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:12 PM.

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