To people who aren't used to dealing with Unix-like systems this is a
common complaint.
What show system memory is really doing is running free.

BTW Vyattans - to avoid this in the future, please consider this a
enhancement request to alias 'show system memory' to 'free -m'

In olden days, RAM was expensive, but it's also very fast; far faster
than disk, so Linux would buffer and cache items to RAM that it
'thought' it would use, and keep it near full all of the time, because
it was mere nanoseconds to dump and fill with something else. The
thought was that you paid oodles for this expenseive RAM, might as well
use it to speed the system up even if you don't have a lot of use for it
as RAM, maybe we can use it as a tertiary level CPU cache, or a nice
disk buffer. To really see what is 'freeable' it should look at free ram
as the free column plus buffers and cache.

If you use free -m from the comand line you will see something akin to:
vyatta:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1011        995         16          0        467        427
-/+ buffers/cache:        100        911
Swap:            0          0          0


Which shows that the system is really consuming only 100 Megs of RAM but
has almost 900 cached.


Nick Davey wrote:
> Hi All,
> I've noticed some pretty intense memory usage out of my Vyatta router:
>
> [EMAIL PROTECTED]> show system memory
>               total       used       free     shared    buffers     cached
> Mem:        255268     250956       4312          0     142652      32900
> Swap:            0          0          0
> Total:      255268     250956       4312
>
> I know the spacing is a bit off, but free memory is only 4312 bytes.
> Examining the process memory usage under the shell shows that the xorp
> daemons are using the lions share of the memory:
>
> core:~# ps aux | more
> USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
> root         1  0.0  0.2   1948   636 ?        Ss   Oct31   0:03 init [2]
> root         2  0.0  0.0      0     0 ?        S    Oct31   0:00
> [migration/0]
> root         3  0.0  0.0      0     0 ?        SN   Oct31   0:00
> [ksoftirqd/0]
> root         4  0.0  0.0      0     0 ?        S    Oct31   0:00
> [watchdog/0]
> root         5  0.0  0.0      0     0 ?        S<   Oct31   0:00
> [events/0]
> root         6  0.0  0.0      0     0 ?        S<   Oct31   0:00 [khelper]
> root         7  0.0  0.0      0     0 ?        S<   Oct31   0:00 [kthread]
> root        31  0.0  0.0      0     0 ?        S<   Oct31   0:00
> [kblockd/0]
> root        52  0.0  0.0      0     0 ?        S<   Oct31   0:00 [kseriod]
> root        86  0.0  0.0      0     0 ?        S    Oct31   0:00 [pdflush]
> root        87  0.0  0.0      0     0 ?        S    Oct31   0:00
> [pdflush]
> root        88  0.0  0.0      0     0 ?        S<   Oct31   0:00 [kswapd0]
> root        89  0.0  0.0      0     0 ?        S<   Oct31   0:00 [aio/0]
> root      1494  0.0  0.0      0     0 ?        S<   Oct31   0:00 [khubd]
> root      1580  0.0  0.0      0     0 ?        S<   Oct31   0:00 [ata/0]
> root      1581  0.0  0.0      0     0 ?        S<   Oct31   0:00 [ata_aux]
> root      1843  0.0  0.0      0     0 ?        S<   Oct31   0:09
> [kjournald]
> root      2006  0.0  0.2   2176   612 ?        S<s  Oct31   0:00 udevd
> --daemon
> root      2835  0.0  0.0      0     0 ?        S<   Oct31   0:00
> [kpsmoused]
> root      2930  0.0  0.0      0     0 ?        S<   Oct31   0:00
> [kgameportd]
> root      3118  0.0  0.0      0     0 ?        S<   Oct31   0:00
> [kmirrord]
> root      3123  0.0  0.0      0     0 ?        S<   Oct31   0:00 [ksnapd]
> root      3150  0.0  0.0      0     0 ?        S<   Oct31   0:00
> [kjournald]
> root      3543  0.0  0.1   1584   384 ?        Ss   Oct31   0:00
> /sbin/klogd -x
> root      3738  0.0  0.2   2196   752 ?        Ss   Oct31   0:00
> /usr/sbin/cron
> root      3904  0.5  5.7  28840 14636 ?        Ss   Oct31 376:11
> /opt/vyatta/sbin/xorp_rtrmgr -b /opt/vyatta/etc/config/config.boot
> root      3909  0.0  2.3  19972  6032 ?        S    Oct31  36:38
> xorp_rl_firewall
> root      3923  0.0  0.0      0     0 ?        S<   Oct31   0:00
> [unionfs_siod/0]
> root      4083  0.0  4.2  24492 10752 ?        S    Oct31  35:04 xorp_fea
> root      4213  0.0  3.2  21600  8324 ?        S    Oct31   9:37 xorp_rib
> root      4216  0.0  2.3  19928  6080 ?        S    Oct31   4:03
> xorp_rl_protocols
> root      4229  0.0  2.7  18520  7008 ?        S    Oct31  32:59
> /usr/sbin/snmpd -p /var/run/snmpd.pid
> root      4230  0.0  2.3  20036  6104 ?        S    Oct31   4:12
> xorp_rl_service
> root      4886  0.0  0.6   2656  1620 ?        Ss   Oct31   0:02
> /opt/vyatta/bin/dhcpd -f -pf /var/run/dhcpd-unused.pid -cf
> /opt/vyatta/etc/dhcpd.conf -lf /v
> ar/log/dhcpd.leases
> root      4901  0.0  0.4   4928  1096 ?        Ss   Oct31   0:00
> /usr/sbin/sshd -o HostKey=/etc/ssh/ssh_host_key -o Protocol=2 -p 22
> root      4909  0.0  5.7  29256 14608 ?        Ss   Oct31   6:32
> /opt/vyatta/sbin/xgdaemon
> root      4916  0.0  1.1   4664  2984 ?        Ss   Oct31   0:05
> /usr/sbin/lighttpd -D -f /opt/vyatta/etc/lighttpd.conf
> root      4930  0.0  2.8  20704  7180 ?        S    Oct31  11:52
> xorp_policy
> root      4933  0.0  2.8  21088  7388 ?        S    Oct31  55:04
> xorp_static_routes
> root      4948  0.0  0.1   1580   496 tty1     Ss+  Oct31   0:00
> /sbin/getty 38400 tty1
> root      4949  0.0  0.1   1576   496 tty2     Ss+  Oct31   0:00
> /sbin/getty 38400 tty2
> root      4950  0.0  0.1   1576   496 tty3     Ss+  Oct31   0:00
> /sbin/getty 38400 tty3
> root      4951  0.0  0.1   1580   496 tty4     Ss+  Oct31   0:00
> /sbin/getty 38400 tty4
> root      4952  0.0  0.1   1576   496 tty5     Ss+  Oct31   0:00
> /sbin/getty 38400 tty5
> root      4953  0.0  0.1   1576   496 tty6     Ss+  Oct31   0:00
> /sbin/getty 38400 tty6
> root      4954  0.0  0.1   1580   504 ttyS0    Ss+  Oct31   0:00
> /sbin/getty -L ttyS0 9600 vt100
> root      4965  0.1  2.4  20072  6156 ?        S    Oct31  89:46
> xorp_rl_system
> root      5389  0.0  1.6   4152  4152 ?        SLs  Oct31   0:09
> /opt/vyatta/bin/ntpd -c /etc/ntp/ntp.conf -n -g
> root      5408  0.0  0.2   1632   604 ?        Ss   Oct31   0:01
> /sbin/syslogd
> root      5422  0.1   4.2  24836 10796 ?        S    Oct31 120:59
> xorp_ospfv2
> root      5423  0.0  2.3  19936  6116 ?        S    Oct31  15:19
> xorp_rl_interfaces
> root      5441  0.0  2.3  19936  6100 ?        S    Oct31  12:18
> /opt/vyatta/sbin/vrrpd -i eth3 -v 2 -p 150 -d 1 192.168.20.92
> <http://192.168.20.92>
> root      7885  0.0  2.3  19932  6104 ?        S    Nov05   3:27
> /opt/vyatta/sbin/vrrpd -i eth2 -v 1 -p 150 -d 1 192.168.20.62
> <http://192.168.20.62>
> root     29414  2.6  0.9   7700  2372 ?        Ss   22:45   0:00 sshd:
> [EMAIL PROTECTED]/0
> root     29416  0.3  0.6   3940  1640 pts/0    Ss   22:45   0:00 -bash
> root     29420  0.0  0.3   3432   996 pts/0    R+   22:45   0:00 ps aux
> root     29421  0.0  0.2   3052   700 pts/0    R+   22:45   0:00 more
>
> This router really isn't doing a whole heck of a lot, OSPF is by far
> the most resource intensive process on this router. I've included the
> config as an attatchment. Any insight would be much appreciated.
>
> Thanks,
> Nick
> ------------------------------------------------------------------------
>
> _______________________________________________
> Vyatta-users mailing list
> Vyatta-users@mailman.vyatta.com
> http://mailman.vyatta.com/mailman/listinfo/vyatta-users

_______________________________________________
Vyatta-users mailing list
Vyatta-users@mailman.vyatta.com
http://mailman.vyatta.com/mailman/listinfo/vyatta-users

Reply via email to