Sujet : Re: Is Parallel Programming Hard, And, If So, What Can You Do About It?
De : sfuld (at) *nospam* alumni.cmu.edu.invalid (Stephen Fuld)
Groupes : comp.archDate : 24. May 2025, 17:23:48
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <100srqk$pos5$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : Mozilla Thunderbird
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.
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.
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).
-- - Stephen Fuld(e-mail address disguised to prevent spam)
Date | Sujet | # | | Auteur |
10 May 25 | Is Parallel Programming Hard, And, If So, What Can You Do About It? | 117 | | Thomas Koenig |
11 May 25 |  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 86 | | MitchAlsup1 |
11 May 25 |   Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 85 | | Al Kossow |
12 May 25 |    Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 84 | | Lawrence D'Oliveiro |
12 May 25 |     Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 83 | | MitchAlsup1 |
12 May 25 |      Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 82 | | 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? | 79 | | 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? | 75 | | 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? | 69 | | Anton Ertl |
13 May 25 |          Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 68 | | Lawrence D'Oliveiro |
13 May 25 |           Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 67 | | Stephen Fuld |
14 May 25 |            Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 56 | | Lawrence D'Oliveiro |
14 May 25 |             Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 53 | | Stephen Fuld |
18 May 25 |              Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 52 | | Lawrence D'Oliveiro |
19 May 25 |               Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 6 | | Lynn Wheeler |
19 May21:46 |                Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 5 | | Vir Campestris |
19 May22:58 |                 Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 4 | | Stephen Fuld |
20 May11:22 |                  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Vir Campestris |
21 May03:38 |                  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | Lynn Wheeler |
21 May04:49 |                   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? | 45 | | MitchAlsup1 |
20 May00:33 |                Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 44 | | MitchAlsup1 |
20 May01:36 |                 Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 43 | | Lawrence D'Oliveiro |
20 May06:16 |                  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 42 | | BGB |
20 May15:49 |                   Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 40 | | Stefan Monnier |
20 May18:42 |                    Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | BGB |
20 May19:35 |                     Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Stephen Fuld |
21 May01:29 |                    Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 37 | | Lawrence D'Oliveiro |
21 May02:08 |                     Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 32 | | BGB |
21 May04:46 |                      Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 31 | | Lawrence D'Oliveiro |
21 May04:58 |                       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 30 | | Stephen Fuld |
21 May18:19 |                        Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 29 | | Anton Ertl |
22 May03:19 |                         Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 27 | | George Neuner |
22 May07:51 |                          Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 26 | | BGB |
22 May13:12 |                           Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 25 | | Torbjorn Lindgren |
22 May18:39 |                            Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 24 | | BGB |
22 May23:41 |                             Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 23 | | Lawrence D'Oliveiro |
23 May00:36 |                              Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 22 | | BGB |
23 May15:21 |                               Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 19 | | John Levine |
23 May16:17 |                                Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 12 | | MitchAlsup1 |
23 May17:57 |                                 Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 11 | | Stephen Fuld |
23 May18:43 |                                  Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 10 | | MitchAlsup1 |
24 May01:26 |                                   Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 7 | | BGB |
24 May18:32 |                                    Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 6 | | BGB |
24 May21:36 |                                     Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 3 | | John Levine |
24 May22:45 |                                      Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | Michael S |
24 May22:54 |                                       Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | BGB |
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 |
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 May04:54 |                     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 May01:57 |                   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? | 10 | | 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? | 4 | | Stephen Fuld |
23 May22:03 |              Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | Stefan Monnier |
24 May17:23 |               Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Stephen Fuld |
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 May22:33 |  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 29 | | quadibloc |
20 May01:43 |   Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 28 | | Lawrence D'Oliveiro |
20 May19:19 |    Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 27 | | BGB |
20 May21:06 |     Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 23 | | Stefan Monnier |
20 May23:11 |      Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 20 | | MitchAlsup1 |
21 May01:34 |       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Lawrence D'Oliveiro |
21 May02:00 |       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Lawrence D'Oliveiro |
21 May02:30 |       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 8 | | George Neuner |
21 May02:39 |        Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 7 | | Chris M. Thomasson |
21 May04:41 |         Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 4 | | Lawrence D'Oliveiro |
21 May17:09 |          Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | George Neuner |
21 May20:30 |          Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | Stefan Monnier |
22 May03:45 |           Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Lawrence D'Oliveiro |
21 May18:06 |         Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | Lynn Wheeler |
21 May08:05 |       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | Anton Ertl |
21 May13:23 |       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 7 | | Stefan Monnier |
21 May01:32 |      Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | Lawrence D'Oliveiro |
21 May02:04 |     Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 3 | | Chris M. Thomasson |
21 May02:31 |  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Chris M. Thomasson |