Re: RAM Cache vs the Pageout Demon
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=IrdrdfA0RQme9hn0m3z1jWfKP+FU/09Yp8sSGzl6kpiI+hfrf4gfsLzOE0Ff+uzrB4KyfUWXHA2dI10h/CqDrMxU4hCTTf9pasR9qNXXxwXt0IbgDifNuvCVRYBoIL2wOK7dBoqhYpGGUgBeCBmNyBv5LDtOpsoh503u+BYwMXM= ; They can be based on disk data. The disk-based source data can come from any number of file-reading libraries, so turning off caching on a per-file basis isn't possible. It's certainly conceivable there could be a conflict between my RAM cache and the system file cache. In general, given a choice between paging out an apparently-inactive page from my process, or dropping a page from the file cache for a file requested by my app, it has to drop the (read-once!) file cache page 100% of the time. --- Paul Ripke <stix@stix.id.au> wrote:
On Fri, Oct 20, 2006 at 12:55:47PM -0700, Russ wrote:
My commercial app has a ram cache system for image sequence playback; images can be tens of megabytes and there can be gigabytes of them. On OS X, when the RAM cache is large, it looks like the darwin pageout demon is activating prematurely, paging out part of the RAM cache preemptively to meet its free-space target, even though there is no competing demand. Consequently, the app thrashes catastrophically to its knees.
I assume all these images are read in from disk - since you're doing your own caching, are you using F_NOCACHE with fcntl(2)? It may be that the aggressive file caching done by the kernel is fighting with your cache for RAM.
Cheers, -- Paul Ripke Unix/OpenVMS/TSM/DBA I love deadlines. I like the whooshing sound they make as they fly by. -- Douglas Adams
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Russ