unix - How to find out which process is eating that much memory? -


output of # top -o size

last pid: 61935;  load averages:  0.82,  0.44,  0.39                              10+13:28:42  16:49:43 152 processes: 2 running, 150 sleeping cpu: 10.3% user,  0.0% nice,  1.8% system,  0.2% interrupt, 87.7% idle mem: 5180m active, 14g inact, 2962m wired, 887m cache, 2465m buf, 83m free swap: 512m total, 26m used, 486m free, 5% inuse    pid username  thr pri nice   size    res state   c   time   wcpu command  1471 mysql      62  44    0   763m   349m ucond   3 222:19 74.76% mysqld  1171 root        4  44    0   645m   519m sbwait  0  20:56  3.86% tfs 41173 root        4  44    0   629m   516m sbwait  4  19:17  0.59% tfs 41350 root        4  44    0   585m   467m sbwait  7  15:17  0.10% tfs 36382 root        4  45    0   581m   401m sbwait  1 206:50  0.10% tfs 41157 root        4  44    0   551m   458m sbwait  5  16:23  0.98% tfs 36401 root        4  45    0   199m   108m uwait   2  17:50  0.00% tfs 36445 root        4  44    0   199m    98m uwait   4  20:11  0.00% tfs 36420 root        4  45    0   191m    98m uwait   4  19:57  0.00% tfs  3491 root        9  45    0 79320k 41292k uwait   4  40:22  0.00% tfs_db 40690 root        1  44    0 29896k  4104k select  1   0:05  0.00% sshd 44636 root        1  44    0 29896k  3896k select  4   0:00  0.00% sshd 22224 root        1  44    0 29896k  3848k select  6   0:00  0.00% sshd 42956 root        1  44    0 29896k  3848k select  4   0:00  0.00% sshd   909 bind       11  76    0 27308k 14396k kqread  1   0:00  0.00% named  1586 root        1  44    0 26260k  3464k select  4   0:00  0.00% sshd 40590 root        4  45    0 23480k  7592k uwait   1   5:11  0.00% auth  1472 root        1  44    0 22628k  8776k select  0   0:41  0.00% perl5.8.9 22229 root        1  44    0 20756k  2776k select  0   0:00  0.00% sftp-server 42960 root        1  44    0 20756k  2772k select  2   0:00  0.00% sftp-server 44638 root        1  44    0 10308k  2596k pause   2   0:00  0.00% csh 42958 root        1  47    0 10308k  1820k pause   3   0:00  0.00% csh 22227 root        1  48    0 10308k  1820k pause   0   0:00  0.00% csh 36443 root        1  57    0 10248k  1792k wait    0   0:00  0.00% bash 36418 root        1  51    0 10248k  1788k wait    2   0:00  0.00% bash 41171 root        1  63    0 10248k  1788k wait    0   0:00  0.00% bash 36399 root        1  50    0 10248k  1784k wait    2   0:00  0.00% bash 41155 root        1  56    0 10248k  1784k wait    0   0:00  0.00% bash 40588 root        1  76    0 10248k  1776k wait    6   0:00  0.00% bash 36380 root        1  50    0 10248k  1776k wait    2   0:00  0.00% bash 41348 root        1  54    0 10248k  1776k wait    0   0:00  0.00% bash  1169 root        1  54    0 10248k  1772k wait    0   0:00  0.00% bash  3485 root        1  76    0 10248k  1668k wait    4   0:00  0.00% bash 61934 root        1  44    0  9372k  2356k cpu4    4   0:00  0.00% top  1185 mysql       1  76    0  8296k  1356k wait    3   0:00  0.00% sh  1611 root        1  44    0  7976k  1372k nanslp  0   0:08  0.00% cron   824 root        1  44    0  7048k  1328k select  0   0:03  0.00% syslogd  1700 root        1  76    0  6916k  1052k ttyin   3   0:00  0.00% getty  1703 root        1  76    0  6916k  1052k ttyin   2   0:00  0.00% getty  1702 root        1  76    0  6916k  1052k ttyin   5   0:00  0.00% getty  1706 root        1  76    0  6916k  1052k ttyin   0   0:00  0.00% getty  1705 root        1  76    0  6916k  1052k ttyin   1   0:00  0.00% getty  1701 root        1  76    0  6916k  1052k ttyin   6   0:00  0.00% getty  1707 root        1  76    0  6916k  1052k ttyin   4   0:00  0.00% getty  1704 root        1  76    0  6916k  1052k ttyin   7   0:00  0.00% getty   490 root        1  44    0  3204k   556k select  1   0:00  0.00% devd 

my game server lag , have noticed there 83m of free ram.

its not top because have tried use other app:

# /usr/local/bin/freem system memory information: mem_wire:        3104976896 (   2961mb) [ 12%] wired: disabled paging out mem_active:  +   5440778240 (   5188mb) [ 21%] active: referenced mem_inactive:+  15324811264 (  14614mb) [ 61%] inactive: not referenced mem_cache:   +   1015689216 (    968mb) [  4%] cached: avail. allocation mem_free:    +     86818816 (     82mb) [  0%] free: available allocation mem_gap_vm:  +       946176 (      0mb) [  0%] memory gap: unknown -------------- ------------ ----------- ------ mem_all:     =  24974020608 (  23817mb) [100%] total real memory managed mem_gap_sys: +    772571136 (    736mb)        memory gap: kernel?! -------------- ------------ ----------- mem_phys:    =  25746591744 (  24553mb)        total real memory available mem_gap_hw:  +     23212032 (     22mb)        memory gap: segment mappings?! -------------- ------------ ----------- mem_hw:      =  25769803776 (  24576mb)        total real memory installed  system memory summary: mem_used:        9342484480 (   8909mb) [ 36%] logically used memory mem_avail:   +  16427319296 (  15666mb) [ 63%] logically available memory -------------- ------------ ----------- ------ mem_total:   =  25769803776 (  24576mb) [100%] logically total memory 

as can see, output similar:

mem_free: + 86818816 ( 82mb) [ 0%] free: available allocation.

my dedicated has 24gb of ram , it's pretty game server.

how can find out process eating amount of memory?

i using freebsd 8.2.

according top's output, using 5% of swap. means, not short on ram -- whatever slowing down, not memory shortage. if anything, i'd suspecting mysqld -- not quite busy, when took snapshot, accumulated quite bit of cpu-time prior that.

perhaps, frequently-running queries can helped new index or two?


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -