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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-13-2003, 03:37 AM
|
#1
|
|
Member
Registered: May 2003
Posts: 77
Rep:
|
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.
|
|
|
|
05-13-2003, 03:41 AM
|
#2
|
|
Senior Member
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243
Rep:
|
Post the output from running the command, I imagine we'll find that your memory is simply being used for disk cache and buffers.
cheers
Jamie...
|
|
|
|
05-13-2003, 03:42 AM
|
#3
|
|
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:
|
What says "ps aux" and "top" ??
|
|
|
|
05-13-2003, 03:45 AM
|
#4
|
|
Guru
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398
Rep:
|
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
|
|
|
|
05-13-2003, 03:48 AM
|
#5
|
|
Member
Registered: May 2003
Posts: 77
Original Poster
Rep:
|
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.
|
|
|
|
05-13-2003, 03:51 AM
|
#6
|
|
Senior Member
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243
Rep:
|
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...
|
|
|
|
05-13-2003, 04:10 AM
|
#7
|
|
Member
Registered: May 2003
Posts: 77
Original Poster
Rep:
|
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.
|
|
|
|
05-13-2003, 04:18 AM
|
#8
|
|
Senior Member
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243
Rep:
|
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...
|
|
|
|
05-13-2003, 07:41 AM
|
#9
|
|
Member
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693
Rep:
|
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?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:56 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|