<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ongkar Dasgupta</title>
    <description>The latest articles on DEV Community by Ongkar Dasgupta (@celestialglitch).</description>
    <link>https://dev.to/celestialglitch</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3831357%2Fa9cbc5f7-b8f4-4443-bdb8-eb94a35b7b09.png</url>
      <title>DEV Community: Ongkar Dasgupta</title>
      <link>https://dev.to/celestialglitch</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/celestialglitch"/>
    <language>en</language>
    <item>
      <title>Before billion-parameter neural networks, there was a simpler question - can a machine learn from experience? In 1958, Rosenblatt explored it with the perceptron. I went back to the original paper without any AI support to understand how modern AI began.</title>
      <dc:creator>Ongkar Dasgupta</dc:creator>
      <pubDate>Tue, 25 Aug 2026 06:47:17 +0000</pubDate>
      <link>https://dev.to/celestialglitch/before-billion-parameter-neural-networks-there-was-a-simpler-question-can-a-machine-learn-from-33cp</link>
      <guid>https://dev.to/celestialglitch/before-billion-parameter-neural-networks-there-was-a-simpler-question-can-a-machine-learn-from-33cp</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/celestialglitch/the-perceptron-when-a-machine-could-learn-from-experience-a0d" class="crayons-story__hidden-navigation-link"&gt;The Perceptron: When a Machine Could Learn from Experience&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/celestialglitch" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3831357%2Fa9cbc5f7-b8f4-4443-bdb8-eb94a35b7b09.png" alt="celestialglitch profile" class="crayons-avatar__image" width="420" height="420"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/celestialglitch" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Ongkar Dasgupta
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Ongkar Dasgupta
                
                
              
              &lt;div id="story-author-preview-content-4481587" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/celestialglitch" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3831357%2Fa9cbc5f7-b8f4-4443-bdb8-eb94a35b7b09.png" class="crayons-avatar__image" alt="" width="420" height="420"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Ongkar Dasgupta&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/celestialglitch/the-perceptron-when-a-machine-could-learn-from-experience-a0d" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Aug 25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/celestialglitch/the-perceptron-when-a-machine-could-learn-from-experience-a0d" id="article-link-4481587"&gt;
          The Perceptron: When a Machine Could Learn from Experience
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag crayons-tag--filled  " href="/t/discuss"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;discuss&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/machinelearning"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;machinelearning&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/beginners"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;beginners&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/celestialglitch/the-perceptron-when-a-machine-could-learn-from-experience-a0d#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              &lt;span class="hidden s:inline"&gt;Add&amp;nbsp;Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            5 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>ai</category>
      <category>computerscience</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>The Perceptron: When a Machine Could Learn from Experience</title>
      <dc:creator>Ongkar Dasgupta</dc:creator>
      <pubDate>Tue, 25 Aug 2026 06:30:46 +0000</pubDate>
      <link>https://dev.to/celestialglitch/the-perceptron-when-a-machine-could-learn-from-experience-a0d</link>
      <guid>https://dev.to/celestialglitch/the-perceptron-when-a-machine-could-learn-from-experience-a0d</guid>
      <description>&lt;p&gt;The year is 1958. Electronic computers are found in some rooms, punch cards clatter through readers, and the idea of a “thinking machine” belongs more to science fiction than to engineering. One day, &lt;strong&gt;Frank Rosenblatt&lt;/strong&gt; publishes a paper that changes the direction of the field of thinking machines : " &lt;strong&gt;The Perceptron: A Probabilistic Model for Information Storage and Organization in the Brain.&lt;/strong&gt;"&lt;/p&gt;

&lt;p&gt;At this moment, most machines are built to follow explicit instructions. If you want a device to behave in a certain way, you must design every rule in advance. There is no standard notion of a system that can adjust its own internal parameters based on " experience ". Rosenblatt’s work proposes something different. It proposes a machine whose response to an input can change as it encounters more examples, without requiring every rule to be manually specified.&lt;/p&gt;

&lt;p&gt;He calls this machine &lt;em&gt;&lt;strong&gt;the perceptron&lt;/strong&gt;&lt;/em&gt;. To explain its organization, Rosenblatt considers a version that responds to visual patterns. An image first falls on a simple artificial retina, made of &lt;em&gt;&lt;strong&gt;sensory points&lt;/strong&gt;&lt;/em&gt; that react to the &lt;em&gt;&lt;strong&gt;incoming stimulus&lt;/strong&gt;&lt;/em&gt;. These &lt;em&gt;sensory points&lt;/em&gt; send signals to units in the &lt;em&gt;projection area&lt;/em&gt;. Some incoming signals push a unit toward becoming active, while others push against it. Rosenblatt calls these &lt;em&gt;&lt;strong&gt;excitatory&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;inhibitory&lt;/strong&gt;&lt;/em&gt; connections. We can think of the unit as adding these positive and negative influences together. If the final amount is large enough to cross a certain threshold, the unit fires. Otherwise, it remains inactive. The active units pass signals to another group of units called &lt;strong&gt;the association area&lt;/strong&gt;, and finally toward one of the several possible &lt;strong&gt;response units&lt;/strong&gt;.&lt;br&gt;
Figure 1 (taken from official paper) shows this complete path clearly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxjk47embg9b2kkujcflw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxjk47embg9b2kkujcflw.png" alt=" " width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking at the figure from left to right, the retina receives the input.&lt;br&gt;
Its signals travel through the &lt;em&gt;projection area&lt;/em&gt; A1 to the &lt;em&gt;association area&lt;/em&gt; A2, and from there toward the possible responses R1,R2,…,Rn. Please note that the &lt;em&gt;projection area&lt;/em&gt; is not much worth for our further discussion, as it is specific to the example mentioned above.&lt;/p&gt;

&lt;p&gt;One thing to note here is that Rosenblatt explicitly labels some connections as &lt;em&gt;random&lt;/em&gt;. This does not mean that the machine produces random answers. It means that he does not carefully choose beforehand which unit in one area should connect to which unit in the next. Different inputs will therefore activate different, partly overlapping groups of association units. Learning happens later by changing how effectively the active units can influence the responses.&lt;/p&gt;

&lt;p&gt;To understand this, imagine showing the perceptron the same kind of pattern several times. Each time the pattern appears, a particular group of association units becomes active and one of the response units eventually responds. If we now &lt;em&gt;&lt;strong&gt;reinforce&lt;/strong&gt;&lt;/em&gt; that response - which essentially means telling the system that this is the response we want, something inside the perceptron changes. Rosenblatt gives each association unit a numerical value , and &lt;em&gt;reinforcement&lt;/em&gt; changes the values of the units that were active. &lt;strong&gt;So when a similar pattern appears again and activates many of those same units, they no longer influence the response exactly as they did before. The response that was reinforced has now become more likely.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now notice what has happened. Nobody went inside the perceptron and added a rule saying, &lt;em&gt;“When you see this pattern again, choose this response.”&lt;/em&gt; The only thing that changed was the numerical values of some association units. Yet when the pattern appeared again, the machine was more likely to respond differently because of those changed values. This is the key learning of this paper - &lt;em&gt;&lt;strong&gt;an experience changes something inside the machine, and that change affects what happens during the next experience.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But something even more interesting can happen. The next input does not have to be exactly the same as one seen before. Suppose a new pattern is similar enough that it activates some of the same association units whose values were changed during learning. &lt;strong&gt;Those changed units are still there.&lt;/strong&gt; They can therefore influence the response even though this exact pattern has never appeared before. So now Rosenblatt can ask a much more important question. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Can the perceptron learn from the examples it has experienced and use those changes to respond correctly to a new example?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Rosenblatt studies exactly this distinction mathematically. He considers two values &lt;strong&gt;Pr&lt;/strong&gt; and  &lt;strong&gt;Pg&lt;/strong&gt;. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Pr = probability of correctly responding to something already learned&lt;br&gt;
Pg =probability of correctly responding to a new member of the same class&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If the perceptron simply remembers its previous examples, we might expect &lt;strong&gt;Pr&lt;/strong&gt; to improve while &lt;strong&gt;Pg&lt;/strong&gt; remained poor. Rosenblatt finds that, as the system learns from more examples, both probabilities can approach the same limit :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Pr⟶ P∗   and   Pg ⟶ P∗&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;where P∗ represents the &lt;em&gt;limiting probability of a correct response&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In other words, the probability of correctly handling a &lt;em&gt;new&lt;/em&gt; member of the class can eventually approach the same level as the probability of correctly handling examples seen during learning.&lt;/strong&gt; In the paper, Rosenblatt further argues that this limiting probability &lt;br&gt;
&lt;strong&gt;P∗&lt;/strong&gt; can be brought closer to 1 by increasing the number of association units in the system.&lt;/p&gt;

&lt;p&gt;This is called &lt;em&gt;&lt;strong&gt;generalization&lt;/strong&gt;&lt;/em&gt;. If the perceptron learns from several similar members of a class, whatever it has learned can help it respond correctly to another member it has never seen before. In the future, the distinction between performing well on examples seen during learning and performing well on new examples from the same class is an idea that will remain central throughout the rest of &lt;em&gt;machine learning&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;However, Rosenblatt himself also points to a boundary. The perceptron can learn patterns and associations, but the same becomes difficult in problems involving relationships. He gives examples such as identifying “the object left of the square” or remembering “the pattern that appeared before the circle.” For such problems, Rosenblatt concludes that &lt;em&gt;“some system, more advanced in principle than the perceptron”&lt;/em&gt; would be required. &lt;/p&gt;

&lt;p&gt;This paper essentially teaches us something that now sounds obvious, but was anything but obvious in 1958. &lt;br&gt;
&lt;strong&gt;A machine does not have to be given a separate rule for every situation it may encounter. Its internal numerical state can change through experience, and what changes during learning can help it respond even to inputs it has never seen before.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The perceptron could not learn every kind of relationship, but it had established the idea we needed first i.e &lt;strong&gt;a machine could learn&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Stay tuned for our next paper in the sequence that carries the AI journey forward !&lt;/p&gt;

&lt;p&gt;Rosenblatt's Paper Link : &lt;a href="https://web.engr.oregonstate.edu/%7Ehuanlian/teaching/ML/2020spring/extra/rosenblatt-1958.pdf" rel="noopener noreferrer"&gt;https://web.engr.oregonstate.edu/~huanlian/teaching/ML/2020spring/extra/rosenblatt-1958.pdf&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>beginners</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How does a database know where its data is ?</title>
      <dc:creator>Ongkar Dasgupta</dc:creator>
      <pubDate>Sun, 09 Aug 2026 13:54:52 +0000</pubDate>
      <link>https://dev.to/celestialglitch/how-does-a-database-know-where-its-data-is--50ma</link>
      <guid>https://dev.to/celestialglitch/how-does-a-database-know-where-its-data-is--50ma</guid>
      <description>&lt;p&gt;Recently, a quite an interesting research paper titled &lt;em&gt;&lt;strong&gt;Virtual-Memory Assisted Buffer Management in Tiered Memory&lt;/strong&gt;&lt;/em&gt;, authored by &lt;strong&gt;&lt;em&gt;Yeasir Rayhan and Walid G. Aref&lt;/em&gt;&lt;/strong&gt; came out in the database management ecosystem. Let us discuss about it in this article !&lt;/p&gt;

&lt;p&gt;Instead of quickly summarizing what the authors built and listing their results, it would be great to understand the problem itself. &lt;/p&gt;

&lt;p&gt;Although we won't go into every implementation detail of the paper, we will try to go deep enough to see why each idea becomes necessary. So, please bear with me in this journey. &lt;/p&gt;

&lt;p&gt;We will start from a very ordinary database query, encounter one problem, solve it, see what new problem that solution creates, and keep following the trail. Interestingly, that trail will take us from &lt;em&gt;databases&lt;/em&gt; to &lt;em&gt;RAM&lt;/em&gt;, &lt;em&gt;virtual memory&lt;/em&gt;, &lt;em&gt;page tables&lt;/em&gt;, &lt;em&gt;the TLB&lt;/em&gt;, and eventually even a modification of &lt;em&gt;Linux's page migration mechanism itself&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Let's begin!&lt;/p&gt;

