-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix benchmarks: set cache_size to higher value #5585
Conversation
|
/bench import |
|
Finished benchmark for branch: nv-fix-bench-setup Benchmark: Import Benchmark (random transfers) Master: 697.50 ms |
ceebd31 to
7471cf9
Compare
|
It feels weird that this value (128) is hardcoded at so many different places. |
|
hmm.. according to probably something is getting rounded to 0 somewhere |
|
I mean, maybe we should put a const somewhere with the value (or parametrize it in sc_service::Configuration)... because right now if we need to change the value we have to do it in 5 different places. |
7471cf9 to
6d42c16
Compare
|
/bench import |
|
Finished benchmark for branch: nv-fix-bench-setup Benchmark: Import Benchmark (random transfers) Master: 697.35 ms |
this is rather out of scope of this pr, I want to resolve issue with benchmarks reporting degradation of 10x caused by #5271 And at the moment, I am not sure that only benchmarks are affected |
|
Before the linked pr the value was set to If we set |
I think there is error in calculations (rounding) somewhere Now setting cache-size = 128 basically disables rocksdb cache and leads to this 10x-20x degradation ^^^ |
|
Yes we round these numbers: https://github.com/paritytech/substrate/blob/master/client/db/src/utils.rs#L236 However, this is not your problem. You have the problem that I explained above. Before when the value was |
|
Well now if we run But it still does not explain such degradation with 128 value. |
This does not explain degradation. Such degradation is only possible when cache is disabled. |
|
Why only when the cache is disabled? Even when you have much less cache, the performance could degrade heavily as stuff is constantly paged out of cache. A small cache leads to the same behaviors as a disabled cache. |
a5450d3 to
52493c3
Compare
True, but have no idea how to profile it, I think node performance might be affected as well with these settings. One or several of the column cache might also be too small. Probably not the state one, since it takes 90%. I think setting it to some minimum value (5MiB) might help. |
|
We set the value |
I know, still there is no explanation for some observations. |
|
/bench import |
|
Finished benchmark for branch: nv-fix-bench-setup Benchmark: Import Benchmark (random transfers) Master: 693.28 ms |
f4688c8 to
44b8c48
Compare
|
/bench import |
|
Finished benchmark for branch: nv-fix-bench-setup Benchmark: Import Benchmark (random transfers) Master: 693.53 ms |
|
Ok, observations show that this is state cache that is not enough (for benchmarks at least). This is probably indication of some weird behaviour when specifying |
44b8c48 to
52493c3
Compare
|
/bench import |
|
Finished benchmark for branch: nv-fix-bench-setup Benchmark: Import Benchmark (random transfers) Master: 693.30 ms |
No description provided.