LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-25-2007, 10:45 AM   #1
FredericV
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Rep: Reputation: 0
ram and swap usage?


Hello all,

I have a production server based on RedHat 4 with 2 xeon cpu and 16 GIGs ram.

According to RedHat's guide I have set up nine swap unit of 2 GIGs (18 GIGs total of swap).

On this server runs 3 instances of oracle 9i of 2 GIGs of SGA for instance. (6 GIGs of sga).

Kernel is hugememory smp 2.6.9 and I've set shmmax as 3 GIGs, and swappiness value as 30.

When I check ram utilizzation with free command I say that about 3/400 MB of swap is always used and there is about 12 GIGs of buffer free...

# free -m
total used free
Mem: 16202 16180 22
-/+ buffers/cache: 3480 12275
Swap: 18437 384 18053


What do you think about? is it okay, or what? Do I have to do more tuning?


Thank you
 
Old 03-25-2007, 12:24 PM   #2
jeenam
Member
 
Registered: Dec 2006
Distribution: Slackware 11
Posts: 144

Rep: Reputation: 15
FredericV, are you a long time Windows admin/user? Linux is actually 'intelligent' when it comes to memory management and will make every attempt to NOT USE swap for memory transactions.
 
Old 03-25-2007, 12:36 PM   #3
FredericV
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Original Poster
Rep: Reputation: 0
I know... so, why my system is swapping? I thought that it doesn't need to use swap...
 
Old 03-25-2007, 01:23 PM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
Your system isn't doing much swapping at all
Quote:
Swap: 18437 (<-total) 384 (<-used) 18053(<-free)
In other words, you are only actually using about 2% of your swap space
 
Old 03-25-2007, 03:10 PM   #5
FredericV
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Original Poster
Rep: Reputation: 0
yes, it's a very small swap usage, but, why using swap when it has 12 GIGs of ram free?
Do you think that I have to reduce swap size or swappiness? or is it almost ok?
 
Old 03-25-2007, 03:17 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
I sometimes have a few KB showing on my swap space, but there's no reason to suspect my machine is swapping. I simply don't have processes running that would need it. But, as to swap space; we've argued incessantly over this, and I hate to get into it again. But, here's the deal: you need enough memory to run your processes. That memory can either be RAM only or it can be a combination of RAM and swap. Ask yourself how much user plus kernel memory space you need to run everything at once. If you need 34GB of total memory footprint, then you're fine. If not, well, what would you gain by messing with something that's clearly working OK?

Beware of informationitis. Just because you know something doesn't necessarily mean you need to do something about it.
 
Old 03-25-2007, 04:56 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,311

Rep: Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032
Quote:
Originally Posted by FredericV
and there is about 12 GIGs of buffer free...
That isn't what it is saying at all.
If cache/buffers (the relevant output of which you deleted) were not in use, that's how much extra free memory you'd have. As your applications are not demanding it, it's used more productively.
Would you rather you'd paid for that 12 Gig and never use it ???.
Same for the swap usage. Long term idle anonymous memory pages are pushed out so the RAM they occupy can be used elsewhere.

What's your uptime ???.
(In future use code tags to make your data readable)

Edit: D'oh - left out the emphasised "not" above.

Last edited by syg00; 03-25-2007 at 05:01 PM.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Swap Usage Kristijan AIX 3 04-24-2007 02:17 AM
configure swap usage, relieve stress off of RAM. tidiman07 Ubuntu 4 08-26-2006 12:36 AM
swap usage pingvina Linux - Software 4 02-24-2006 12:52 PM
Odd swap usage even though there is free RAM Artanicus Linux - Hardware 5 09-28-2005 02:25 AM
RAM/SWAP usage ganja_guru Linux - Software 13 12-29-2004 03:17 AM


All times are GMT -5. The time now is 11:14 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration