From owner-freebsd-arch Thu May 17 22:58:35 2001 Delivered-To: freebsd-arch@freebsd.org Received: from blount.mail.mindspring.net (blount.mail.mindspring.net [207.69.200.226]) by hub.freebsd.org (Postfix) with ESMTP id 2E7C237B422 for ; Thu, 17 May 2001 22:58:30 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (pool0518.cvx7-bradley.dialup.earthlink.net [209.178.166.8]) by blount.mail.mindspring.net (8.9.3/8.8.5) with ESMTP id BAA21884; Fri, 18 May 2001 01:58:15 -0400 (EDT) Message-ID: <3B04BA0D.8E0CAB90@mindspring.com> Date: Thu, 17 May 2001 22:58:37 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Matt Dillon Cc: Rik van Riel , Charles Randall , Roger Larsson , arch@FreeBSD.ORG, linux-mm@kvack.org, sfkaplan@cs.amherst.edu Subject: Re: on load control / process swapping References: <200105161754.f4GHsCd73025@earth.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: X-Loop: FreeBSD.ORG Matt Dillon wrote: > Terry's description of 'ld' mmap()ing and doing all > sorts of random seeking causing most UNIXes, including > FreeBSD, to have a brainfart of the dataset is too big > to fit in the cache is true as far as it goes, but > there really isn't much we can do about that situation > 'automatically'. Without hints, the system can't predict > the fact that it should be trying to cache the whole of > the object files being accessed randomly. A hint could > make performance much better... a simple madvise(... > MADV_SEQUENTIAL) on the mapped memory inside LD would > probably be beneficial, as would madvise(... MADV_WILLNEED). I don't understand how either of those things could help but make overall performance worse. The problem is the program in question is seeking all over the place, potentially multiple times, in order to avoid building the table in memory itself. For many symbols, like "printf", it will hit the area of the library containing their addresses many, many times. The problem in this case is _truly_ that the program in question is _really_ trying to optimize its performance at the expense of other programs in the system. The system _needs_ to make page-ins by this program come _at the expense of this program_, rather than thrashing all other programs out of core, only to have the quanta given to these (now higher priority) programs used to thrash the pages back in, instead of doing real work. The problem is what to do about this badly behaved program, so that the system itself doesn't spend unnecessary time undoing its evil, and so that other (well behaved) programs are not unfairly penalized. Cutler suggested a working set quota (first in VMS, later in NT) to deal with these programs. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message