Addendum - we had a new peak of traffic and the situation with 8 GB cache and 64k blocks got MUCH worse, with stalls of 40 seconds and more....
By looking at PMM graph I was being able to spot a bottleneck in tokudb_cachetable_pool_threads - the graph shows that pool saturated for several second (at 2 x NCPU, since I did not change that one). For sure there is a relationship. I am going to increase that pool from default to something higher to see if that solves this problem.
Addendum - we had a new peak of traffic and the situation with 8 GB cache and 64k blocks got MUCH worse, with stalls of 40 seconds and more....
By looking at PMM graph I was being able to spot a bottleneck in tokudb_ cachetable_ pool_threads - the graph shows that pool saturated for several second (at 2 x NCPU, since I did not change that one). For sure there is a relationship. I am going to increase that pool from default to something higher to see if that solves this problem.