Meaningless Drivel is fun!*
The moose likes Linux / UNIX and the fly likes Linux RAM Usage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Linux RAM Usage" Watch "Linux RAM Usage" New topic
Author

Linux RAM Usage

Andrea Gazzarini
Ranch Hand

Joined: Sep 09, 2002
Posts: 125
Hello,
I have installed red hat 9.0 on my laptop (a Pentium 4 2400 with 512M of RAM).
Periodically, I run of the command "free" or "top" and it shows that the
amount of the used memory grows gradually until 512M without any reason (I'm not working with anything)!
When I try to launch a Java IDE (intellij, for example), linux starts to use the swap memory and even I kill the IDE, the memory usage remains at big level.
Looking in the "Start" men´┐Ż, I found an application called "KSim" which is another kind of system monitor. It shows more confortable levels about used memory (150 - 250 M).
Anyone knows the reason of this? What's the real usage of the memory??
Thanks in advance...


Regards,<br />Andrea<br /> <br /><a href="http://www.linkedin.com/in/andreagazzarini" target="_blank" rel="nofollow">Andrea Gazzarini</a><br />Skype ID : gazzax72<br />Google Talk ID : a.gazzarini@gmail.com<br /><a href="http://www.andreagazzarini.blogspot.com" target="_blank" rel="nofollow">My Blog</a>
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
I don't use KDE, so I can't tell what KSIM monitors. You can use top/vmstat/free to check for your memory, I believe they are the most accurate monitors.
KSIM might not be counting KDE usage itself.
What version KDE are you running? I know all X-Windows consumes rather large amount of memory.
Alton Hernandez
Ranch Hand

Joined: May 30, 2003
Posts: 443
I'm using GNOME instead of KDE but I also experience the same problem. I have 512MB of memory and I'm not running that much processes. But at certain time, my swap files don't seem to be enough. I discovered later that if I stop my Mozilla browser, the swap file usage decreases considerably. So it seems that Mozilla is the culprit. Are you using Mozilla when this things happen?
[ September 30, 2003: Message edited by: Alton Hernandez ]
Andrea Gazzarini
Ranch Hand

Joined: Sep 09, 2002
Posts: 125
Hello,
I've readv your posts...no, I haven't anything running on my notebook (only the processes that linux runs on startup).
If I run System Monitor (With the "All processes" choice)and I sum the whole "Memory" column, the result is not equals to the amount of the used memory.
another thing: At the start up, linux use about 160 M; If I run some application, for example nautilus or mozilla, the amount of the used memory grows (about 180M). If I close the application the used memory remains at the same level(180M)...and continue to grows gradually from here.
Last note: when I work, I use my laptop with Eclipse or Intellij as IDE and PostGresql as database. With these application open, (even the "free" command shows that there is'nt free memory), the development is sufficiently fast and when the free command shows me that the swap memory is in use, It seems to me that my hard disk isn't working (there is a green light on my pc that shows the hard disk work).
...help!!
Thanks
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
smells of some severe memoryleaks in Mozilla and Nautilus if memory consumed isn't freed when they terminate.


42
Andrea Gazzarini
Ranch Hand

Joined: Sep 09, 2002
Posts: 125
Mozilla & | nautilus was only for example...it happens with all processes...!
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
in that case it smells like a leak in the kernel
Chris De Vries
Ranch Hand

Joined: Dec 05, 2002
Posts: 65
I have noticed that free reports a fairly high used memory level after my computer has been on for some amount of time, but I have not noticed excessive swap paging after that time, nor have I run out of memory and had the kernel crash on me (except that one time, and that was entirely my fault...). I think that this growth in the memory usage reported by free must have something to do with the kernel marking memory free when a process dies, but not actually cleaning it up until a new process starts. If I knew more about the kernel, I might know the reason for this, but I do not think it's a memory leak in the kernel because I have not had problems even after running my system for several months without rebooting.
I've also tried running a fairly recent kernel (2.4.18) on a system with fairly limited memory (64 Meg) and it runs fine for an extended period of time without crashing. And "free" reports once again almost all the memory used up almost all the time.
So what we really need is a kernel guru to explain exactly what free is reporting, how that relates to the actual amount of memory the user processes and kernel processes are using, and why those may be different.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Linux RAM Usage
 
Similar Threads
JVM memory usage in wls8.1
Tomcat crashes with Out of Memory Error!
Weblogic Process on Linux 4, memory usage
Excessive memory usage
GC alloc all memory of machine