-
Notifications
You must be signed in to change notification settings - Fork 8
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
Document block size #12
Conversation
I notice that node streams use 64k blocks... tests: 256k
64k
16k
it doesn't seem to make much difference on my system |
Wow that is odd. What kind of disc to you have? I ran the benchmarks on two different machines with compareable results. Here are the results from my "fast" machine: 16kb:
256kb:
|
I should have written more clearly why I think block size is important. In testing I found that block size would make up a noticeable diff, especially when combined with a fast path in aligned-block-file were we optimize for the case that the slice we need is probably in memory. The benchmarks really depend a lot of what kind of data you feed it and messages in ssb can be quite large so it appears that it would make sense to try and bump the buffersize. While this is not such a big problem on ssd, its still an IO read that can be quite expensive compared to just reading from memory. The benchmarks above clearly demonstrates how important it is to test things on many different machines. I wonder how we can make that more accessable to people. |
Here's from my "benchmark" machine: 256
16kb:
and 64kb for completeness:
|
Interesting! It's just a x201 think pad with rotating disk... do you think this is due to OS caching policies? maybe we could have a thing that ran and profiled the system, then chose settings that were most performant? |
or at least, have a thing to run and detect what sort of profile your computer has. hmm, on your machines 256k buffers are significantly faster on random reads but 16k and 64k make no difference. I'm guessing the relative size of objects in this is also a big factor in this. ssb messages have a pretty wide range of sizes. last I checked, average message size is 0.7k, but max is 8k of course. |
Ahh the old mechanical :) I replaced mine long ago, best performance upgrade I have ever done. I guess you are in the minority here ;-) Yeah 256 is really a lot faster on my slow machine. And stream is still faster on my fast, but not as much. I'm just worried about the impact of stream10. Do you think it is a realistic case for ssb to hit that particular behaviour? And how often compared to stream? My guess is that stream and random is much more common, but I really don't know. As I said earlier the reason why I opened this is that is had real world improvements to the various benchmarks we have. |
This still seems like it would be nice to document, what do y'all think? |
@christianbundy this is a good example of something that can just be merged |
I also changed the block size parameter in benchmark as that is the default and I don't want to give up the wrong impression (worse performance).