I had the rare occasion to zip a folder after a reboot, i.e. in a state when no files were in the disk cache. Here are the results for the first 4 runs of the program - the first run took 4 times as much time as the following three.
It's probably irrelevant for a Solid States Disk, though.
**** started 18:03:30 ****
5155 ms for creating test.zip
246148 26.10.2023 18:03:36
**** started 18:03:46 ****
1300 ms for creating test.zip
246148 26.10.2023 18:03:47
**** started 18:04:05 ****
1271 ms for creating test.zip
246148 26.10.2023 18:04:06
**** started 18:04:11 ****
1258 ms for creating test.zip
246148 26.10.2023 18:04:12
**** started 18:04:19 ****
1263 ms for creating test.zip
246148 26.10.2023 18:04:20
To fix that problem I suggest the Time Machine app.
Approximate cost to access various caches and main memory? (https://stackoverflow.com/questions/4087280/approximate-cost-to-access-various-caches-and-main-memory)
0.5 ns - CPU L1 dCACHE reference
1 ns - speed-of-light (a photon) travel a 1 ft (30.5cm) distance
5 ns - CPU L1 iCACHE Branch mispredict
7 ns - CPU L2 CACHE reference
71 ns - CPU cross-QPI/NUMA best case on XEON E5-46*
100 ns - MUTEX lock/unlock
100 ns - own DDR MEMORY reference
135 ns - CPU cross-QPI/NUMA best case on XEON E7-*
202 ns - CPU cross-QPI/NUMA worst case on XEON E7-*
325 ns - CPU cross-QPI/NUMA worst case on XEON E5-46*
10,000 ns - Compress 1K bytes with Zippy PROCESS
20,000 ns - Send 2K bytes over 1 Gbps NETWORK
250,000 ns - Read 1 MB sequentially from MEMORY
500,000 ns - Round trip within a same DataCenter
10,000,000 ns - DISK seek
10,000,000 ns - Read 1 MB sequentially from NETWORK
30,000,000 ns - Read 1 MB sequentially from DISK
150,000,000 ns - Send a NETWORK packet CA -> Netherlands
| | | |
| | | ns|
| | us|
| ms|
13 years ago. See also, in that post, the fascinating conversations between Peter Cordes and
Lewis Kelsey - I am just a humble hobby programmer :cool: