LinuxQuestions.org
Help answer threads with 0 replies.
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 05-13-2003, 03:37 AM   #1
philipina
Member
 
Registered: May 2003
Posts: 77

Rep: Reputation: 15
Question Memory problem.


Hello,

I have a memory problem
PC = 800MHz 128MRAM. RedHat 7.3
If I start my computer (without X) there are 30 MRAM used.
I start my java application which take 31 MRAM --> 30+31 = 61MRAM, this is OK.
But if I check after 2 days, the memory used by my application is always the same and the number of proccess is the same but

there are only 2MRAM free. My application is in the swap and become very slow. I don't know what is using the memory!!! I'm

working in level 3 and there are no special configuration.

Thanks a lot for your help.
 
Old 05-13-2003, 03:41 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Post the output from running the
Code:
free -m
command, I imagine we'll find that your memory is simply being used for disk cache and buffers.

cheers

Jamie...
 
Old 05-13-2003, 03:42 AM   #3
Sammy2ooo
Member
 
Registered: Jan 2003
Location: nearby switzerland
Distribution: Suse 8.0 / Suse 9.0 / Slackware 9.1 / Debian Sarge testing / Gentoo 1.4.10
Posts: 165

Rep: Reputation: 30
What says "ps aux" and "top" ??
 
Old 05-13-2003, 03:45 AM   #4
nakkaya
Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
linux uses the free ram but when another application try to get memory space kernel gives the enough mem to the application when you close a application kernel does not clean the memory complete in case you run that application again you check this run mozilla for the first time it takes 5 10 second depending on the system close it and run it again it will lauch much faster for the second time but the memory that is not clean will be cleaned if another program need memory
 
Old 05-13-2003, 03:48 AM   #5
philipina
Member
 
Registered: May 2003
Posts: 77

Original Poster
Rep: Reputation: 15
Get back used memory

Ok I use "top" and "free" to check the memory. The cache file size is increased. The question is, what is the utility of this cache file (sorry but I'm a newbies) and can I get back the memory free.?Because I don't want to send my application in the swap.

Thanks for your quick reply.
 
Old 05-13-2003, 03:51 AM   #6
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Memory will be used for cache when its not being used elsewhere, there's no facility for you to force the cache to be reduced to free-up physical memory the kernel manages all this for you. A lot of time and effort goes into memory management, if swap is being used then its being used to hold items that are not being used with any frequency, so the memory they would occupy is best put to other uses (buffers and cache). The cache is just used as temporary storage to speed up disk accesses.

cheers

Jamie...
 
Old 05-13-2003, 04:10 AM   #7
philipina
Member
 
Registered: May 2003
Posts: 77

Original Poster
Rep: Reputation: 15
Question kernel

Thanks,

RedHat 7.3 is using the kernel 2.4

Is it possible to recompile the kernel with other options to decrease the maximum cache size or to force it to take the cache in the swap?

Thanks.
 
Old 05-13-2003, 04:18 AM   #8
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
As your swap is on the hardd isk you can't use that to cache hard disk accesses!!

I've never seen any options to effect such things, you just leave the kernel to it. Unless you've spent many years looking into memory management you're not going to do it better than the kernel already does.

Is your machine thrashing a lot or are you getting other performance issues? Unless it really thrashing due to non-stop swapin/swapout operations then it's not going to be memory management related, Java over X is always a bit 'interesting' in my experience.

cheers

Jamie...
 
Old 05-13-2003, 07:41 AM   #9
neenee
Member
 
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693

Rep: Reputation: 30
as jharris said; linux uses ram efficiently, using it for caching and
releasing it to apps when they need it. you would not want
this caching to be done on hdd; since hdds are much slower
than ram. in short: memory is there to be used; so why would
you want it to be free an unused?
 
  


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
The memory problem Gins Linux - General 18 10-18-2005 12:19 PM
Memory problem nyk Linux - Software 4 10-28-2004 05:14 PM
RH 9.0 Memory Problem ! ! ! Mustard010 Linux - Hardware 7 11-03-2003 08:21 PM
Memory problem Nulaxor Linux - General 2 07-16-2003 10:03 AM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 04:48 PM


All times are GMT -5. The time now is 09:18 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