&lt;p&gt;Every time we search for a record, update a value, or run a query on a large database, the processor eventually has to access the corresponding data from somewhere in the machine. Right?&lt;/p&gt;

&lt;p&gt;Quite a substantial portion of this database may be stored persistently on a &lt;em&gt;solid‑state drive (SSD)&lt;/em&gt;, where it can be stored safely for the long term. However, frequent reading from the &lt;em&gt;SSD&lt;/em&gt; would be far too slow. So the  &lt;em&gt;Database Management System (DBMS)&lt;/em&gt;, the software that manages this database, keeps the most frequently accessed data in the computer's main memory (&lt;em&gt;RAM&lt;/em&gt;), where the processor can access it much faster.&lt;/p&gt;

&lt;p&gt;This already creates a very interesting problem. &lt;/p&gt;

&lt;p&gt;A full fledged database contains far more data than what can fit in &lt;em&gt;RAM&lt;/em&gt; all at once. The &lt;em&gt;DBMS&lt;/em&gt; therefore has to keep track of what is currently in RAM, what is still on the &lt;em&gt;SSD&lt;/em&gt;, and where the required data can be found when a database query asks for it. &lt;/p&gt;

&lt;p&gt;Modern servers make this problem even more interesting because there could be additional kinds of memory between these two extremes of &lt;em&gt;RAM&lt;/em&gt; and &lt;em&gt;SSD&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;And this is exactly what we are going to explore -&lt;br&gt;
&lt;strong&gt;&lt;em&gt;How does a DBMS keep track of data as it moves across these different kinds of memory?&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;What are these additional kinds of memory?&lt;br&gt;
In modern servers, memory can be distributed across different hardware locations. There would be two such cases that are particularly relevant in this discussion.&lt;br&gt;
Firstly, servers can contain multiple processor sockets, each holding a CPU package with directly attached main memory, typically &lt;em&gt;DRAM (Dynamic Random-Access Memory)&lt;/em&gt;. From the perspective of a processor running on one socket, its directly attached &lt;em&gt;DRAM&lt;/em&gt; is its &lt;em&gt;local RAM&lt;/em&gt;. It can also access &lt;em&gt;DRAM&lt;/em&gt; attached to another socket, although that access is generally slower.&lt;/p&gt;

&lt;p&gt;Secondly, we have another kind of memory access method called &lt;em&gt;Compute Express Link (CXL)&lt;/em&gt;. &lt;em&gt;CXL&lt;/em&gt; is a high-speed interconnect that allows a processor to access additional memory attached through a &lt;em&gt;CXL&lt;/em&gt; device, rather than limiting it to the &lt;em&gt;RAM&lt;/em&gt; directly attached to the processor itself. One thing to note however is : From the processor's point of view, this additional memory can still be accessed using ordinary memory reads and writes but reaching it generally takes longer than reaching local &lt;em&gt;RAM&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;Memory resources of these two kinds including &lt;em&gt;DRAM&lt;/em&gt; attached to another processor socket and CXL-attached memory are broadly referred to in the paper as &lt;em&gt;remote memory (RMem)&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;So at this moment of study, our &lt;em&gt;DBMS&lt;/em&gt; has quite a lot of choices. Instead of keeping data either in local &lt;em&gt;RAM&lt;/em&gt; or on the much slower &lt;em&gt;SSD&lt;/em&gt;, it can use RMem as an intermediate option. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;How would you connect all of them ?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Simple. Data that is needed very frequently can stay in local &lt;em&gt;RAM&lt;/em&gt;. When local &lt;em&gt;RAM&lt;/em&gt; starts filling up, some data can be moved to &lt;em&gt;RMem&lt;/em&gt; instead of being pushed all the way back to the &lt;em&gt;SSD&lt;/em&gt;. And if that data becomes frequently needed again, it can be moved back into local RAM. &lt;br&gt;
We have essentially gone from a two-level arrangement,' RAM - SSD ', to a three-level management ' RAM - RMem - SSD '.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0bzec9b1ki0wyizp69fp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0bzec9b1ki0wyizp69fp.png" alt="Our 3 level arrangement" width="597" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;But what exactly are we moving between these places?&lt;/strong&gt;&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;A DBMS does not normally move an individual database record every time it needs one (quite obvious!). Instead, it organizes the database into fixed-size chunks called &lt;em&gt;database pages&lt;/em&gt;. A page can contain multiple records, and each page is identified by a &lt;em&gt;Page Identifier (PID)&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;So when a query eventually needs some data, the &lt;em&gt;DBMS&lt;/em&gt; first needs the corresponding page. And because that page could now be in local &lt;em&gt;RAM&lt;/em&gt;, somewhere in &lt;em&gt;RMem&lt;/em&gt;, or only on the &lt;em&gt;SSD&lt;/em&gt;, we finally arrive at a more technical version of the problem we started with in our title: &lt;br&gt;
&lt;em&gt;&lt;strong&gt;given a PID, how does the DBMS efficiently find where its page currently is?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;One straightforward way is to maintain a &lt;em&gt;Hash Table&lt;/em&gt; inside the &lt;em&gt;DBMS&lt;/em&gt;. We can think of it as a lookup structure where the &lt;em&gt;DBMS&lt;/em&gt; stores an entry connecting each page currently kept in memory to the address through which that page can be accessed. In simplified form, it looks something like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;PID 42 → memory address X&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now suppose a query needs &lt;em&gt;Page 42&lt;/em&gt;. The DBMS cannot simply access &lt;em&gt;Page 42&lt;/em&gt; directly. It first takes &lt;em&gt;PID 42&lt;/em&gt;, searches the &lt;em&gt;Hash Table&lt;/em&gt;, obtains 'X', and only then accesses the page through that address. So before reaching the actual database page, we have introduced an additional lookup:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;PID → Hash Table → memory address → actual page&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The issue here is that page accesses happen continuously while a database is serving queries. At large scale, repeatedly searching this &lt;em&gt;Hash Table&lt;/em&gt; introduces additional costs for the processor. &lt;br&gt;
This raises our next question in this journey: &lt;strong&gt;&lt;em&gt;if the purpose of the Hash Table is ultimately to translate a page identifier into a memory address, does the DBMS really need to perform that translation itself?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Well, it goes like our computer already has another mechanism whose entire job involves translating addresses: &lt;strong&gt;virtual memory&lt;/strong&gt; !&lt;/p&gt;

&lt;p&gt;When a program uses a memory address, that address is generally not the actual physical location of the data inside a &lt;em&gt;RAM&lt;/em&gt; chip. Instead, the program works with a virtual address.&lt;/p&gt;

&lt;p&gt;The processor translates this virtual address into a physical address using mappings maintained by the operating system in a structure called the &lt;em&gt;Page Table&lt;/em&gt;. In a simplified form, we have something like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;virtual address X → Page Table → physical location A&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Why introduce this extra layer at all?&lt;/strong&gt; Because now the address visible to a program and the actual physical location of its data no longer have to be the same thing. &lt;/p&gt;

&lt;p&gt;Suppose some data currently lives at physical location A and the program accesses it through virtual address X. If the operating system later moves that data to physical location B, it can simply update the mapping:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;X → A&lt;br&gt;
becomes&lt;br&gt;
X → B&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The program can still continue accessing X exactly as before. It does not need to know that the physical location underneath X has changed. And this gives us a very interesting possibility for our next database problem: &lt;strong&gt;&lt;em&gt;What if a database page could similarly keep one fixed virtual address even while its actual physical location changes?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is exactly the idea behind an earlier system called &lt;em&gt;vmcache&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Instead of maintaining a &lt;em&gt;Hash Table&lt;/em&gt; that repeatedly tells the &lt;em&gt;DBMS&lt;/em&gt; where each database page is located, &lt;em&gt;vmcache&lt;/em&gt; reserves a large range of virtual addresses and gives every database page its own fixed virtual address. &lt;/p&gt;

&lt;p&gt;Suppose Page 42 is assigned virtual address X. That relationship does not change during the lifetime of the page:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;PID 42 → virtual address X&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If Page 42 is currently present in RAM, the OS Page Table takes care of the remaining translation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;PID 42 → virtual address X → Page Table → physical location A&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The &lt;em&gt;Hash Table&lt;/em&gt; lookup issue is solved ! The &lt;em&gt;DBMS&lt;/em&gt; knows the fixed virtual address associated with the page, while the operating system's existing &lt;em&gt;Page Table&lt;/em&gt; tells the processor where the page actually resides in physical memory ( there are two different scopes now !).&lt;/p&gt;

&lt;p&gt;But what happens if Page 42 is not in &lt;em&gt;RAM&lt;/em&gt; at all and currently exists only on the &lt;em&gt;SSD&lt;/em&gt;? There would be no valid physical RAM location for X to point to. When the program tries to access X, the processor detects that the required page is not currently present in memory and triggers what is called a &lt;em&gt;page fault&lt;/em&gt;. This transfers control to the operating system, allowing &lt;em&gt;vmcache&lt;/em&gt; to bring the required database page from the SSD into RAM. Once loaded, the OS installs the corresponding virtual-to-physical mapping, and access can continue.&lt;/p&gt;

&lt;p&gt;So &lt;em&gt;vmcache&lt;/em&gt; already gives us an elegant solution when there are two levels RAM, followed by, SSD. &lt;br&gt;
But &lt;em&gt;Modern servers may also have _RMem&lt;/em&gt; sitting between them._&lt;/p&gt;

&lt;p&gt;Now Page 42 does not simply have two possibilities, “in RAM” or “on SSD.” It may move like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;local RAM → RMem → local RAM → RMem → SSD&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And this leads directly to the question investigated in the paper we are discussing: &lt;strong&gt;&lt;em&gt;Can the fixed-virtual-address idea of vmcache still work when the physical page is continuously moving across multiple memory tiers?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The authors extend &lt;em&gt;vmcache&lt;/em&gt; for exactly this setting and call the resulting system &lt;em&gt;vmcacheⁿ&lt;/em&gt;, where the &lt;em&gt;n&lt;/em&gt; represents the possibility of having multiple memory tiers.&lt;/p&gt;

&lt;p&gt;They preserve the same fundamental idea:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The virtual address of a database page remains fixed throughout its lifetime, while the physical memory backing that address is allowed to change.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjayuj7nhayu3vxgy8w5b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjayuj7nhayu3vxgy8w5b.png" alt="The central idea of vmcacheⁿ " width="800" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sounds like our problem is solved then?&lt;/p&gt;

&lt;p&gt;Not quite. We have decided that the virtual address will remain fixed, but the actual page may still have to move between local RAM and RMem. If Page 42 is currently in local RAM and the DBMS decides that it should now reside in RMem, &lt;strong&gt;something still has to physically move that page from one memory tier to the other and change the mapping underneath its fixed virtual address.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;To move Page 42 from local RAM to RMem, vmcacheⁿ needs to move the actual contents of that page to a physical location in RMem and then update the Page Table so that X points to this new location. The virtual address remains unchanged throughout this process. This movement of a page from one physical memory location to another is called &lt;strong&gt;page migration&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Linux already provides a system call called &lt;strong&gt;move_pages&lt;/strong&gt; for doing exactly this. vmcacheⁿ can give it a collection of pages along with the memory location where each should be moved. Linux performs the migrations and updates their Page Table mappings, while their virtual addresses remain unchanged. Even better, &lt;em&gt;&lt;strong&gt;move_pages&lt;/strong&gt;&lt;/em&gt; can migrate multiple pages in one call rather than requiring a separate request for every page.&lt;/p&gt;

&lt;p&gt;Our next problem got itself introduced here!&lt;/p&gt;

&lt;p&gt;Remember that the processor needs the Page Table to translate virtual addresses such as X into physical locations. Looking up the Page Table for every memory access would itself be slow, so processors keep recently used translations in a small and extremely fast cache called the &lt;strong&gt;Translation Lookaside Buffer (TLB)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Suppose the processor has cached:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;X → physical location A&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;vmcacheⁿ now migrates our page to RMem and the Page Table becomes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;X → physical location B&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The Page Table is correct, but the processor may still have the old X → A translation sitting in its TLB. That cached entry must therefore be invalidated before the new mapping can safely be used. And if several processor cores have cached the same translation, the operating system may need to make all of them discard it. This operation is known as a &lt;strong&gt;TLB shootdown&lt;/strong&gt;, and it is expensive because it can require interrupts between processor cores.&lt;/p&gt;

