how to free up ram on RHEL

Besides the obvious of upgrading RAM. is there a way to free up memory on RHEL 5 . As you see below we are maxed out

Tasks: 191 total,   1 running, 190 sleeping,   0 stopped,   0 zombie
Cpu(s): 49.2%us,  9.0%sy,  0.0%ni, 39.3%id,  1.5%wa,  0.1%hi,  0.9%si,  0.0%st
Mem:  16312904k total, 16260260k used,    52644k free,    22988k buffers
Swap: 18481144k total,        0k used, 18481144k free,  9246296k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
 4855 ehsj      18   0 7186m 6.2g  10m S 409.6 40.1 110:35.36 java              
 4516 qpidd     16   0  487m  15m 3672 S 58.7  0.1  34:15.33 qpidd              
  808 root      10  -5     0    0    0 S  1.0  0.0   0:15.45 kjournald          
  464 root      15   0     0    0    0 S  0.3  0.0   0:03.67 pdflush            
  465 root      15   0     0    0    0 S  0.3  0.0   0:05.21 pdflush            
  466 root      10  -5     0    0    0 S  0.3  0.0   0:01.73 kswapd0            
 5066 ehsj      15   0 12740 1164  824 R  0.3  0.0   0:00.22 top                
    1 root      15   0 10348  708  592 S  0.0  0.0   0:02.39 init              
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.01 migration/0        
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0        
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0        
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/1        
    6 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/1        
    7 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/1        
    8 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/2        
    9 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/2        
   10 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/2  
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I wouldn't say you're maxed out.  You're not even touching swap.  Java is the obvious culprit, in my opinion it's bloated and slow but you must be running it for a reason so that decision's already been made.  What performance problems are you having, if any?
TALYOFFEAuthor Commented:

i was looking at this line  16312904k total, 16260260k used and thought we were using nearly all of the 16 gigs of memory. Is upgrading to 32 gig recommended?
If it ain't broke, don't fix it.  I'm already in awe of a machine that has 16GiB.  My guess would be you don't need it (won't notice much improvement if you get it), especially as you're not even touching swap.  The memory usage includes file-backed pages it hasn't looked at in a long time. It will reclaim that memory when it needs it, and you won't notice any slowdown.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Monis MontherSystem ArchitectCommented:
My guess you are not using more than 5-6GB

Please post the output of the following command

free -m

TALYOFFEAuthor Commented:
            total       used       free     shared    buffers     cached
Mem:         15930      15876         54          0         20       8967
-/+ buffers/cache:       6888       9042
Swap:        18047          0      18047
TALYOFFEAuthor Commented:
doesnt the above show used 15876 and only 54kb of free memory. looks like the alignment is off after i copied and paste
Those figures are in MiB, so your total of 15930 is about 16MB. The "used" number on the second line (that excludes buffers/caches) is what is in use, if you ignore that cached pages that can be dropped if your applications need more memory.  You don't really want much actual free memory, it would just be a waste, so they're filled with cached data most of which you probably don't need.
I meant 16GiB not MB.  So you have 6,888 MiB free (about 6.7 GiB).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Monis MontherSystem ArchitectCommented:
You have almost 9GB of free memory

The Line

-/+ buffers/cache:       6888       9042  

Means you have 6.8 GB used and 9GB free

You are all fine , to understand this exactly read about ( buffer cache ) this is a concept in the Linux kernel that makes use of unused memory instead of leaving it wasted
Technicality: 6,888 mebibytes free is about 6.7 gibibytes or 7.2 gigabytes, and not 6.8 anything.
Monis MontherSystem ArchitectCommented:
Yup that is more accurate , I was just giving approximates
Linux handles memory management differently.  Everything is cached to speed access if the same data is used twice.  This memory is instantly available to any process that might need it.  Freemem on an active system will almost always be about 50MB.  This then means that the cached value reported by top or free is the actual amount of free memory.  

With many later Linux distros there is a graphical display that shows the cached mem as part of the free - but it's not very useful for administration unless you have lots of time to sit and watch it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.