🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.linux.misc
5 messages
5 total messages Started by Carlos E. R. Fri, 09 Oct 2026 18:47
Re: Linux needs less fragmentation
#230
Author: Carlos E. R.
Date: Fri, 09 Oct 2026 18:47
133 lines
6977 bytes
On 2026-10-08 16:25, Andy Burns wrote:
> The Natural Philosopher wrote:
> 
>> SD caches a block when reading.
>>
>> And IIRC a larger page  when  writing
>>
>> Erase blocks are even larger
>>
>> IN all cases response shows no 'seek' delays.
>>
>> Writes are fully cached and written behind in SSD time. The 
>> application has no control, over that.
>>
>> Ultimately Linux cacheing is probably completely irrelevant.
> By themselves, SSDs have no concept of which blocks are in-use by the 
> host's filesystem, use of TRIM commands allow O/S to tell the internal 
> controller to mark unused blocks for coalescing into larger blocks for 
> erasing.
> 
> So no they don't care in terms of seek times, or needing traditional 
> defragging, but they do care in terms of avoiding extra writes during 
> garbage collection (blocks can't be overwritten, only re-written within 
> those larger erased blocks).
> 

I asked chatgpt (as a glorified documentation search engine):

Q: Have SSD disks an internal RAM cache, and what is it used for? I'm interested in normal read operations.

A: Yes. Many SSDs have internal RAM, but it is important to distinguish between RAM used for managing the SSD and RAM used to cache data. For normal read operations, the distinction matters quite a bit.

1. What memory does an SSD have?

1.1. DRAM cache

Some SSDs have a dedicated DRAM chip, typically hundreds of megabytes to several gigabytes in larger drives. It is volatile memory, just like your computer's RAM.

It is primarily used to store the SSD's internal mapping tables, which translate logical block addresses into physical NAND flash locations.

1.2. NAND flash memory

This is the actual nonvolatile storage where your files and data reside. Some SSDs also use portions of their NAND as a cache for writes, but that is a different function from DRAM.

1.3. Controller SRAM

The SSD controller itself typically has a small amount of fast SRAM. It holds temporary data, commands, and metadata while the controller processes requests. This is much smaller than a typical DRAM cache.


Not every SSD has dedicated DRAM. Many budget SSDs are DRAM-less and rely on the controller's internal memory and, in some NVMe designs, the computer's RAM through a feature called Host Memory Buffer (HMB).

2. What happens during a normal read?

Suppose your operating system requests 4 KB from a particular logical address on the SSD.

Operating system / application

Requests a logical block

          ↓

SSD controller

Looks up the logical-to-physical address mapping

          ↓

NAND flash

Reads the requested data from flash cells

          ↑

Data returned to the computer



The DRAM cache is useful mainly in the middle step. It can hold the mapping table so that the controller can quickly find where the requested data lives.

Without DRAM, the controller may need to retrieve mapping information from NAND itself, which can add latency. The exact impact depends on the SSD's design and workload.


3. Does the SSD cache the actual data being read?

It can, but this is not generally the main purpose of an SSD's DRAM.

There are three important cases:


Situation                         What happens
-----------                       ---------------


First read of a block             The SSD normally fetches the data from NAND flash.


Repeated read of the same block   It may be served from a controller buffer if the SSD has retained that data, but this is not guaranteed.


Repeated read of a file by
an application                    The operating system may serve the data from its own RAM cache, without accessing the SSD at all.


The third case is particularly important. Your computer's operating system typically uses otherwise available RAM to cache recently accessed file data. That cache can be much larger than the SSD's internal RAM.

Also, an SSD may perform internal read-ahead or buffer data temporarily, but its controller does not necessarily retain previously read user data for long-term caching.


4. How much does internal RAM improve read performance?

It depends on the workload.

  * Random reads: DRAM can help by making address translation faster, especially when the mapping information would otherwise require extra flash accesses.

  * Sequential reads: The SSD can usually read efficiently from NAND in either case. DRAM may help with mapping and request management, but it is not necessarily the main performance bottleneck.

  * Repeated reads: The operating system's RAM cache often has a much larger effect than the SSD's internal DRAM.

  * Large working sets with random access: A DRAM-equipped SSD can have an advantage, particularly when its mapping tables are large and cannot be held entirely in the controller's small internal memory.

A DRAM-less SSD can still deliver excellent read performance. Modern controllers and HMB can reduce the performance gap substantially for some workloads.


The key takeaway

If you're interested specifically in normal reads, an SSD's internal DRAM is primarily an address-translation cache, not a general-purpose cache of recently read file contents. The NAND flash holds the actual data, while the computer's own RAM is usually the more significant cache for repeated file reads.

One final distinction: a write cache can improve write speed by temporarily accepting data before it is fully committed to NAND. That is a separate issue from the read behavior discussed here.

-- 
Cheers,
        Carlos E.R.
        ES🇪🇸, EU🇪🇺.
Re: Linux offers choice, BSD offers fragmentation
#234
Author: Lawrence D’Oliveiro
Date: Fri, 09 Oct 2026 21:20
25 lines
2721 bytes
On Fri, 9 Oct 2026 20:47:45 +0200, Carlos E. R. spouted more AI slop:

> I asked chatgpt (as a glorified documentation search engine):

A search engine gives references.

> Some SSDs have a dedicated DRAM chip, typically hundreds of
> megabytes to several gigabytes in larger drives. It is volatile
> memory, just like your computer's RAM.
>
> It is primarily used to store the SSD's internal mapping tables,
> which translate logical block addresses into physical NAND flash
> locations.

