Sujet : Re: Is Parallel Programming Hard, And, If So, What Can You Do About It?
De : mitchalsup (at) *nospam* aol.com (MitchAlsup1)
Groupes : comp.archDate : 19. May 2025, 01:18:23
Autres entêtes
Organisation : Rocksolid Light
Message-ID : <91c8a31fc5d04a1fadf210b2dd6d4875@www.novabbs.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : Rocksolid Light
On Sun, 18 May 2025 1:35:54 +0000, Lawrence D'Oliveiro wrote:
On Tue, 13 May 2025 17:49:17 -0700, Stephen Fuld wrote:
>
On 5/13/2025 5:18 PM, Lawrence D'Oliveiro wrote:
>
You can tell that’s wrong because the drive cache is slower than the OS
filesystem cache.
>
I don't think that proves anything. I gave you an example of where the
drive cache speeded up the sequence of two reads to where it was faster
than two reads into the file cache.
>
Think of what a cache is for in the first place. The only reason they
work
is because of the “principle of locality”. This can also be expressed as
saying that typical patterns of data access by application programs
follow
a Pareto distribution, less formally known by monikers like the “80/20
rule” or the “90/10 rule”.
>
Let’s use the “90/10 rule” name just to put some concrete numbers on the
whole idea: this says that 90% of (recent) data accesses will be to just
10% of the data.
>
For “recent”, let’s say “within the last 10 seconds”.
Principle is reasonable, specified time is not.
A 4MB cache can be filled in 1ms when memory performs at (only) 4GB/s
(and the memory systems are up in the 40GB/s peak territory while
caches remain rather small (several GB at most).)
So the OS cache
should be big enough to hold that 10% of the data that the app accessed
in
about the last 10 seconds. Of course the precise set of frequently-
accessed data (the “working set”) will drift over time. So anything
beyond
this last-10-seconds’ worth will require hitting the actual disk device,
which will happen eventually.
Just change 10 seconds to 10 milliseconds and I have nothing to complain
about.
At that point, the cache on the disk device is going to come into play.
Trouble is it’s nowhere near this kind of size: it can only hold enough
data for, say, about the last 1 second’s worth of accesses. So by the
time
the OS cache experiences a miss like this, the disk cache isn’t going to
be able to help much, since it is more likely than not going to miss as
well. To be useful, it needs to be about 10 times the size of the OS
cache, so it can hold more of the 90% of the data that the app wants to
access less frequently.
>
But you can’t get drives like that.
Date | Sujet | # | | Auteur |
10 May 25 | Is Parallel Programming Hard, And, If So, What Can You Do About It? | 91 | | Thomas Koenig |
11 May 25 |  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 60 | | MitchAlsup1 |
11 May 25 |   Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 59 | | Al Kossow |
12 May 25 |    Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 58 | | Lawrence D'Oliveiro |
12 May 25 |     Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 57 | | MitchAlsup1 |
12 May 25 |      Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 56 | | 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? | 53 | | 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? | 49 | | 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? | 43 | | Anton Ertl |
13 May 25 |          Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 42 | | Lawrence D'Oliveiro |
13 May 25 |           Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 41 | | Stephen Fuld |
14 May 25 |            Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 36 | | Lawrence D'Oliveiro |
14 May 25 |             Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 33 | | Stephen Fuld |
18 May02:35 |              Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 32 | | Lawrence D'Oliveiro |
19 May01:10 |               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 May01:18 |               Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 25 | | MitchAlsup1 |
20 May00:33 |                Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 24 | | MitchAlsup1 |
20 May01:36 |                 Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 23 | | Lawrence D'Oliveiro |
20 May06:16 |                  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 22 | | BGB |
20 May15:49 |                   Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 20 | | 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? | 17 | | Lawrence D'Oliveiro |
21 May02:08 |                     Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 12 | | BGB |
21 May04:46 |                      Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 11 | | Lawrence D'Oliveiro |
21 May04:58 |                       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 10 | | Stephen Fuld |
21 May18:19 |                        Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 9 | | Anton Ertl |
22 May03:19 |                         Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 7 | | George Neuner |
22 May07:51 |                          Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 6 | | BGB |
22 May13:12 |                           Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 5 | | Torbjorn Lindgren |
22 May18:39 |                            Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 4 | | BGB |
22 May23:41 |                             Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 3 | | Lawrence D'Oliveiro |
23 May00:36 |                              Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | BGB |
23 May15:21 |                               Re: the power of junk, Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | John Levine |
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? | 4 | | Waldek Hebisch |
23 May06:35 |             Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 3 | | Lawrence D'Oliveiro |
23 May07:09 |              Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | BGB |
23 May13:36 |               Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | MitchAlsup1 |
18 May00:57 |         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 May22:32 |          Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | jseigh |
21 May08:05 |       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | Anton Ertl |
22 May03:48 |        Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Lawrence D'Oliveiro |
21 May13:23 |       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 7 | | Stefan Monnier |
21 May15:08 |        Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 6 | | MitchAlsup1 |
22 May03:49 |         Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 5 | | Lawrence D'Oliveiro |
22 May18:34 |          Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 3 | | MitchAlsup1 |
22 May23:42 |           Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Lawrence D'Oliveiro |
23 May02:54 |           Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | MitchAlsup1 |
23 May04:47 |          Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | George Neuner |
21 May01:32 |      Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | Lawrence D'Oliveiro |
21 May02:29 |       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Chris M. Thomasson |
21 May02:04 |     Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 3 | | Chris M. Thomasson |
23 May00:49 |      Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 2 | | Chris M. Thomasson |
23 May02:04 |       Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Chris M. Thomasson |
21 May02:31 |  Re: Is Parallel Programming Hard, And, If So, What Can You Do About It? | 1 | | Chris M. Thomasson |