Why does it seem that ubuntu manages memory better


Recommended Posts

Oh, so you're saying you have 4GB of RAM and that Ubuntu can address all 4GB of RAM. I think we understood it as Ubuntu is depleting all your memory, as in programs & OS are occupying all 4GB of RAM. That would be nuts.

You understood correctly. The OS is depleting my memory, but that memory is mostly being used by the OS in the form of caches. Since the OS is in control of those caches, it can reclaim memory from it at will.

i'd say most of his ram of usage is actually the cache, my server runs at 99% "used" ram of which 50-60% is just the cache but gets lumped in with the used amount (though some apps/stats things will remove the cached amount from actual usage)

Yup. Cache is a good thing. It makes thing 'snappier' as the OSX folks like to say.

Link to comment
Share on other sites

that isn't efficient, that's stupid. a program should only use the amount of ram it needs to

i'd say most of his ram of usage is actually the cache, my server runs at 99% "used" ram of which 50-60% is just the cache but gets lumped in with the used amount (though some apps/stats things will remove the cached amount from actual usage)

I am pretty sure he was talking about cache as well :p

Link to comment
Share on other sites

Mmm courius, the Gnome System monitor says I have 580 MB out of 2 GB, but a quick top tells me:

top - 11:43:06 up  2:37,  2 users,  load average: 0.58, 0.44, 0.32
Tasks: 140 total,   2 running, 137 sleeping,   0 stopped,   1 zombie
Cpu(s): 15.8%us,  1.9%sy,  0.0%ni, 81.9%id,  0.0%wa,  0.0%hi,  0.3%si,  0.0%st
Mem:   2074244k total,  1993004k used,	81240k free,   757968k buffers
Swap:  3229024k total,		0k used,  3229024k free,   648464k cached

  PID USER	  PR  NI  VIRT  RES  SHR S %CPU %MEM	TIME+  COMMAND			
 8110 chris	 20   0  122m  44m  17m S   10  2.2   1:00.03 gnome-do		   
 8423 chris	 20   0  349m 140m  27m S	8  6.9  12:22.55 firefox

Almost 98% usage :o

Link to comment
Share on other sites

Using the Ubuntu Live CD, my top tells me I'm at 61% RAM usage (942/1.5GB). Damn, system monitor says I'm using 285MB though.

Link to comment
Share on other sites

The memory hierarchy for most personal computers goes like this: L1 cache, L2 cache, DRAM, harddisk. At each level, the amount of memory increases, but the speed decreases, since a computer with memory as fast as L2 cache and as large as DRAM would cost over $50000. Now, the slowest resource is the harddisk, obviously. It takes milliseconds to get data from the disk, all the while the processor is working in picoseconds, which means when a pagefault happens the processor does other things while it takes a million processing cycles to get data from the disk. A pagefault is very bad for performance and should be avoided as much as possible. One way to do that is to simply cache a bunch of data from the harddisk into DRAM based on usage patterns. This will reduce pagefaults and if the memory is needed for something else, then whatever is cached is simply deallocated. So an operating system using as much memory as possible is a good thing.

Link to comment
Share on other sites

I also experience "better" memory management in Ubuntu compared to Vista, on a system with 2 GB RAM. The funny thing is that while Vista has by now numerous services running to speed things up -- ReadyBoost, SuperFetch, Search Indexing, NTFS Defragmenter -- what I notice most is basically just drive thrashing. I'm almost completely without that on Linux, but without the noticed degraded performance from lacking these supposedly "powerful" services. :p

Similarly, Vista allocates enormous memory caches without a very much perceived difference at least to me. Meanwhile, Linux currently uses 333 MB (16%) of my RAM in total and I'm now running Firefox on that as well.

Sure, it's good to make use of the free RAM, but I'm surprised by how little I seem to benefit of it on Windows. I also perceive more swapping on Windows as well, when one would think that it would just shrink its caches if need be. I'm not sure of the cause behind this, maybe it's due to Linux' design to try to run entirely in RAM while Windows don't care as much and that's biting them now in bulkier operating systems like Vista, but I don't really care too much. All I feel is that Linux runs as well as Windows without the service complexity of Vista to make things more workable (according to Microsoft).

Link to comment
Share on other sites

I get no thrashing in vista except a minute or 2 after boot up which is hardly bad unless you for some reason restart your pc multiple times in one day. I actually seem to get more hard drive access when I use linux, my most commonly used vista programs like firefox, pidgin ect.. thay I have open all the time hardly touch the disk at all when opened and open faster then they do in ubuntu. My drive sits idle most of the time in vista, the ONLY time it "Thrashes" is for a small amount of time after boot.

ReadyBoost, SuperFetch, Search Indexing

Ubuntu does have search indexing on by default I believe with tracker.

Link to comment
Share on other sites

as you can see in the APP i can also visualize my Memory's usage like what's space/footprint of each app running on system in my memory etc and that too LIVE :D

this app is waiting at Redhat-bugzilla to be included in fedora , i know i know this is ubuntu thread and i am using fedora here, hope you can bear that and see the screenshot.

post-12634-1211531685_thumb.png

Link to comment
Share on other sites

^^^ That's a pretty cool little app (Y)

This thread may be titled "Ubuntu", but is really about Linux in a more general sense. Plus that app is a simple sudo apt-get install gmemusage away.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.