On 5/25/2025 1:05 PM, Waldek Hebisch wrote:
Stephen Fuld <sfuld@alumni.cmu.edu.invalid> wrote:
On 5/23/2025 2:03 PM, Stefan Monnier wrote:
Stephen Fuld [2025-05-23 08:28:44] wrote:
On 5/22/2025 5:18 PM, Waldek Hebisch wrote:
It is pretty clear that due to drive mechanics track cache/buffer
is useful.
Pretty clear to everyone except one person. :-)
>
🙂
>
However, the real question is about size: how big
should it be. For "consumer" drives I see claims of 256 MB
cache. Given rather optimistic 200 MB/s transfer rate it is
about 1.25s of drive data, that is 80-150 rotations. I would
expect that say 4 tracks should be enough for reading. For
writing one could use few more tracks. Still, advertised cache
sizes seem to be much bigger than necessary.
It's not just the rotations, but the seek time. So your example is fewer
"operations" than the 80-150 you get when just including rotations.
>
I don't understand what you're getting at, here.
I think Waldek's argument is that 256MB corresponds approximately
to the amount of data stored in 80-150 tracks, and seek time doesn't
change that fact.
>
Yes, I didn't express myself well. :-( And once again, I have to say
that my information may be obsolete.
>
I think it is useful to separate talking about read data from write
data. For read data, as with any cache, more is always better than
less, though with diminishing returns. Why pick 1.25 sec as the "cut
off point"? If the host re-references data that it hasn't read for say
3 seconds, having it in cache still saves, probably a seek time and on
average 1/2 rotation time. Plus, it means the heads will be free to
handle other requests. All of this is standard cache benefits. I see
no reason to limit the cache size and reduce this benefit.
We are talking here about common case, that is when disc is accessed
via OS cache. OS cache is significantly larger than disc cache, so
hit ratio for data sent to host is going to be quite low. Disc
cache has an advantage: it gets "for free" some data that host did
not request. But it is rather unlikely that keeping such data
for long time has significant advantage.
And if you are caching writes, more cache gives you more blocks to choose
from when optimizing the write back order, which reduces the time to write
them all back.
>
IIUC, for SATA drives, NCQ is still limited to 32 in-flight commands, so
unless the drive is allowed to do write-back caching it seems the amount
of space used for write-buffering is likely small (compared to 256MB).
[ Unless it is common for individual write commands to cover multi-MB
chunks of data? ]
>
>
For write data, I was unaware of the 32 operation limit. I was used to
SCSI, which, IIRC was larger, and for server type applications, where
some sort of UPS is more common, the site may choose to enable write
caching in the disk. For a disk vendor, given the small cost of the
DRAM, it is an easy choice.
I do not look at details of disc protocol. But with protocal done
right host would first transfer commands and then deliver data
in order requested by the drive. So most buffering would be in
the host and disc would need just enough buffering to ensure
smooth transmission and low interrupt rate. 4 track looks like
plenty for this purpose.
The larger DRAM is a small component of drive cost, so the
manufacturers think it is worth including more.
>
In some markets (e.g. home routers), the size of DRAM seems to be enough
of a cost factor that it took many years until reaching 256MBs, even
though those boxes *need* that RAM for all kinds of purposes (the 128MB
of my current home-router seems to be its main source of instability).
but HDDs are pretty damn expensive beasts nowadays (because prices have
not gone down for the last 10 years or so), so I guess that makes
the relative cost of 512MB of DRAM "negligible"?
>
I can't comment on routers, but for disks, while the cost of the disk
may not have come down, increasing capacity allows reduced cost per
gigabyte. A substantial portion of the cost is not subject to Moore's
law (e.g. drive motor, magnets and arm assembly, etc.) and some capacity
increasing technologies cost more (but not enough more to overwhelm the
capacity advantage).
In nineties I read that for motherboard manufactures 1 cent was
"negligible", but 10 cents was significant: In volume transactions
margins were low and no party were willing to absorb 10 cents
per piece "loss". Discs probably are less competitive than
motherboards, but I would expect adding 256 MB to lead to 1
dollar or more increase of cost.
Dunno, I would maybe expect an 8 or 16MB chip, unless either:
Tracks have become so large that large RAM is needed to deal with them;
These larger RAM chips have actually become the cheapest usable option.
Had noted a correlation between RAM type and module size on FPGA boards:
512K/1MB: QSPI
32/64 MB: SDR SDRAM
64/128MB: DDR1
128MB: DDR2
256MB: DDR3
So, maybe, this is the cheapest commodity option if they want a given RAM type.
Like, for example, when I was last looking at SDcards, 16GB was the cheapest option being sold.
Smaller sizes had fallen off the bottom, and plenty of larger sizes existed (say, 128 or 256GB).
So, even if a 4 or 8 GB SDcard would be sufficient, 16GB was what was available (in the projects I was doing, typically the biggest file on the SDcard ended up being the swapfile...).
So IMO it is highly unclear why manufacturers use large caches.
One possible explanation could be benchmarketing and using
obsolete benchmarks. Another could be inertia with customers
thinking that "larger cache is better".
Cache, and RPM, probably...
Another things is fragmenting market into different "kinds" of
drives. Rationally, high performance drives should get
better mechanical parts. But in given performance area there
seem to be no reason for different mechanics, so I suspect
that they use the same. They may get different firmware.
"Green" consumer parts seem to be quite aggressive powering
down (IIUC on recent WD parts it is impossible to permanently
disable this), but beyond this it is not clear to me if there
are rational reasons for significantly different firmware.
My experience:
WD Green, Power-use optimized
Drives worked pretty well, but WD seemingly phased it out for HDDs.
WD Green is back, but mostly for SSDs.
WD Blue, marked as general purpose;
Not great and worse reliability IME.
Seems to be actually the more "budget optimized" line.
WD Black, marketed as performance optimized.
Typically 7200RPM
Not much notable difference IME from the WD Reds
WD Red, optimized for NAS
Typically 5400RPM
Have had mostly good results with these.
WD Purple, optimized for video usage and similar.
Typically 5400RPM.
No first hand experience.
Doesn't seem to be an obvious difference in cache sizes between the drive families.
There does seem to be a weak positive correlation between cache size and drive size.
RPM seems to be negatively correlated with capacity:
10K RPM: Seemingly mostly under 1TB
7200RPM, mostly 1TB to 4TB drives
5400RPM, most of the bigger drives.
In my use, I had seemingly been seeing the best results from WD Red drives.
As for the specifics of what they have tuned exactly, I am not sure.
Did see claims that there are apparently no real functional differences between WD Red and WD Purple drives.
Though, apparently the WD Purple drives do have more going on in terms of corrosion resistance (possibly hydrophobic coatings or similar?, for whatever reason...). Marketing doesn't seem to say anything about being optimized for use in damp conditions though.
But, dampness and oil resistance could make sense if one had an "industrial use" optimized drive. But, in this case, would likely expect a sealed drive with something like a butyl rubber and/or PTFE coating, and possibly gold plated contacts (well, and/or a 2.5" HDD inside of a special 3.5" enclosure, made from PTFE and butyl rubber and TPU, also optimizing for shock resistance, *1).
*1: Say, if you had an HDD that was designed to be thrown around the room and subjected to other high G-force shocks, while also being periodically submerged in water, oil, and various corrosive liquids. Outer shell could be mostly PTFE, possibly then PET, butyl, then TPU, possibly with some internal heat-transfer structures (possibly a small heat pump), with gold contacts, circuits to protect from voltage transients, ... Bonus points if it can also withstand operating at high pressures (such as being sunk to the bottom of the ocean, and/or driven over by a car or large truck, ...).
Though this implies that the enclosure partly be made out of stainless steel or similar, probably still with a PTFE outer layer (where, PTFE has a stronger chemical resistance than stainless steel, but stainless steel would be needed for crush resistance).
So, layers (outer to inner): PTFE (first line chemical defense), Stainless (crush resistance), PTFE (physical damage + corrosives), butyl (shock, second line chem), TPU (shock). Then, a small heat pump between the inner HDD and stainless shell (likely primarily PTFE construction).
Well, sadly, even with all this, it would still not likely be able to operate in Venus-like conditions (if the first layer of PTFE got damaged and/or the heat pump were insufficient). Chances could maybe be improved here if one added an gold or iridium coating to the stainless steel layer, and possibly using 316 stainless (say, if the PTFE gets scratched, the stainless doesn't get corroded by all the sulfuric acid, if the coating is breached, 316 would at least corrode slower than 304, ...).
Gold contacts have decent chemical resistance. Iridium has stronger chemical and thermal resistance than gold, but is also more expensive.
While cheaper and moderately chemical resistant, lead would be insufficient for Venus like conditions. Though, in these conditions, loss of power would also ruin the drive (I would not expect the drive proper to survive direct exposure to 230C temperatures, ...).
Though, such a thing would unlikely be a mass-market device (would likely be impractically expensive).
...
Date | Sujet | # | | Auteur |
10 May 25 | Is Parallel Programming Hard, And, If So, What Can You Do About It? | 169 | | Thomas Koenig |
11 May 25 |  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 138 | | MitchAlsup1 |
11 May 25 |   Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 137 | | Al Kossow |
12 May 25 |    Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 136 | | Lawrence D'Oliveiro |
12 May 25 |     Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 135 | | MitchAlsup1 |
12 May 25 |      Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 134 | | Lawrence D'Oliveiro |
12 May 25 |       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | MitchAlsup1 |
12 May 25 |        Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Lawrence D'Oliveiro |
12 May 25 |       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 131 | | Terje Mathisen |
12 May 25 |        Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 3 | | Anton Ertl |
12 May 25 |         Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Lawrence D'Oliveiro |
13 May 25 |         Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Stephen Fuld |
12 May 25 |        Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 127 | | Lawrence D'Oliveiro |
13 May 25 |         Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 4 | | Stefan Monnier |
13 May 25 |          Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 3 | | Lawrence D'Oliveiro |
13 May 25 |           Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Stefan Monnier |
13 May 25 |           Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Stephen Fuld |
13 May 25 |         Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 121 | | Anton Ertl |
13 May 25 |          Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 120 | | Lawrence D'Oliveiro |
13 May 25 |           Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 119 | | Stephen Fuld |
14 May 25 |            Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 61 | | Lawrence D'Oliveiro |
14 May 25 |             Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 58 | | Stephen Fuld |
18 May 25 |              Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 57 | | Lawrence D'Oliveiro |
19 May 25 |               Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 6 | | Lynn Wheeler |
19 May 25 |                Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 5 | | Vir Campestris |
19 May 25 |                 Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 4 | | Stephen Fuld |
20 May 25 |                  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Vir Campestris |
21 May 25 |                  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | Lynn Wheeler |
21 May 25 |                   Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Stephen Fuld |
19 May 25 |               Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 50 | | MitchAlsup1 |
20 May 25 |                Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 49 | | MitchAlsup1 |
20 May 25 |                 Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 48 | | Lawrence D'Oliveiro |
20 May 25 |                  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 47 | | BGB |
20 May 25 |                   Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 45 | | Stefan Monnier |
20 May 25 |                    Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | BGB |
20 May 25 |                     Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Stephen Fuld |
21 May 25 |                    Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 42 | | Lawrence D'Oliveiro |
21 May 25 |                     Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 37 | | BGB |
21 May 25 |                      Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 36 | | Lawrence D'Oliveiro |
21 May 25 |                       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 35 | | Stephen Fuld |
21 May18:19 |                        Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 34 | | Anton Ertl |
22 May03:19 |                         Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 32 | | George Neuner |
22 May07:51 |                          Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 31 | | BGB |
22 May13:12 |                           Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 30 | | Torbjorn Lindgren |
22 May18:39 |                            Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 29 | | BGB |
22 May23:41 |                             Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 28 | | Lawrence D'Oliveiro |
23 May00:36 |                              Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 27 | | BGB |
23 May15:21 |                               Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 24 | | John Levine |
23 May16:17 |                                Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 17 | | MitchAlsup1 |
23 May17:57 |                                 Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 16 | | Stephen Fuld |
23 May18:43 |                                  Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 15 | | MitchAlsup1 |
24 May01:26 |                                   Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 12 | | BGB |
24 May18:32 |                                    Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 11 | | BGB |
24 May21:36 |                                     Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 4 | | John Levine |
24 May22:45 |                                      Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 3 | | Michael S |
24 May22:54 |                                       Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | BGB |
26 May21:09 |                                        Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Terje Mathisen |
24 May22:07 |                                     Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | MitchAlsup1 |
24 May23:26 |                                      Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | BGB |
25 May21:24 |                                     Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 4 | | Lars Poulsen |
25 May21:47 |                                      Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | John Levine |
25 May21:51 |                                      Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | BGB |
26 May00:23 |                                      Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | MitchAlsup1 |
24 May23:17 |                                   Re: recycling | 2 | | Brian G. Lucas |
25 May07:24 |                                    Re: recycling | 1 | | George Neuner |
23 May16:53 |                                Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 6 | | BGB |
23 May18:34 |                                 Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 5 | | BGB |
24 May06:38 |                                  Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 4 | | BGB |
24 May17:57 |                                   Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | MitchAlsup1 |
24 May20:24 |                                    Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | BGB |
24 May22:45 |                                   Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | BGB |
23 May17:34 |                               Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | jseigh |
23 May17:39 |                                Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | BGB |
22 May12:32 |                         Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Dan Cross |
21 May 25 |                     Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 4 | | Stephen Fuld |
21 May06:39 |                      Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 3 | | Lawrence D'Oliveiro |
21 May07:42 |                       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Stephen Fuld |
21 May08:08 |                       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | BGB |
21 May 25 |                   Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Lawrence D'Oliveiro |
14 May 25 |             Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | John Levine |
14 May 25 |              Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Thomas Koenig |
23 May01:18 |            Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 57 | | Waldek Hebisch |
23 May06:35 |             Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 5 | | Lawrence D'Oliveiro |
23 May07:09 |              Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 4 | | BGB |
23 May13:36 |               Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 3 | | MitchAlsup1 |
23 May17:29 |                Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | BGB |
24 May04:17 |                 Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Lawrence D'Oliveiro |
23 May16:28 |             Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 51 | | Stephen Fuld |
23 May22:03 |              Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 49 | | Stefan Monnier |
24 May17:23 |               Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 44 | | Stephen Fuld |
25 May19:05 |                Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 43 | | Waldek Hebisch |
25 May20:13 |                 Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 24 | | Stephen Fuld |
25 May20:36 |                  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 13 | | MitchAlsup1 |
26 May05:23 |                   Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 12 | | Chris M. Thomasson |
26 May18:42 |                    Re: fuzzy disks, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 11 | | John Levine |
26 May19:16 |                     Re: fuzzy disks, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 10 | | Stephen Fuld |
26 May19:58 |                      Re: fuzzy disks, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 8 | | Stefan Monnier |
26 May20:19 |                       Re: fuzzy disks, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 6 | | John Levine |
27 May05:52 |                        Re: fuzzy disks, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 5 | | Stephen Fuld |
27 May09:34 |                         Re: fuzzy disks, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 4 | | Anton Ertl |
27 May15:34 |                          Re: fuzzy disks, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 3 | | Stephen Fuld |
26 May21:36 |                       Re: fuzzy disks, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Stephen Fuld |
26 May21:45 |                      Re: fuzzy disks, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Stephen Fuld |
26 May00:16 |                  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 6 | | Stefan Monnier |
26 May08:13 |                  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | Lawrence D'Oliveiro |
26 May20:20 |                  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | Waldek Hebisch |
25 May21:21 |                 Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | BGB |
26 May07:46 |                 Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 17 | | Anton Ertl |
25 May21:55 |               Drive Caches (Re: Is Parallel Programming Hard, ...) | 4 | | Lars Poulsen |
23 May23:19 |              Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Lawrence D'Oliveiro |
18 May 25 |         Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Lawrence D'Oliveiro |
19 May 25 |  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 29 | | quadibloc |
21 May 25 |  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Chris M. Thomasson |