From owner-freebsd-hackers Mon Jun 12 16:58:59 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 876BC37B818 for ; Mon, 12 Jun 2000 16:58:55 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id QAA35805; Mon, 12 Jun 2000 16:58:51 -0700 (PDT) (envelope-from dillon) Date: Mon, 12 Jun 2000 16:58:51 -0700 (PDT) From: Matthew Dillon Message-Id: <200006122358.QAA35805@apollo.backplane.com> To: "Daniel C. Sobral" Cc: David Gilbert , freebsd-hackers@FreeBSD.ORG Subject: Re: Worst case swapping. References: <14660.3153.658226.142964@trooper.velocet.net> <39453CC0.C19BB2CD@newsguy.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :David Gilbert wrote: :> :> I'm positive that its not a case of the working set being larger than :> physical memory; it's one of choice of page to swap. : :You are positively wrong, then. :-) Active pages are _always_ last :resort with the algorithm FreeBSD uses. : :You mention Netscape is the only active application on another mail... :Well, there is X too, isn't there? : :> Has anyone done any thinking about this behaviour? It occurs with :> varying degree to many applications. : :I have only seen something like this with Netscape. I could probably :trace it to Netscape running Java or Javascript, but I have never tried. :... :-- :Daniel C. Sobral (8-DCS) I think the issue with netscape may be memory fragmentation, but in order for it to thrash the system it would need a much larger VSZ (virtual size). I can imagine a run size (RSS) in the range given but I would expect the VSZ (virtual size) to be much larger. One of the reasons I would like to see an actual 'ps axl' output during one of these heavy paging periods rather then someone's analysis of the output, is to check things like this. With a very large virtual size it is possible for a single program to thrash the machine. This sort of thrashing occurs when the program accesses 'most' of its memory footprint randomly due to memory fragmentation within the program's own memory space--- which is often what you get when you have memory leaks. Also, re: the X server... beware that X maps video cards so if you have a 32MB video card (like a voodoo 3 2000), 48MB of the RSS you see for X will actually be device mappings. 0 217 216 0 2 0 62476 53724 select S ?? 215:24.90 /usr/X11R6/b... So my X server is only 62-48 = 14MB VSZ, 54-48 = 6MB RSS. Finally, FreeBSD will *NOT* steal pages from programs that have *just become* idle in order to satisfy requests from programs still active. It takes a while (a few seconds to a few minutes, depending) for idle program pages to become reusable. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message