Subject: Re: UBC, interactive performance, etc
To: None <chuq@chuq.com, eeh@netbsd.org>
From: None <eeh@netbsd.org>
List: tech-kern
Date: 04/04/2001 05:37:28
	> Chuq's performance patch, as I understand it, tries to insure the system
	> retains a minimum number of pages of a specific type.  I prefer to try
	> something that tries to predict the likelyhood of reuse rather than put
	> restrictions on the number of pages of any particular type in use.

	ok, what algorithm would you use to predict the likelihood of reuse?
	no one has tried to justify one algorithm or another on this basis so far.

That's a bit tough.  First, I would observe that in general, buffer cache
pages that were just written to are unlikely to be used again soon.  Most 
programs write something then move on.  But then someone else will bring
up the temporary files between compiler stages to refute that.....

Another option would be to track more information than last access, say 
the rate that a page gets accessed.  But then if the page is reclaimed
or swapped out we lose the statistics....

OTOH, there is the idle process problem.  Say I'm editiong a file while
running a compile in the background.  Then I step away for 5 minutes.  
The kernel can't tell if I'll be gone for 5 minutes or 5 hours.  For the
former, I don't want the editor's pages re-used.  For the latter it probably
doesn't really matter.

This is not an easy problem.

Eduardo