From owner-freebsd-questions Wed May 27 15:30:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA17401 for freebsd-questions-outgoing; Wed, 27 May 1998 15:30:44 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from eagle.ns.net (root@eagle.ns.net [204.75.146.20]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA17227 for ; Wed, 27 May 1998 15:30:18 -0700 (PDT) (envelope-from rfg@monkeys.com) Received: from monkeys.com (segfault.monkeys.com [204.119.242.200]) by eagle.ns.net (8.8.5/8.8.5) with ESMTP id PAA14338; Wed, 27 May 1998 15:30:15 -0700 (PDT) Received: from monkeys.com (localhost [127.0.0.1]) by monkeys.com (8.8.8/8.8.5) with ESMTP id PAA27898; Wed, 27 May 1998 15:31:02 -0700 To: Doug White cc: questions@FreeBSD.ORG Subject: Re: How do I find out how much memory the kernel is using now? In-reply-to: Your message of Wed, 27 May 1998 14:09:15 -0700. X-Copyright: (c) 1998 Ronald F. Guilmette; All rights reserved. Date: Wed, 27 May 1998 15:31:02 -0700 Message-ID: <27896.896308262@monkeys.com> From: "Ronald F. Guilmette" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , you wrote : >FreeBSD (and UNIces in general) don't use memory the same way MicroSlop >systems do. FreeBSD will allocate all of system RAM to itself, or as >much as it can use. RAM is first allocated to the kernel then to user >programs. Everything left over is allocted to a disk cache, aka buffer >cache, that is dynamically sized according to system RAM demands. Yes, i knew all that. I was discounting the disk buffer cache. When `stsctl -a' told me I only had about 3.8 MB of ``user memory'' that still didn't sound at all correct. (But maybe it was... see below.) >> P.S. I am still hoping for an answer to my original question... How can >> I tell exactly how much memory the OS itself is using at any given >> instant in time? > >Define `OS itself'. You mean the kernel only, kernel+devices, ... ? Yup. >Top tends to give you the best measure but you have to interpret it right. > >You should be paying attention to swap. My swap line from top: > >Swap: 100M Total, 41M Used, 59M Free, 41% Inuse > >tells me that I shold have added some more swap when I brought my 2gig >drive online. I've seen this up to 60% and that makes me really jumpy. OK. Thanks. Now I'm getting somewhere. This is the kind of guidance I was looking for. (I dunno why I didn't think to run top earlier. Duh.) The results from top on my system are interesting and rather misleading. Due to some goofy partitioning left over from another project, I have a HUGE 1.5 GB swap partition. Top shows that (on average) I am only using about 1% of that, which superficially sounds quite modest and OK, until I looked more closely and saw that the truth of that matter is that I'm constantly using about 18 MB of swap... mostly due to a single big process that I know is thrashing its actual working set a lot. So at last I have my answer. I need to put at least 18 MB more main memory into this machine in order to get it to stop behaving like a whashing machine with a unbalanced load set to the `spin' cycle. :-) I'll be doing that forthwith. Thanks for the help! -- Ron Guilmette, Roseville, California ---------- E-Scrub Technologies, Inc. -- Deadbolt(tm) Personal E-Mail Filter demo: http://www.e-scrub.com/deadbolt/ -- Wpoison (web harvester poisoning) - demo: http://www.e-scrub.com/wpoison/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message