LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 07-23-2012, 04:31 AM   #1
w359
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Rep: Reputation: Disabled
releasing memory with Fedora 16


Running our Java application and MySQL server on Fedora 16 with 64bit kernel 3.3.7-1, we never see a decrease of used memory after the application and the database server is stopped. This does not relate to memory used for file caching and disk buffers.
The following is the output of 'free -m' after the application and the database server is stopped (with a necessary wait so that neither is shown using 'ps'). The server's description comes from 'uname -a'.

1) our problem server: Linux <hostname> 3.3.7-1.fc16.x86_64 #1 SMP. Free:
Code:
             total       used       free     shared    buffers     cached
Mem:          7987       5446       2540          0          8        141
-/+ buffers/cache:       5297       2690
Swap:            0          0          0
2) a comparable server running on different kernel version: Linux <hostname> 2.6.35.14-96.fc14.x86_64 #1 SMP. Free:
Code:
             total       used       free     shared    buffers     cached
Mem:          3964       1910       2054          0        347       1268
-/+ buffers/cache:        293       3670
Swap:          895          2        893
Notice the difference between the amount of overall used and free memory, i. e. including buffers/cache (indicated bold) between the two servers. We would expect that after stopping the application and database server, the amount of used would shift to free also on the server with kernel 3.3.7-1.
So I would like to know what's going on with the allocated memory or the free utility. Appreciate anyone shedding a little light on this matter.
 
Old 07-23-2012, 11:41 AM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,588

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Memory is handled quite differently in Linux than in Windows. In Windows you should see memory immediately returned to the pool when an application is done with it. In Linux it will go into a "Dirty" or "Inactive" state until there is another process that needs it, at which point it is cleaned and returned to the free pool for other applications.

Your /proc/meminfo file will give you detailed info about where your memory is at, use this as your reference point and not free -m or those other utilities if you really want to see whats going on. Those utilities are great for a quick snapshot of the overall picture but will not give you the details that you are looking for.

There are some sites out there that explain this but I can't find one that I like as the explanations on sites like linuxatemyram.com are a bit high level and don't really explain it. I did find a good page that explains the meminfo file: http://unixfoo.blogspot.com/2008/02/...ocmeminfo.html
 
Old 07-31-2012, 10:44 AM   #3
w359
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks a lot for your reply. I have yet to look into /proc/meminfo on the servers which I plan to do after vacation.

However, I never compared the memory handling between Windows and Linux. My problem is with the difference I see when using free with different kernel versions (or Fedora versions) under the same circumstances. The problem is also that the amount of memory shown as Used with kernel 3.3 didn't decrease even after a few days of uptime.
Can anyone point me to the right direction on the actual issue?

Thanks for any information in advance.
 
Old 08-01-2012, 11:39 AM   #4
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,588

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Ok well just wanted to make sure that it wasn't the case of not knowing the Linux memory features. We should take a look at the meminfo file before digging anywhere else, thats the first place to check when you want to see what your system is doing with your memory.
 
  


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
releasing memory allocated to a process aloktiagi Linux - Newbie 1 08-25-2009 06:56 AM
netbackup client not releasing memory bajones Linux - Software 3 12-09-2008 12:04 PM
releasing memory DotHQ Linux - Server 2 11-28-2006 09:34 AM
updatedb not releasing memory? Mephisto Slackware 2 07-18-2004 11:37 PM
new kernel not releasing memory plisken Linux - General 1 10-22-2003 06:22 PM


All times are GMT -5. The time now is 12:37 AM.

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