From owner-freebsd-questions@FreeBSD.ORG Fri Sep 24 17:11:17 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 73B5616A4CE for ; Fri, 24 Sep 2004 17:11:17 +0000 (GMT) Received: from web53808.mail.yahoo.com (web53808.mail.yahoo.com [206.190.36.203]) by mx1.FreeBSD.org (Postfix) with SMTP id EEE0043D39 for ; Fri, 24 Sep 2004 17:11:16 +0000 (GMT) (envelope-from stigmata_blackangel@yahoo.com) Message-ID: <20040924165952.62558.qmail@web53808.mail.yahoo.com> Received: from [206.13.45.178] by web53808.mail.yahoo.com via HTTP; Fri, 24 Sep 2004 09:59:52 PDT Date: Fri, 24 Sep 2004 09:59:52 -0700 (PDT) From: Gregor Mosheh To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: please educate me on memory usage X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 17:11:17 -0000 I was looking at my top output and was surprised to see that the bulk of my 512 MB of memory was in use, since the server really has fairly little running. It's not a problem, but I was wanting some clarification on where this memory was being used, for my own education. The original goal was that I had figured that a lot of memory would be unused since so little is running, and perhaps I could allocate some more to Postgres. Apparently nowt, but I don't quite understand all the intricacies of what *is* using my memory. 35 processes: 1 running, 34 sleeping CPU states: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle Mem: 158M Active, 207M Inact, 80M Wired, 20M Cache, 60M Buf, 33M Free Swap: 2000M Total, 6848K Used, 1994M Free So, 158 MB of memory in use. Does that include anything other than process' memory, e.g. shared memory, kernel memory, some of the fs buffer? If I add up the VSZ column from 'ps aux' I get 110 MB. The server's only processes of interest are MySQL, Postgres, and Apache httpd. There are cron, sendmail, etc. but these are all <1M usage according to both top and ps. MySQL has VSZ 38 MB and RSS 4 MB. Postgres (incl stats collectors) has VSZ 25 MB and RSS <1 MB. There's also the shared memory: ipcs agrees with my postgresql.conf settings: 2 MB of shared memory buffers. Apache 1.3 has 15 processes, each using 3.6 MB VSZ and 1.5 MB RSS. I was of the impression that the bulk of this memory was shared with the parent process, no? So where's the rest of the memory going? The 80M Wired is interesting, since I don't know where it's going. I presume that PG's 2 MB of shared buffers are wired (though I saw an email today that implied otherwise), but how could I track down the rest of it? __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail