January 25, 2023

Kyu networking -- Cache timings

On the BBB I get this:
 - Cpu running at 1000 Mhz
 500K:   7699   7357   7408   7418 per 1K =    14
 100K:   1462   1269   1216   1211 per 1K =    12
  20K:    242    242    242    241 per 1K =    12
   1K:     12     12     12     12 per 1K =    12
On the Orange Pi I get this:
 - Cpu running at 1008 Mhz
 500K: 385306 385299 385285 385281 per 1K =   770
 100K:  77060  77061  77062  77062 per 1K =   770
  20K:  15418  15418  15416  15419 per 1K =   770
   1K:    772    773    772    772 per 1K =   767
What I am doing is timing a single call to memcpy with different counts. The from and to address are the same. A person might expect the smaller copies to hit entirely in the cache and go faster, but I don't see that. What I do see is drastically poor performance on the Orange Pi. The units are in Mhz counts (so 15418 is 15.4 milliseconds).

You could call this "test driven development". Now that I have a test, I run it each time Kyu boots, so no more effort other than resetting the board is required to see what has been accomplished.


Have any comments? Questions? Drop me a line!

Kyu / tom@mmto.org