This is what an OS filesystem cache does, too. So now you’re going
through *two* layers between the application and its data: the OS
filesystem implementation itself, plus an additional filesystem-like
layer within the drive. All that is extra overhead.

> One final distinction: a write cache can improve write speed by
> temporarily accepting data before it is fully committed to NAND.
> That is a separate issue from the read behavior discussed here.

Also one that doesn’t actually work, unless your OS filesystem cache
is useless.
Re: Linux offers choice, BSD offers fragmentation
#236
Author: Carlos E. R.
Date: Fri, 09 Oct 2026 21:27
35 lines
2690 bytes
On 2026-10-09 23:20, Lawrence D’Oliveiro wrote:
> On Fri, 9 Oct 2026 20:47:45 +0200, Carlos E. R. spouted more AI slop:
> 
>> I asked chatgpt (as a glorified documentation search engine):
> 
> A search engine gives references.

So does the AI, but you need to do another operation to collect them.

> 
>> Some SSDs have a dedicated DRAM chip, typically hundreds of
>> megabytes to several gigabytes in larger drives. It is volatile
>> memory, just like your computer's RAM.
>>
>> It is primarily used to store the SSD's internal mapping tables,
>> which translate logical block addresses into physical NAND flash
>> locations.
> 
> This is what an OS filesystem cache does, too. So now you’re going
> through *two* layers between the application and its data: the OS
> filesystem implementation itself, plus an additional filesystem-like
> layer within the drive. All that is extra overhead.
> 
>> One final distinction: a write cache can improve write speed by
>> temporarily accepting data before it is fully committed to NAND.
>> That is a separate issue from the read behavior discussed here.
> 
> Also one that doesn’t actually work, unless your OS filesystem cache
> is useless.


-- 
Cheers,
        Carlos E.R.
        ES🇪🇸, EU🇪🇺.
Re: Linux offers choice, BSD offers fragmentation
#252
Author: c186282
Date: Sat, 10 Oct 2026 08:01
37 lines
3349 bytes
On 10/9/26 17:20, Lawrence D’Oliveiro wrote:
> On Fri, 9 Oct 2026 20:47:45 +0200, Carlos E. R. spouted more AI slop:
> 
>> I asked chatgpt (as a glorified documentation search engine):
> 
> A search engine gives references.
> 
>> Some SSDs have a dedicated DRAM chip, typically hundreds of
>> megabytes to several gigabytes in larger drives. It is volatile
>> memory, just like your computer's RAM.
>>
>> It is primarily used to store the SSD's internal mapping tables,
>> which translate logical block addresses into physical NAND flash
>> locations.
> 
> This is what an OS filesystem cache does, too. So now you’re going
> through *two* layers between the application and its data: the OS
> filesystem implementation itself, plus an additional filesystem-like
> layer within the drive. All that is extra overhead.

   This is why even SSDs don't really live up to
   their full potential. Every OS just still kind
   of assumes magnetic drives.

   And even SSDs/M.2s, compared to DRAM, SLOW !

>> One final distinction: a write cache can improve write speed by
>> temporarily accepting data before it is fully committed to NAND.
>> That is a separate issue from the read behavior discussed here.
> 
> Also one that doesn’t actually work, unless your OS filesystem cache
> is useless.

   It's all "best kludge". The main idea is to make
   the system work with 'everything'. Performance
   is kinda secondary.
Re: Linux offers choice, BSD offers fragmentation
#334
Author: c186282
Date: Sun, 11 Oct 2026 08:31
57 lines
3828 bytes
On 10/9/26 17:20, Lawrence D’Oliveiro wrote:
> On Fri, 9 Oct 2026 20:47:45 +0200, Carlos E. R. spouted more AI slop:
> 
>> I asked chatgpt (as a glorified documentation search engine):
> 
> A search engine gives references.
> 
>> Some SSDs have a dedicated DRAM chip, typically hundreds of
>> megabytes to several gigabytes in larger drives. It is volatile
>> memory, just like your computer's RAM.
>>
>> It is primarily used to store the SSD's internal mapping tables,
>> which translate logical block addresses into physical NAND flash
>> locations.

   On the BSDs ... they ARE "Fit For Purpose"
   and very secure.

   But NOT quite as 'versatile' as the latest
   Linux distros.

   MOSTLY they are meant for outward-facing
   SERVERS ... and do their job very well.

   However, if you are willing to step back just
   a few years, they are perfectly good personal
   operating systems.

   Nicest, for now, "GhostBSD". Not THAT much
   different from vanilla Debian.

   The BSDs are an "out" ... if/when Linux gets
   just TOO stupid you CAN go to the BSDs and
   not suffer TOO much.

   People with 'exotic' needs, MAY not be your
   cup-o-tea however. "Basic Users" though ...

   I've kept in touch with the BSDs since forever.
   NOT my first choice, but a FAIR alt choice
   Just In Case. Do have a little box with Ghost
   set up even now. If the next-gen Linux distros
   go just TOO stupid .......

   And there's always "Plan-9" :-)

   Don't forget Solaris/OpenIndiana either.

   Look, 'popular' pressures will always push
   the Linux distros out into the blue. This
   will NOT always be a good thing, not at all.
   BEST to cultivate some 'retro' stuff.

   I bought a number of mini-boxes a couple of
   years ago when they were cheap. This is my
   reserve. IF needed, BSD/Solaris/Whatever.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads