I imagine it’s about checkpointing the calculation as it’s very long.
Point is, if the system crashes, you want to be able to resume the calculation without losing too much progress, so you want to periodically write progress to disk.
That takes some CPU cycles away from the calculation, and if your disk driver is inefficient, it will take away more.
The question did too, it isn’t immediately apparent why you’d write to disk to calculate pi if you haven’t worked in a place that churned a lot of numbers before.
It’s a bottleneck. If you are calculating faster than you can record the results, you have to wait for the write operation to complete before you can do the next calculation.
Oh boy, here we go.
Of course, find the secret of pi using the Linux version ‘42, answer to everything’.
Ah fedora is on 43 now darn
Why is this even related to IO?
I guess the Windows disk drivers are shit compared to Linux ones.
But what does calculating pi have to do with the disk speed?
I imagine it’s about checkpointing the calculation as it’s very long.
Point is, if the system crashes, you want to be able to resume the calculation without losing too much progress, so you want to periodically write progress to disk.
That takes some CPU cycles away from the calculation, and if your disk driver is inefficient, it will take away more.
AHH ok yeah that does make some sense.
The question did too, it isn’t immediately apparent why you’d write to disk to calculate pi if you haven’t worked in a place that churned a lot of numbers before.
It’s a bottleneck. If you are calculating faster than you can record the results, you have to wait for the write operation to complete before you can do the next calculation.
They don’t have 100TB of ram to store all the digits, I guess