-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run copy codec first to get stuff cached #27
Comments
FWIW, I've recently done some tests on this (this mostly follows from the discussion in squash 131 - but I think the further discussion belongs here since this issue is open and the changes - I think - need to go in the benchmark). The results (read-only) on kernel 4.4 are basically that IO adds:
Note that these times are very similar, but they actually come from very different sources: (1) The The user-land cost is basically faulting in each page as it is accessed. Since the file cache is 4K, you take a fault every 4K pages in principle. In practice, you actually take a fault every 16 pages on newer kernels, due to faultaround. You can use It also physically reads the file if that's necessary. This doesn't actually seem to speed things up much (perhaps 5%) because fault handling is apparently super fast (a few 100 ns) and faultaround reduces the fault count by 16x. (2) Overall |
The first codec to run may have a small disadvantage on the first run since the kernel is unlikely to have the file cached. It's probably quite a small disadvantage; the operation is usually run multiple times, and most of the time will not be counted as CPU time anyways, but it would be easy to just run the copy codec once first for each file being benchmarked.
The text was updated successfully, but these errors were encountered: