Bug 23247

Summary: FreeBSD 4.2 Active memory usage climbs even when idle. process table cannot make up for it.
Product: Base System Reporter: geniusj <geniusj>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-RELEASE   
Hardware: Any   
OS: Any   

Description geniusj 2000-12-03 10:00:01 UTC
While machine is on (obviously) and idle, memory gradually rises..  I used to think it might have to do with disk access, and this is still a possibility, however i'm not sure.  

Example:

Mem: 164M Active, 24M Inact, 50M Wired, 10M Cache, 35M Buf, 656K Free
Swap: 1000M Total, 288K Used, 1000M Free
USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED      TIME COMMAND
root     40460  0.0  0.1   440  188  p2  R+    4:48AM   0:00.00 ps aux
root         1  0.0  0.1   528  128  ??  ILs   9:43AM   0:00.05 /sbin/init --
root         2  0.0  0.0     0    0  ??  DL    9:43AM   0:00.61  (pagedaemon)
root         3  0.0  0.0     0    0  ??  DL    9:43AM   0:00.00  (vmdaemon)
root         4  0.0  0.0     0    0  ??  DL    9:43AM   0:00.63  (bufdaemon)
root         5  0.1  0.0     0    0  ??  DL    9:43AM   0:25.30  (syncer)
root        78  0.0  0.2   916  464  ??  Ss    9:43AM   0:01.14 syslogd -s
root        99  0.0  0.1   960  304  ??  Is    9:43AM   0:00.05 cron
root       106  0.0  0.3  2404  780  ??  Is    9:43AM   0:00.90 /usr/sbin/sshd
root       142  0.0  0.2  1332  460  v0  Is    9:43AM   0:00.04 -csh (csh)
root       143  0.0  0.2  1332  460  v1  Is    9:43AM   0:00.03 -csh (csh)
root       145  0.0  0.0   924   48  v3  Is+   9:43AM   0:00.00 /usr/libexec/ge
root       146  0.0  0.0   924   48  v4  Is+   9:43AM   0:00.00 /usr/libexec/ge
root       147  0.0  0.0   924   48  v5  Is+   9:43AM   0:00.00 /usr/libexec/ge
root       148  0.0  0.0   924   48  v6  Is+   9:43AM   0:00.00 /usr/libexec/ge
root       149  0.0  0.0   924   48  v7  Is+   9:43AM   0:00.00 /usr/libexec/ge
root       180  0.0  0.2  2344  428  v0  I+    9:44AM   0:01.93 ssh -l doofoo o
root       248  0.0  0.0   612   28  ??  DLs   9:49AM   0:00.00 vinum: vinum da
root       266  0.0  0.2  2344  388  v1  I+    9:51AM   0:00.03 ssh -l doofoo o
root       686  0.0  0.4  2784  924  ??  I     2:46AM   0:00.33 sshd: androsyn@
androsyn   687  0.0  0.1  1020  132  p0  Is    2:46AM   0:00.02 -bash (bash)
root       690  0.0  0.3  1340  804  p0  I     2:46AM   0:00.03 _su (csh)
root       694  0.0  0.1  1020  320  p0  I+    2:46AM   0:00.02 bash
root       830  0.0  0.4  2784 1140  ??  I     2:48AM   0:04.75 sshd: androsyn@
androsyn   831  0.0  0.2  1024  596  p1  Is    2:48AM   0:00.08 -bash (bash)
root       977  0.0  0.4  2476  900  ??  S     2:50AM   0:00.78 sshd: geniusj@t
geniusj    978  0.0  0.3  1332  816  p2  Is    2:50AM   0:00.04 -tcsh (tcsh)
pgsql    21430  0.0  0.1   628  244  p1  I     3:08AM   0:00.00 /bin/sh /usr/lo
pgsql    21431  0.0  0.6  4096 1528  p1  I     3:08AM   0:00.10 /usr/local/pgsq
root     35363  0.0  0.3  1312  836  p1  I     3:24AM   0:00.05 _su (csh)
root     35799  0.0  0.3  1064  720  p1  I+    3:25AM   0:00.60 bash
root     35936  0.0  0.3  1332  824  v2  Is+   3:29AM   0:00.08 -csh (csh)
root     37003  0.0  0.3  1340  840  p2  S     3:42AM   0:00.23 _su (csh)
root     40326  0.0  0.5  1988 1196  ??  Is    4:15AM   0:00.00 sqlr-connection
pgsql    40327  0.0  0.9  4500 2356  p1  I     4:15AM   0:00.01 /usr/local/pgsq
root     40330  0.0  0.5  1988 1196  ??  Is    4:15AM   0:00.00 sqlr-connection
pgsql    40331  0.0  0.9  4500 2356  p1  I     4:15AM   0:00.01 /usr/local/pgsq
root     40334  0.0  0.5  1988 1196  ??  Is    4:15AM   0:00.00 sqlr-connection
pgsql    40335  0.0  0.9  4500 2356  p1  I     4:15AM   0:00.01 /usr/local/pgsq
root     40338  0.0  0.5  1988 1196  ??  Is    4:15AM   0:00.00 sqlr-connection
pgsql    40339  0.0  0.9  4500 2356  p1  I     4:15AM   0:00.01 /usr/local/pgsq
root     40342  0.0  0.5  1988 1196  ??  Is    4:15AM   0:00.00 sqlr-connection
pgsql    40343  0.0  0.9  4500 2356  p1  I     4:15AM   0:00.01 /usr/local/pgsq
root     40346  0.0  0.4  1808 1056  ??  Is    4:15AM   0:00.00 sqlr-listener -
root     40349  0.0  0.4  1796 1032  ??  Is    4:15AM   0:00.00 sqlr-scaler -id
root     40356  0.0  0.3  1284  668  ??  Ss    4:15AM   0:00.01 sqlr-cachemanag
root     40419  0.0  0.2   768  580  p2  DL    4:29AM   0:12.60 cp -Rp usr/X11R
root         0  0.0  0.0     0    0  ??  DLs   9:43AM   0:00.01  (swapper)

If you look at that table, that doesn't come anywhere close to 160M usage, and the usage gradually rises, occasionally dropping back down to something normal.. However it does this quite frequently, I dont remember it doing this before, therefore I am reporting this as a bug.  If you need more information from me, feel free to contact me the email address provided.

Fix: 

I wish I knew :(
How-To-Repeat: Not sure, again, I think this might be related to disk access, but I haven't accurately traced it to that.
Comment 1 Chris D.Faulhaber freebsd_committer freebsd_triage 2000-12-03 18:06:52 UTC
Responsible Changed
From-To: gnats-admin->freebsd-bugs

Misfiled PR
Comment 2 iedowse freebsd_committer freebsd_triage 2001-07-10 18:33:14 UTC
State Changed
From-To: open->closed


FreeBSD's memory system is quite complex, so there isn't a direct 
relationship between the memory used by all processes and the count 
of "active" memory. The active memory simply refers to pages that 
are currently on the "active" page queue, and pages can be there 
for a variety of reasons (I don't know the details). This question 
appears every now and again; you might find a better answer if you 
search the mailing list archives. 

Unless you are seeing the system actually run out of memory 
unexpectedly, this is almost certainly not a leak.