Something is eating my memory
Howdy!
I just fired up cedega for the first time and it (i think it is cedega that is doing it) starts eating all of my memory and i cant get it back. According to the pricesses listed in ps and top, i should only be using a few % of my memory, but free -m tells a different story; Code:
total used free shared buffers cached Is it possible that there is some background process eating all of my memory? Can I list those in any way? Cheers, Benne |
|
this is not a problem -- you have no swapping going on !
so in a nutshell an operating system kernel that DOES NOT use up all you memory and leaves memory free for absolutely no reason is a kernel that is poorly designed..... you have to stop looking at memory in the old way empty vs used ALL memory in Linux is a virtual abstraction and each and every running process has 100% access to all of your RAM. The only thing that actually is taking up space in you memory is some page mapping tables. |
My swap is on and has been since i installed gentoo quite a while ago. And i have change swapiness to 100.
Code:
# echo 100 > /proc/sys/vm/swappiness |
you are missing what i say entirely (reread last post and let it soak in)
ALL MEMORY IS VIRTUAL AND ALL PROCESSES HAVE ACCESS TO ALL MEMORY ALL THE TIME !!!!!!!!! then stop looking at "top" Quote:
[qoute] Swap: 2055 0 2055 [/quote] no swap used = no swap needed = no pressure on memory the kernel will only free memory when the system comes under pressure to need freed memory and it will imediately get used again........ i have no idea why you think that when you close applications it should look like freed memory what would be the point of it doing that ????? |
Ok, I am a experinsed programmer so I know how memory is hadled, but unforunely i am quite new to linux (ive been using it for about a year now). Lets say a application needs lots of arrays. E.g. the arrays need 50 mb of memory. When the application quits, the arrays also quit, and therefor the data that they had in them, disappears from me beloved memory.
But are you saying that is is entierly ok. I have , now while im wrint, 167mb fee of 1 gb and i am merely doing anything (i have trouwn cedega out). Can't be. And my swap is active. And for some reason, nothings gets stored there. Code:
total used free shared buffers cached |
Quote:
|
You just don't get it. The kernel uses all spare memory as it sees fit. For things like caching to make the system faster... you are not out of memory.
|
Why cant it just put that part of the memory into the cache colomn in /proc/meminfo? And more important, why did this happen when i fired up that crappy cedega?
|
Alright i'll rewrite my question: How do I put pressuere on the RAM so it will swap the uneccesary stuff then? Beacsue it is getting really slow here, only 71 mb free right now.
|
Ok... hold on. The reason you see linux take up a bunch of "memory" is it's write caching. Basically, when ever something is to be written to disk or whatever, instead of linux writing it directly to disk it will cache it in memory first. It then waits for a more opportune time to then write the data as well as speeds up your writes a lot. When running "free -m" the second line shows -/+ buffers/cache. This is your memory NOT including the cache of writes it has stored. This SHOULD be how much your programs are taking up, which also shouldn't be a lot. It's 70 MB used on my computer booted into X w/ firefox right now. Nowhere close to 700MB! (It is usually under 100 unless I'm playing games). I would suggest this as a good time to upgrade. Maybe some program had a bug/memory leak... Even an unstable driver your using.
|
95se: Exactly my point, it cant be the kernel that has decied to eat my memory. If it would, then my computer would be faster, not slower. When i boot up, maybe ca 70-100 mb are in use. And after firng up som applications it maybe is about 140 mb in use.
I first though that the nvidia driver was leaking memory (since the MEM dissapered while playing a a game) but i shut it down, no change. I im running the newest nvidia-kernel and nvidia-glx modules (according to emerge) Code:
* media-video/nvidia-glx Code:
* sys-kernel/gentoo-dev-sources |
Quote:
just read about linux kernel there are numerous papers on linux mem management and if you know code the kernel code is open source so i think you should not be posting about how it works this way or that way untill you at least understand how it actually works !!!!!!! if you then have some problem with kernel developement take it up with the team -- sumbit fixes or alternatives -- or start a new kernel branch that works to your liking..... you have confused mem allocation in c with kernel level page table management and allocation. Quote:
cache is about things read from the disk. Quote:
if you must for some reason see swap use something like a video/audio editing program that stores lots of unique local data and then ignores it for a long time and leave the program open don't close it.. also leave a bunch of other stuff running and ignore it for a long time and don't close them. Then start up doing other stuff opening other programms etc and you wil see swap. as the system tries to hold onto local data for the still open apps. Quote:
71mb free is exactly what will make often used applications start faster (like cedega) or each time you start it do you actually want to set there and wait for it to load all those libraries instead of have it start right away ???????????? if that's the case then you will have to rewrite your kernel so it works all wrong. your cpu has a memory management unit that is 4gigs wide ! why not use it ????? if you have problems with things running slow then tell us about those problems ram problems often show up as unresponsive mouse or keyboard or frozen gui.. do you have those things going on ???? ok cedega is crap and slow we know that but i mean otherwise ??????? we also know most distributions run like crap out of the box but that is another issue as well. |
Quote:
Quote:
Quote:
Quote:
|
http://sourcefrog.net/weblog/softwar.../free-mem.html
http://sourcefrog.net/weblog/softwar...rnel/swap.html you should use resources lke this and many others to figure out how linux is designed to work rather than bothering us !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!! |
All times are GMT -5. The time now is 12:40 AM. |