Contributed by jose on from the throroughly-untested dept.
I've created my own UBC (unified buffer cache) patch. I expect it's not perfect, but seems to be working for me. Instead of using the UBC branch, I took the original UBC import and rolled it forward to today's current. Patch applies against today's cvs co -rHEAD.
1. faster. compiling a kernel:
UBC : 517.178u 41.811s 9:58.91 93.3% 0+0k 121+615io 129pf+0w
current : 522.022u 40.335s 10:15.73 91.3% 0+0k 5877+12957io 729pf+0w
compiling is hardly disk bound. expect a bigger boost for apps that
have a large disk working set. 2. OpenBSD is essentially the last OS
that lacks a variable sized disk cache. This brings us in line.
1. I haven't fully tested it, and it's not even close to being synced
with NetBSD yet. Also some parts, such as NFS, aren't included. 2.
Even current NetBSD has some problems were the buffer cache can grow out
of control and evict pages from the programs you're using.
The patch is only for i386 right now. The changes for sparc and other
archs were fairly complicated and I can't test them, and it probably
doesn't matter much for 95% of you. It also, as noted, doesn't fix up
NFS, which I'm not using and is large and complicated. It will wait for
a later day. I patched miscfs/*, msdosfs, and ufs/*. I don't really
have the means of doing strenuous testing. I do know that it will fall
over if you run out of memory, but stock OpenBSD has the same problem.
I can use it for all the same tasks I typically use my system, and it's
prefectly fine, though.
Get it at http://www.zeitbombe.org/ubc.diff.gz
The diff is large. 26000 lines, split 50/50 between UVM and rest of
kernel. 200K compressed. The kernel configuration I used for testing is
in the patch, though you'll almost certainly need to edit it.
DISCLAIMER: I did this mainly for self-interest, and because I want UBC
and I want it now. :). Since it's done, I figured I could share, but
don't think that the OpenBSD developers have anything to do with this.
(Other than the fact that they wrote OpenBSD of course.) It is not
From here, I'm going to fix NFS too, and then start pulling in more of
the NetBSD changes. If others are interested in working on an
unofficial UBC project, maybe we could put something together.
This patch differs from the
branch of the kernel source tree, which
has been slowly
working on (among
many other things
You should know that this patch from Ted is highly experimental, could
lead to big system instability for you, is for i386 only, is wholly
unsupported by the official OpenBSD team, and can lead to permanent hair
loss (just kidding about the last one). However, if this sort of thing
interests you and you want to learn more about kernel internals, nothing
works as a learning motivator like trying to fix what's broken.
(Comments are closed)