Eviction is done when we have Less than 10% free space or Insufficient space for 3 default length blocks.
One thing that might be suboptimal here is that we're using the dfs.blocksize configuration key on the DataNode and assuming that will be the same value used by the client. Clearly, the client could use 256 MB blocks, whereas the DN could use 128 MB blocks. Etc.
Also, we don't really know how big the ramdisks are going to be. I can easily see a 300 GB ramdisk being used in a few years. Just defaulting to keeping 10% free seems like too much.
So, why not just have a minimum free space configuration key. It could be specified as a number of bytes, rather than as a percentage. So we could default it to 128 MB * 3 to get your current default of leaving space for 3 blocks. This would work better for bigger ramdisks (unlike a percentage-based scheme) and wouldn't make assumptions about the client's and DN's block size configuration being the same.