Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

RAM usage in Ubuntu

  • 03-04-2007 2:02pm
    #1
    Registered Users, Registered Users 2 Posts: 1,165 ✭✭✭


    Can anyone recommend a tool to use to see whats killing my machine?. I'm using Ubuntu 6.10, and it used to work like a dream, but its now crawling. Its got a 1Gb of RAM, but using top it tells me that

    Mem: 1026096k total, 1000552k used, 25428k free
    Swap: 3004112k total, 0k used, 3004112k free

    When all I've got open is two terminal windows. I have VMware installed but I've killed all the processes. I've also killed some apache processes. But from top, Xorg is using about 8.2% of memory, but the next highest after that seems to be hald with 0.6%.

    I've tried Exmap, but when I run it, I get the error

    "Can't find file /proc/exmap: Please check kernel module is loaded
    Can't get system info"

    CPU usage is low, about 4%, so whatever the problem is, its just sitting in RAM. And why its using no swap space at all is beyond me.

    Anyone got any ideas?


Comments

  • Registered Users, Registered Users 2 Posts: 2,187 ✭✭✭ondafly


    i could be wrong - but i thought linux is supposed to use all of your ram all the time, and then when thats full, to begin using your swap space ?


  • Registered Users, Registered Users 2 Posts: 1,165 ✭✭✭Stky10


    Turns out to be a feature

    http://gentoo-wiki.com/FAQ_Linux_Memory_Management#Overview_of_memory_management

    In actual fact, of the 958k in use, 577k is cached, and to the applications running 261k is in use and 740k is available.


  • Closed Accounts Posts: 884 ✭✭✭NutJob


    ondafly wrote:
    i could be wrong - but i thought linux is supposed to use all of your ram all the time, and then when that's full, to begin using your swap space ?

    it uses all the ram yes but its allocated as cache. As you load applications it frees up the cache and allocates it to the application so depending on the commands you use you'll see differing results on ram usage.

    Explains how to profile memory
    http://mail.nl.linux.org/linux-mm/2003-03/msg00077.html

    Edit:beaten to the punch.
    Ogh and you'll have to re-compile the kernel to use > 1Gb of ram two


  • Registered Users, Registered Users 2 Posts: 354 ✭✭AndrewMc


    Those memory figures aren't too useful, really. The "memory used" figure includes all buffers and caches, which is designed to fill all available memory. Basically, any RAM not used by running processes is instead used by the kernel to store recently-opened files for quick access in the future. Swap is usually only used when the running processes themselves are using all available RAM. If you run "free", the line starting "-/+ buffers/cache:" gives the real figure of memory used/available.

    It's possible that something reliant on disk or network access is slowing things up. Can you be a bit more specific when you say it's crawling? What was fast that now isn't?

    Have a look, too, at this thread:
    http://www.ubuntuforums.org/showthread.php?t=388765


  • Registered Users, Registered Users 2 Posts: 1,165 ✭✭✭Stky10


    Well the main way it was noticeable was when using Firefox. All applications then became very slow and unresponsive, but top was saying that it (Firefox) was only using about 10-15% of memory, and even when I killed the process it didn't improve things. I've rebooted the machine, killed as many applications as I could see that weren't necessary, and I've stopped using Beryl, and things are now working reasonably well again.

    I might restart Beryl in a while when I'm some time free and see how much an effect it makes. The command "free -m" is the one I now know I need to use.

    Cheers...


  • Advertisement
Advertisement