Quick RAM question

Discussion in 'Linux, BSD and Other OS's' started by Addis, Nov 19, 2005.

  1. Addis

    Addis The King

    Likes Received:
    91
    Trophy Points:
    48
    OK I don't have a swap partition on my computer for Linux, but I don't game on Mandriva only for normal usage so its not a bother at the moment. (truth is i can't be bothered making a swap partition)

    Anyway I've got the little CPU and RAM usage graph on the taskbar thing, and I was just asking to verify this.

    As I use it more and more (after it boots) the RAM usage slowly increases as I open a program, which seems normal but then doesn't decrease much when I close. If at all. I have plenty of RAM for what I do with 512mb and so suffer no performance hit with this. Does the slow increase in RAM "usage" mean that its caching data in the RAM. And can you verify that this would be made available if another program needs the memory? :) I'm just checking as this is probably the case with Mandriva.
     
  2. zRoCkIsAdDiCtInG

    zRoCkIsAdDiCtInG HWF Guitar Freak

    Likes Received:
    98
    Trophy Points:
    0
    the processes required to work the program may still be running in the background after start

    ex:// you watch a movie but quicktime is still on after finishing
     
  3. Addis

    Addis The King

    Likes Received:
    91
    Trophy Points:
    48
    No its not that, I was saying that linux caches data in RAM so it seems as if available RAM is decreasing. I know I have closed everthing and processes show no extra.
     
  4. Anti-Trend

    Anti-Trend Nonconformist Geek

    Likes Received:
    118
    Trophy Points:
    63
    Actually, caching to RAM is a good thing. Otherwise, you're either constantly swapping and your RAM goes to waste *cough*Windows*cough* or else your performance is poor and it takes a long time to open programs, movies are choppy, etc. Don't worry, cached memory is treated as a luxury, and it's freed up automatically when you need it for something more important. This is considered an excellent approach to memory management. All that being said, you do need a swap partition, even if it's only 128mb. Otherwise you may have unexplainable problems.

    Also, If you're using KDE you're probably using the application 'ksysguard' to display your CPU and memory usage statistics. Your memory results may be skewed if you're using ksysguard on the taskbar without changing the stock settings. By default, it uses a relative scale where 100% equals the total amount of memory used instead of the total amount available. WTF? Doesn't make sense to me at all that way. If you alternate-click on ksysguard and change the value from 'automatic' to the actual amount of RAM you have in kb, it'll give you an absolute scale instead of a relative one, which IMHO makes more sense to human beings. Hint: If you don't know exactly how much RAM you have in kb, simply type this in a terminal:
    Code:
    cat /proc/meminfo | grep MemTotal
    You should also do the same thing for the CPU graph, as it also uses a stupid relative scale. Just change it from 'automatic' to 100 (as in 100%) and you'll get a more accurate idea of what's going on with your CPU usage as well.

    -AT
     

Share This Page