1998Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Persistant storage.... My current idea. -->
<!--X-From-R13: X Q Znjerapr <pynjNhaqre.rate.ftv.pbz> -->
<!--X-Date: Sat, 04 Apr 1998 00:04:37 +0000 -->
<!--X-Message-Id: 199804040004.QAA49564#under,engr.sgi.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199804032342.PAA49609#under,engr.sgi.com -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Persistant storage.... My current idea.</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:claw#under,engr.sgi.com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00011.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00013.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00011.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00018.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00012">Author</A>
&nbsp;|&nbsp;<A HREF="#00012">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00012">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Persistant storage.... My current idea.</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev] Persistant storage.... My current idea. </LI>
<LI><em>From</em>: J C Lawrence &lt;<A HREF="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</A>&gt;</LI>
<LI><em>Date</em>: Fri, 03 Apr 1998 16:04:31 -0800</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Fri, 3 Apr 1998 15:47:57 PST8PDT 
J C Lawrence&lt;claw#under,engr.sgi.com&gt; wrote:

&gt; Forwarded to the list for Cynbe:

&gt; Every object is identifed by an abstract pointer.
...
&gt; This abstract pointer is in fact an integer containing two
&gt; bitfields: one specifies the object's size to the nearest power of
&gt; two.

&gt; For each size octave, I maintain a db file which is essentially an
&gt; array of records of that size.

&gt; Another bitfield in the abstract pointer gives the offset of the
&gt; record in question within the relevant file.

I'll note without comment (sorry, not enough time right now for a real
value add): This is interestingly similar to the systems used by the
Texas Persistant Store, and not terribly far from some of the
underpinnings of Arjuna.

Good Stuff.

&gt; The encoding I use actually allocates bigger offset fields to the
&gt; smaller octaves, since one is more likely to have (say) 1,000,000
&gt; 8-byte objects in a system than 1,000,000 1-megabyte objects. This
&gt; is pretty important in the 32-bit implementation, less so in the
&gt; 64-bit implementation.

I also found the size performance trade-offs and design considerations
charted in the tdbm docs of interest in this particular area.

&gt; The resulting design lets me read any object in the db into memory
&gt; in -exactly- one read(), which is pretty much provably optimal, and
&gt; likely to be at least twice the performance of many index-file based
&gt; designs.  (A factor of two in disk access speed just might matter to
&gt; some people... :)

This is very sewwt.  Damn.  I've been trying to polish my persistant
store model to reduce the bandwidth requirements and have been walking
about this basic idea in very tight concentrated circles without ever
cottoning on to it for weeks.

&lt;&lt;Yes, I'm going to be opeing Murkle to the public if I can get the
damned thing working again....&gt;&gt;

&gt; Meanwhile, I keep a cache buffer in ram of recently accessed
&gt; objects: I'm not comfortable with the time and space overhead of LRU
&gt; management, so instead I manage them essentially as a FIFO queue
&gt; that objects cycle through once loaded into cache: They are loaded
&gt; at one end and deleted at the other.  Since deleted objects will
&gt; still be in the OS file system cache in general, frequently used
&gt; objects will get 'read' back in very quickly, giving (I hope, no
&gt; performance studies yet) much of the performance of an LRU system in
&gt; practice, without much of the overhead.

I basically use a lightweight trellis table for the LRU cache stuff,
and then evaluate it only as needed.  I haven't profiled it, but it
*seems* cheap.  (Note to self: run profiler on DB state code)

-- 
J C Lawrence                               Internet: claw#null,net
(Contractor)                               Internet: coder#ibm,net
---------(*)                     Internet: claw#under,engr.sgi.com
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...

</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00011" HREF="msg00011.html">[MUD-Dev] Persistant storage.... My current idea.</A></STRONG>
<UL><LI><EM>From:</EM> J C Lawrence &lt;claw#under,engr.sgi.com&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00011.html">[MUD-Dev] Persistant storage.... My current idea.</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00013.html">Re: [MUD-Dev] Persistant storage.... My current idea.</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00011.html">[MUD-Dev] Persistant storage.... My current idea.</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00018.html">Re: [MUD-Dev] Persistant storage.... My current idea.</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00012"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00012"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>Re: [MUD-Dev] Persistant storage.... My current idea.</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00013" HREF="msg00013.html">Re: [MUD-Dev] Persistant storage.... My current idea.</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Sat 04 Apr 1998, 01:32 GMT
<UL>
<LI><strong><A NAME="00049" HREF="msg00049.html">Re: [MUD-Dev] Persistant storage.... My current idea.</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Tue 07 Apr 1998, 16:56 GMT
<UL>
<LI><strong><A NAME="00063" HREF="msg00063.html">Re: [MUD-Dev] Persistant storage.... My current idea.</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Wed 08 Apr 1998, 00:50 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</ul>
<LI><strong><A NAME="00011" HREF="msg00011.html">[MUD-Dev] Persistant storage.... My current idea.</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Fri 03 Apr 1998, 23:42 GMT
<UL>
<LI><strong><A NAME="00012" HREF="msg00012.html">Re: [MUD-Dev] Persistant storage.... My current idea.</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Sat 04 Apr 1998, 00:04 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00018" HREF="msg00018.html">Re: [MUD-Dev] Persistant storage.... My current idea.</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 04 Apr 1998, 23:21 GMT
</LI>
<LI><strong><A NAME="00019" HREF="msg00019.html">Re: [MUD-Dev] Persistant storage.... My current idea.</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 04 Apr 1998, 23:21 GMT
<UL>
<LI><strong><A NAME="00022" HREF="msg00022.html">Re: [MUD-Dev] Persistant storage.... My current idea.</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Sun 05 Apr 1998, 02:02 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00271" HREF="msg00271.html">[MUD-Dev] Persistant storage.... My current idea.</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 22 Apr 1998, 23:26 GMT
</LI>
</ul>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>