Why dont you just mount /tmp in RAM? In any case you want to change the temp dir for most programs on linux set the TMPDIR env var. That will work for calibre too. And if you want a calibre specific env var look in
https://manual.calibre-ebook.com/cus...ment-variables