&lt;p&gt;Now imagine vmcacheⁿ continuously moving large numbers of database pages between local RAM and RMem. These invalidations start adding up. Linux's &lt;strong&gt;move_pages&lt;/strong&gt; already groups page migrations into batches, but by default it processes at most 512 pages in a migration batch. The authors realized that if more pages could be migrated together, the cost of TLB invalidation could be spread across a larger number of page movements.&lt;/p&gt;

&lt;p&gt;This observation led them to modify the Linux page-migration interface itself. They introduced a new system call called &lt;strong&gt;move_pages2&lt;/strong&gt;, which lets &lt;em&gt;vmcacheⁿ&lt;/em&gt; control how many pages are grouped into a migration batch. It also handles failures more flexibly. Instead of certain errors on one page which makes the remaining pages in the request to be skipped, &lt;strong&gt;move_pages2&lt;/strong&gt; can record that failure and continue attempting the other eligible migrations.&lt;/p&gt;

&lt;p&gt;And surprisingly, implementing &lt;strong&gt;move_pages2&lt;/strong&gt; required only about 150 lines of changes across four Linux kernel functions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Our question now is: does all of this actually make the database faster?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To find out, the researchers used a server with &lt;em&gt;two processor sockets&lt;/em&gt;. RAM attached to the processor running the workload acted as &lt;em&gt;local RAM&lt;/em&gt;, RAM attached to the other socket acted as &lt;em&gt;RMem&lt;/em&gt;, and a 960 GB NVMe SSD formed the final storage tier. So their experimental machine essentially gave them the same hierarchy we have been discussing:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Local RAM → RMem → SSD&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The amount of local &lt;em&gt;RAM&lt;/em&gt; was restricted to only 32 GB, forcing the system to decide what stays locally, what moves to &lt;em&gt;RMem&lt;/em&gt;, and what eventually has to be obtained from the SSD.&lt;/p&gt;

&lt;p&gt;The researchers then used two workloads. The first was &lt;strong&gt;TPC-C&lt;/strong&gt;, a standard benchmark that simulates transactions performed by a real database system, such as placing orders and processing payments. The second was a &lt;strong&gt;random-read workload&lt;/strong&gt;, where the system repeatedly requested data scattered across a large dataset. TPC-C shows whether &lt;em&gt;vmcacheⁿ&lt;/em&gt; improves the system as a whole, while random reads make page migration between local RAM and RMem much more prominent, allowing &lt;em&gt;move_pages2&lt;/em&gt; to be examined more directly.&lt;/p&gt;

&lt;p&gt;Let's focus on &lt;em&gt;TPC-C&lt;/em&gt; first.&lt;/p&gt;

&lt;p&gt;With TPC-C, &lt;em&gt;&lt;strong&gt;vmcacheⁿ achieved 1.67× higher throughput than vmcache with 2× RMem, increasing to 3.82× with 4× RMem&lt;/strong&gt;&lt;/em&gt;. More pages could remain in &lt;em&gt;RMem&lt;/em&gt; instead of requiring slower SSD accesses.&lt;/p&gt;

&lt;p&gt;But this improvement came from &lt;em&gt;vmcacheⁿ&lt;/em&gt; as a whole, not specifically from move_pages2. For TPC-C, &lt;em&gt;move_pages2&lt;/em&gt; performed similarly to the existing &lt;em&gt;move_pages&lt;/em&gt; because SSD accesses still accounted for a substantial part of the workload.&lt;/p&gt;

&lt;p&gt;The difference became clearer with random reads, where movement between local RAM and RMem mattered much more. Here, &lt;em&gt;move_pages2&lt;/em&gt; achieved &lt;strong&gt;1.42× higher query throughput and 1.32× higher page-migration throughput&lt;/strong&gt; than &lt;em&gt;move_pages&lt;/em&gt;. Its larger migration batches allowed the cost of &lt;strong&gt;TLB invalidation&lt;/strong&gt; to be spread across more page movements.&lt;/p&gt;

