Subject: bin/32852: long running top will eat a lot of memory
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <edoneel@sdf.lonestar.org>
List: netbsd-bugs
Date: 02/16/2006 13:20:00
>Number:         32852
>Category:       bin
>Synopsis:       long running top will eat a lot of memory
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 16 13:20:00 +0000 2006
>Originator:     Bruce ONeel
>Release:        Current 3.99.15, built from about 28 Jan 2006
>Organization:
None what so ever
>Environment:
NetSBD taschhorn 3.99.15 NetBSD 3.99.15 (GENERIC_LAPTOP) #0: Mon Feb 13 03:47:55 UTC 2006 edoneel@biasca.edoneel.ch:/home/edoneel/current/i386/usr/src/sys/arch/i386/compile/obj/GENERIC_LAPTOP ie86
>Description:
This is has been observered on both i386 and sparc, both built from the same daily snapshot source tar files.

Top starts about about 180k for SIZE, and then, over time (hours) increases until it is taking megabytes.  On a sparc system after about 24 hrs it takes 80meg or so.  This does seem a bit excessive and is also new behavior.
>How-To-Repeat:
top

wait a few hours

look at the memory usage of top.

It seems to be related to the number of processes created and destroyed.  I've noticed it on busy systems running build.sh and other software builds.
>Fix: