What knobs should we set to increase cache efficiency

On our preprod-system perf reported that roughly 70% of the CPU spent was in truncate - this is with a 10GB cache (but on FDB 3). After the patch was applied, truncate didn’t appear anymore in perf top and CPU utilization across the cluster dropped significantly (roughly by half).

So we don’t have this in prod yet, but it seems this helped by a lot.

2 Likes

I know this is an old thread but there is no conclusion on whether we can increase the cache safely.

The default for page cache 4k seems to be around 2GB. Is it safe to bump it up if more RAM is available ?

fdbserver now has an option to increase the cache memory via command line parameter: --cache_memory. You should increase --memory by the same amount you increase cache memory if you do so. The default memory is 8GiB and the default cache memory is 2GiB, so if you want to run with 6GiB of cache memory for example, you would do --memory 12GiB --cache_memory 6GiB. You’ll need to add these arguments to every fdbserver process that you want to increase the cache memory on.

2 Likes

Thanks for the details.