&lt;p&gt;However, the experiments revealed one important limitation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Adding RMem does not automatically make the database faster.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Moving pages between local &lt;em&gt;RAM&lt;/em&gt; and &lt;em&gt;RMem&lt;/em&gt; has a cost of its own. When RMem was small, this migration overhead could outweigh the benefit of avoiding SSD accesses. As RMem capacity increased, keeping more pages in memory became increasingly worth the cost of moving them.&lt;/p&gt;

&lt;p&gt;And that finally gives us an answer to the question we started with:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;How does a DBMS keep track of data as it moves across different kinds of memory?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In &lt;em&gt;vmcacheⁿ&lt;/em&gt;, the &lt;em&gt;DBMS&lt;/em&gt; does not need to explicitly translate each &lt;em&gt;PID&lt;/em&gt; into its changing physical address. Each database page is given a fixed virtual address, while the operating system's &lt;em&gt;Page Table&lt;/em&gt; keeps track of which physical memory currently backs that address. The page may move from local RAM to RMem and later back again, but the address used by the DBMS remains unchanged.&lt;/p&gt;

&lt;p&gt;The authors then solve the second problem created by this approach: moving those physical pages efficiently. Their move_pages2 system call gives &lt;em&gt;vmcacheⁿ&lt;/em&gt; greater control over how migrations are batched, helping minimise costs such as TLB invalidation when page migration becomes a major part of the workload.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The interesting idea behind this paper is that the researchers did not eliminate the cost of managing data across different memory speeds. They moved part of the tracking problem to a mechanism the computer already has, and then identified page migration as the new bottleneck created by that decision.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paper Reference:&lt;/strong&gt; Rayhan, Yeasir, and Walid G. Aref. "Virtual-Memory Assisted Buffer Management In Tiered Memory." In Proceedings of the 22nd International Workshop on Data Management on New Hardware, pp. 1-5. 2026.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paper Link:&lt;/strong&gt; &lt;a href="https://arxiv.org/abs/2603.03271" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2603.03271&lt;/a&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>computerarchitecture</category>
      <category>computerscience</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Trying to solve a frustrating problem: why is debugging AI systems still so unclear?</title>
      <dc:creator>Ongkar Dasgupta</dc:creator>
      <pubDate>Wed, 18 Mar 2026 11:50:59 +0000</pubDate>
      <link>https://dev.to/celestialglitch/trying-to-solve-a-frustrating-problem-why-is-debugging-ai-systems-still-so-unclear-1mbp</link>
      <guid>https://dev.to/celestialglitch/trying-to-solve-a-frustrating-problem-why-is-debugging-ai-systems-still-so-unclear-1mbp</guid>
      <description>&lt;p&gt;I’ve been thinking about something that keeps coming up when working with AI systems. When a model gives a wrong or weird output, it’s surprisingly hard to figure out what actually went wrong. Most of the time we’re digging through logs &lt;br&gt;
or guessing where things broke.&lt;br&gt;
As part of the AWS AI Ideas hackathon, I started building a concept called AutopsyAI. The idea is to look at the full pipeline from input to output and try to explain where things might have failed, instead of just showing the final result. It’s still early and not a full product yet, more like an attempt to explore whether this problem is worth solving in a structured way.&lt;br&gt;
Curious how others here deal with this. If you’ve worked with AI systems in production, how do you debug failures today? Does this feel like a real problem, or is it already solved better than I think?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fah2zxs9z8hw5t65ef44w.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fah2zxs9z8hw5t65ef44w.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please do checkout my article and support it!&lt;br&gt;
&lt;a href="https://builder.aws.com/content/3AeXXMtLdDuPwRL4xcEjJEBoQkB/aideas-autopsyai-the-missing-debugger-for-ai-systems" rel="noopener noreferrer"&gt;https://builder.aws.com/content/3AeXXMtLdDuPwRL4xcEjJEBoQkB/aideas-autopsyai-the-missing-debugger-for-ai-systems&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>discuss</category>
      <category>development</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
