SUMMARY: what's chewing up the swap space?

From: ert weerr (sun1sol_at_yahoo.com)
Date: 01/12/05

  • Next message: Saul Santos: "Problems Installing Solaris 8 over the network"
    Date: Wed, 12 Jan 2005 14:47:48 -0800 (PST)
    To: Sunmanagers <sunmanagers@sunmanagers.org>
    
    

    >Is that possible to check what applications are
    >sitting in the swap and not releasing the used
    >swap area?
    >We have an old box what we shouldn't reboot, but a
    >badly written application always chewing up the free
    >swap space.
    >We need to identify this application and kill
    >it if it's possible.

    I received a lot of useful solutions for my original
    question.
    Thanks to everyone who spent time to reply for my
    email!

    ----------------------------------------

    You can do /usr/ucb/ps -alxww and then check out the
    processes that have a large SZ.

    ----------------------------------------

    ps -ef or prstat will show the amount of memory (real

    & virtual) used by a process. if the memory used by a

    process grows other time, it is your memory-leaker.

    ----------------------------------------

    ps -elf shows a SZ column which is the size of the
    process in pages.
    Multiple that by the output of page size to find the
    total size of the processes in bytes. pmap -S <pid>
    will show the swap reservation of a process if you're
    running under Solaris 9.

    ----------------------------------------

    prstat -s size

    also check for files in (or applications writing logs
    into) /tmp

    ----------------------------------------

    "ps -el" should show a large SZ for the offending
    process (remember SZ is in pages, so its a lot bigger
    than it looks). Solaris 8 has "ps -eyl" which shows
    SZ
    in kilobytes. Once you find a large process, you can
    use tools in /usr/proc/bin to learn more about it,
    or just watch it for a while to see if it grows.

    Also run lsof on /tmp. It could be some process is
    writing big files there. Since /tmp is a memory file
    system, that can chew up a ton of swap space.

    ----------------------------------------

    "lsof" can be used to view open files in tmp/swap with
    a link count of 0 (zero).

    Thanks!

    John

                    
    __________________________________
    Do you Yahoo!?
    All your favorites on one personal page  Try My Yahoo!
    http://my.yahoo.com
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: Saul Santos: "Problems Installing Solaris 8 over the network"

    Relevant Pages

    • Re: whats making executables so large?
      ... each shared library mapped to a separate memory page and memory page ... Swap space, VM, and shared memory usage a _complicated_ swamp. ... 'virtual memory' is more than the disk size of the executable ... The situation is 'sort of' like shared libraries. ...
      (comp.unix.bsd.freebsd.misc)
    • Re: Heaps and Foreigners
      ... >> can ask for the memory and get a pointer to it. ... cause unfathomable deaths when swap space gets low or is exhausted. ... It's probably because there is some reserve memory to print out errors ... of RAM and disk space) and virtual swap (which is just a number managed ...
      (comp.lang.lisp)
    • Re: [PATCH] io-controller: Add io group reference handling for request
      ... Find the io group bio belongs to. ... anonymous pages (swap) you still need the page tracking functionality ... so fair to charge the current task for the whole activity. ... is some other memory hungry application which is forcing these swap outs. ...
      (Linux-Kernel)
    • Re: Is Greenspun enough?
      ... Most OSes memory map executables directly from the file system so code doesn't pollute the file cache or swap space. ...
      (comp.lang.lisp)
    • Re: [opensuse] Should I go 64-bit?
      ... The code itself may be bigger but, looking at the sizes of applications ... applications without a need for swap. ... could actually do with a substantial amount of memory adding to it. ...
      (SuSE)