i know the FDB documentation clearly states that Value sizes can’t go beyond 100 kb but i see a client knob exposed which allows me to tweak it. I grepped through the codebase expecting to see some kind of check corresponding to the upper limit but couldn’t find any, which got me thinking why the 100kb limit exists in the first place.
AFAIK, the SQLite-storage engine shouldn’t need to worry about the sizes of the values since that is anyways going to go through an IO op.
Now there are 2 possible reasons i can come up with for limiting the Value size, none of which can explain the 100 kb limit for me though -
- Since the various processes themselves communicate through an RPC mechanism, whcih involves network , and network latencies are unpredictable, we choose to have an upper bound so that we can simulate worst case scenarios and get a handle on the expected behaviour. The rigorous simulation/testing framework which FDB has, alludes my primary bet to this.
- If we allow for larger value sizes, eg : what i think MySQLs and DB2s of the world do for supporting BLOB data-typed columns, where it isn’t possible to fit the entire contents in a single node , they allow for some kind of pointer indirection, which leads to an extra IO to fetch that page/s from disk. This extra IO op can build up significantly when we move to the scale which FDB intends to support. a 4-level BTree with a branching factor of ~1k can store a billion records(keys) and thus that extra IO can be disastrous.
firstly, I wanted to understand if any of my above assumptions is correct wrt the limit to value size. I have seen this come up repeatedly on various forums for different k-v stores , but none provides a satisfactory answer.
Secondly, why the 100kb is what befuddles me ? could it have been 50kb or could it have been 500kb ? was this the result of an experimental simulation for varied value sizes and this performed the best ? if yes, can anyone please share what were the invariants of such an experiment ?
Thirdly, are there any issues with increasing the MAX_VALUE_SIZE knob and correspondingly the MAX_TRANSACTION_SIZE knob to allow for greater value sizes , if i’m okay with taking a hit in performance ?
@subramaniamr as FYI