Find the answer to your Linux question:
Results 1 to 5 of 5
Should I be overly concerned with the below memory utilization? My VPS (512MB centos 5.4) constantly uses swap, mostly between 7 - 17 MB as you can see below. At ...
  1. #1
    Just Joined!
    Join Date
    Oct 2010
    Posts
    2

    free command - memory and swap

    Should I be overly concerned with the below memory utilization? My VPS (512MB centos 5.4) constantly uses swap, mostly between 7 - 17 MB as you can see below. At what point should I be really be concerned (i.e., the system could crash)?? Please advise.


    [root]# free -m
    total used free shared buffers cached
    Mem: 524 436 87 0 49 207
    -/+ buffers/cache: 178 345
    Swap: 1023 17 1006

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    it depends on what you are running, you are only using about 178mb of your 512mb memory.

    you have 1gb swap, so you will be fine until you reach that limit, but if you are in swap you need more memory

  3. #3
    Just Joined!
    Join Date
    Oct 2010
    Posts
    2
    i'm running mysql, apache mostly. i'm still new to linux so pardon my question if the answer is obvious. If I'm only using 178MB of 512MB, then why is swap being used and not the 334MB of other available memory? Below is the result from my top command (maybe it helps)

    -------------------------------------------------------------------
    top - 14:26:39 up 175 days, 38 min, 1 user, load average: 0.00, 0.00, 0.00
    Tasks: 81 total, 1 running, 80 sleeping, 0 stopped, 0 zombie
    Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
    Mem: 536684k total, 435064k used, 101620k free, 50788k buffers
    Swap: 1048568k total, 18044k used, 1030524k free, 214100k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    2487 mysql 20 0 337m 39m 4136 S 0.0 7.5 23:15.98 mysqld
    17760 apache 20 0 275m 12m 3276 S 0.0 2.3 0:00.18 httpd
    17762 apache 20 0 274m 11m 3200 S 0.0 2.2 0:00.09 httpd
    17775 apache 20 0 274m 11m 3240 S 0.0 2.2 0:00.07 httpd
    17765 apache 20 0 274m 11m 3292 S 0.0 2.2 0:00.09 httpd
    17764 apache 20 0 274m 11m 3224 S 0.0 2.1 0:00.09 httpd
    17759 apache 20 0 274m 11m 3224 S 0.0 2.1 0:00.27 httpd
    17761 apache 20 0 274m 11m 3200 S 0.0 2.1 0:00.11 httpd
    17763 apache 20 0 274m 11m 3200 S 0.0 2.1 0:00.07 httpd
    17758 apache 20 0 273m 11m 3236 S 0.0 2.1 0:00.11 httpd
    17774 apache 20 0 273m 10m 3184 S 0.0 2.1 0:00.04 httpd
    17739 root 20 0 270m 10m 6616 S 0.0 2.1 0:00.20 httpd
    2405 ntp 20 0 23328 4964 3904 S 0.0 0.9 0:00.25 ntpd
    17618 root 20 0 90108 3384 2628 S 0.0 0.6 0:00.00 sshd
    18759 postfix 20 0 54320 2316 1776 S 0.0 0.4 0:00.04 qmgr
    17655 postfix 20 0 54148 2260 1756 S 0.0 0.4 0:00.00 pickup
    18748 root 20 0 54080 2168 1684 S 0.0 0.4 0:00.22 master
    17620 root 20 0 66052 1600 1176 S 0.0 0.3 0:00.00 bash
    19730 root 20 0 62572 1196 648 S 0.0 0.2 0:00.00 sshd
    2574 root 20 0 74864 1084 576 S 0.0 0.2 0:00.09 crond
    17785 root 20 0 12672 1072 824 R 0.0 0.2 0:00.00 top
    2437 root 20 0 65908 948 944 S 0.0 0.2 0:00.01 mysqld_safe
    2601 avahi 20 0 23212 880 632 S 0.0 0.2 0:00.00 avahi-daemon
    2592 xfs 20 0 20032 852 540 S 0.0 0.2 0:00.00 xfs
    2372 haldaemo 20 0 30900 648 644 S 0.0 0.1 0:00.11 hald

  4. #4
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    17mb of swap is in use, i wouldn't worry, probably there is some data that hasn't been used in a long time that was put on swap

  5. #5
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    You may find this useful for understanding swap ... check swappiness value. As coopstah13 indicated I don't think you really need to worry about the level of swap use you have reported.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...