From owner-freebsd-hackers Thu Jul 29 2: 6:23 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dyson.iquest.net. (iq-ind-dns003-90.iquest.net [198.70.149.90]) by hub.freebsd.org (Postfix) with ESMTP id 522D6155A1 for ; Thu, 29 Jul 1999 02:05:50 -0700 (PDT) (envelope-from toor@dyson.iquest.net) Received: (from toor@localhost) by dyson.iquest.net. (8.9.3/8.9.3) id EAA57212; Thu, 29 Jul 1999 04:04:04 -0500 (EST) (envelope-from toor) Message-Id: <199907290904.EAA57212@dyson.iquest.net.> Subject: Re: Replace/rewrite reverse.c for tail(1) In-Reply-To: <64003B21ECCAD11185C500805F31EC030378660F@houston.matchlogic.com> from Charles Randall at "Jul 28, 1999 09:27:28 am" To: crandall@matchlogic.com (Charles Randall) Date: Thu, 29 Jul 1999 04:04:04 -0500 (EST) Cc: hackers@freebsd.org, toasty@dragondata.com (Kevin Day) From: "John S. Dyson" Reply-To: dyson@iquest.net X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Charles Randall said: > > Out of 128M of ram, it's swapped nearly everything else out to keep 85M of > this 400M file in ram, even though it will never touch it again. :) > > I see two possible fixes for this. One could be madvise'ing periodically > with MADV_DONTNEED. If I understand correctly, this would help a bit, right? > > Or, mmap smaller regions of the file, and keep moving the buffer. This would > also help with files exceeding mmap's limits. > > > Any thoughts? > Unless the ability has been removed recently, setting the physical memory soft limit can help a very little bit also: bash> ulimit -m 16384 can make a program a little more friendly to it's neighbors. The soft (in both senses) limit is mushy, but provides some hints when paging ensues. -- John | Never try to teach a pig to sing, dyson@iquest.net | it makes one look stupid jdyson@nc.com | and it irritates the pig. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message